Commit 802bbbe7 authored by Jonas Smedegaard's avatar Jonas Smedegaard

New upstream version 19.0221.2026~ds

parents 604afa9f aa50a316
EYE release
[v19.0221.2026] fixing exception with --proof
[v19.0202.2255] adding --csv-separator command line option to use CSV separator such as , or ;
[v19.0116.1239] changing cturtle error message (obs from Hans Cools)
[v18.1230.1307] implementing ccd:transformer in ./reasoning/ccd/ccd_rules.n3
......
EYE v19.0202.2255 josd
EYE v19.0221.2026 josd
......@@ -36,7 +36,7 @@
:- set_prolog_flag(encoding, utf8).
:- endif.
version_info('EYE v19.0202.2255 josd').
version_info('EYE v19.0221.2026 josd').
license_info('MIT License
......@@ -176,7 +176,9 @@ eye
:- dynamic(wpfx/1).
:- dynamic(wtcache/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#biconditional>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#call>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#conditional>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#finalize>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#relabel>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#tactic>'/2).
:- dynamic('<http://eulersharp.sourceforge.net/2003/03swap/log-rules#transaction>'/2).
......
# EYE Imagining
A collection of programs that create linked data.
=== Bell function integral ===
from sympy import *
if __name__ == "__main__":
x = Symbol('x')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('"integrate(exp(-x**2), (x, -oo, oo))" :integrate-bell "%s".' % (integrate(exp(-x**2), (x, -oo, oo))))
PREFIX : <http://josd.github.io/eye/imagining#>
"integrate(exp(-x**2), (x, -oo, oo))" :integrate-bell "sqrt(pi)".
#!/bin/bash
python3 integrate-bell.py > integrate-bell.ttl
from datetime import date
def easter(year):
"Returns Easter as a date object."
"see http://code.activestate.com/recipes/576517-calculate-easter-western-given-a-year/"
a = year % 19
b = year // 100
c = year % 100
d = (19 * a + b - b // 4 - ((b - (b + 8) // 25 + 1) // 3) + 15) % 30
e = (32 + 2 * (b % 4) + 2 * (c // 4) - d - (c % 4)) % 7
f = d + e - 7 * ((a + 11 * d + 22 * e) // 451) + 114
month = f // 31
day = f % 31 + 1
return date(year, month, day)
if __name__ == "__main__":
print('PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>')
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('2019 :easter "%s"^^xsd:date.' % (easter(2019)))
print('2020 :easter "%s"^^xsd:date.' % (easter(2020)))
print('2021 :easter "%s"^^xsd:date.' % (easter(2021)))
print('2022 :easter "%s"^^xsd:date.' % (easter(2022)))
print('2023 :easter "%s"^^xsd:date.' % (easter(2023)))
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX : <http://josd.github.io/eye/imagining#>
2019 :easter "2019-04-21"^^xsd:date.
2020 :easter "2020-04-12"^^xsd:date.
2021 :easter "2021-04-04"^^xsd:date.
2022 :easter "2022-04-17"^^xsd:date.
2023 :easter "2023-04-09"^^xsd:date.
#!/bin/bash
python3 easter.py > easter.ttl
=== Euler identity ===
PREFIX : <http://josd.github.io/eye/imagining#>
"E**(I*pi) + 1" :euler-identity 0 .
#!/bin/bash
python3 euler-identity.py > euler-identity.ttl
=== Fibonacci Numbers ===
def fib(n, c={0:1, 1:1}):
if n not in c:
x = n // 2
c[n] = fib(x-1) * fib(n-x-1) + fib(x) * fib(n-x)
return c[n]
if __name__ == "__main__":
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('')
print('0 :fib %d .' % (fib(0)))
print('91 :fib %d .' % (fib(91)))
print('283 :fib %d .' % (fib(283)))
PREFIX : <http://josd.github.io/eye/imagining#>
0 :fib 1 .
91 :fib 7540113804746346429 .
283 :fib 100694286476841731898333719576864360661213863366454327287613 .
#!/bin/bash
python3 fib.py > fib.ttl
=== Grover's algorithm ===
PREFIX : <http://josd.github.io/eye/imagining#>
"grover(7_bits, alternating_bits_oracle)" :grover (1 0 1 0 1 0 1).
#!/bin/bash
python3 grover.py > grover.ttl
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/3outof5/sample.n3 --query http://josd.github.io/eye/reasoning/3outof5/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -123,6 +123,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/3outof5/sample.n3>].
#2019-01-19T23:06:12.283Z in=6 out=1 ent=1 step=1 brake=2 inf=56246 sec=0.050 inf/sec=1124920
#2019-02-21T20:23:48.329Z in=6 out=1 ent=1 step=1 brake=2 inf=56458 sec=0.052 inf/sec=1085731
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/bi/biP.n3 --query http://josd.github.io/eye/reasoning/bi/biQ.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -4020,6 +4020,6 @@ PREFIX fl: <http://eulersharp.sourceforge.net/2003/03swap/fl-rules#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/bi/biP.n3>].
#2019-01-19T23:06:13.355Z in=131 out=97 ent=200 step=910 brake=6 inf=1124100 sec=0.205 inf/sec=5483415
#2019-02-21T20:23:48.918Z in=131 out=97 ent=200 step=910 brake=6 inf=1124312 sec=0.197 inf/sec=5707168
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/bmi/bmi_instances.n3 --n3 http://josd.github.io/eye/reasoning/bmi/bmi_rules.n3 --n3 http://josd.github.io/eye/reasoning/bmi/weightStatus_rules.n3 --n3 http://josd.github.io/eye/reasoning/bmi/age_rules_backward.n3 --query http://josd.github.io/eye/reasoning/bmi/bmi_query.n3
PREFIX owl: <http://www.w3.org/2002/07/owl#>
......@@ -1144,6 +1144,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/bmi/bmi_instances.n3>].
#2019-01-19T23:06:14.307Z in=97 out=50 ent=100 step=48 brake=4 inf=391052 sec=0.126 inf/sec=3103587
#2019-02-21T20:23:49.435Z in=97 out=50 ent=100 step=48 brake=4 inf=391263 sec=0.128 inf/sec=3056742
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/bmt/1tt1.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt2.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt3.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt4.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt5.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt6.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt7.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt8.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt9.n3 --n3 http://josd.github.io/eye/reasoning/bmt/1tt10.n3 --query http://josd.github.io/eye/reasoning/bmt/query.n3
PREFIX : <http://eulersharp.sourceforge.net/2007/07test/graph#>
......@@ -32573,6 +32573,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/bmt/1tt8.n3>].
#2019-01-19T23:06:17.375Z in=9841 out=1518 ent=1518 step=1518 brake=1 inf=7685239 sec=1.302 inf/sec=5902641
#2019-02-21T20:23:51.552Z in=9841 out=1518 ent=1518 step=1518 brake=1 inf=7685437 sec=1.289 inf/sec=5962325
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --nope --turtle http://josd.github.io/eye/reasoning/ccd/test_data.ttl --turtle http://josd.github.io/eye/reasoning/ccd/train_model.ttl --n3 http://josd.github.io/eye/reasoning/ccd/background_rules.n3 --n3 http://josd.github.io/eye/reasoning/ccd/ccd_rules.n3 --query http://josd.github.io/eye/reasoning/ccd/test_query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -13,6 +13,6 @@ _:t_1 :answer (:expected 0 :predicted 0 :belief 0.6217496707387207 :evidence ((0
_:t_2 :answer (:expected 1 :predicted 1 :belief 0.7578791663912112 :evidence ((2.4849066497880004 :input2 40 3 0) (1.3862943611198906 :input10 ("xyz" 40) 1 0) (0.6931471805599453 :input1 "xyz" 2 1) (0.0 :input5 "a" 1 1))).
_:t_3 :answer (:expected 0 :predicted 0 :belief 0.5857864376269049 :evidence ((0.0 :input3 (0 1) 2 2) (-0.6931471805599453 :input4 :v3 1 2))).
#2019-01-19T23:06:18.811Z in=40 out=4 ent=3 step=6 brake=2 inf=66803 sec=0.053 inf/sec=1260434
#2019-02-21T20:23:52.246Z in=40 out=4 ent=3 step=6 brake=2 inf=67000 sec=0.052 inf/sec=1288462
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --nope --turtle http://josd.github.io/eye/reasoning/ccd/train_data.ttl --n3 http://josd.github.io/eye/reasoning/ccd/background_rules.n3 --n3 http://josd.github.io/eye/reasoning/ccd/train_rules.n3 --query http://josd.github.io/eye/reasoning/ccd/train_query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -25,6 +25,6 @@ PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
(:input10 ("abc" 60)) ccd:model (:output1 1 2).
(:input10 ("xyz" 40)) ccd:model (:output1 1 0).
#2019-01-19T23:06:18.115Z in=54 out=17 ent=24 step=110 brake=2 inf=40432 sec=0.042 inf/sec=962667
#2019-02-21T20:23:51.921Z in=54 out=17 ent=24 step=110 brake=2 inf=40633 sec=0.037 inf/sec=1098189
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --hmac-key k123 --n3 http://josd.github.io/eye/reasoning/crypto/cryptoP.n3 --pass
PREFIX crypto: <http://www.w3.org/2000/10/swap/crypto#>
......@@ -94,6 +94,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/crypto/cryptoP.n3>].
#2019-01-19T23:06:18.999Z in=3 out=3 ent=6 step=12 brake=2 inf=29547 sec=0.030 inf/sec=984900
#2019-02-21T20:23:52.336Z in=3 out=3 ent=6 step=12 brake=2 inf=29744 sec=0.032 inf/sec=929500
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/cs/data-001.n3 --n3 http://josd.github.io/eye/reasoning/cs/rules-001.n3 --query http://josd.github.io/eye/reasoning/cs/query-001.n3
PREFIX : <http://josd.github.io/eye/reasoning/cs#>
......@@ -158,6 +158,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/cs/rules-001.n3>].
#2019-01-19T23:06:19.475Z in=15 out=2 ent=4 step=8 brake=2 inf=54626 sec=0.048 inf/sec=1138042
#2019-02-21T20:23:52.553Z in=15 out=2 ent=4 step=8 brake=2 inf=54826 sec=0.045 inf/sec=1218356
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/csv/select-data-extra.n3 --query http://josd.github.io/eye/reasoning/csv/select-query.n3
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
......@@ -113,6 +113,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/csv/select-data-extra.n3>].
#2019-01-19T23:06:20.293Z in=6 out=5 ent=5 step=5 brake=2 inf=54951 sec=0.052 inf/sec=1056750
#2019-02-21T20:23:53.084Z in=6 out=5 ent=5 step=5 brake=2 inf=55162 sec=0.054 inf/sec=1021519
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/csv/select-data.n3 --query http://josd.github.io/eye/reasoning/csv/select-query.n3
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
......@@ -323,6 +323,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/csv/select-data.n3>].
#2019-01-19T23:06:19.929Z in=18 out=17 ent=17 step=17 brake=2 inf=76213 sec=0.051 inf/sec=1494373
#2019-02-21T20:23:52.823Z in=18 out=17 ent=17 step=17 brake=2 inf=76425 sec=0.049 inf/sec=1559694
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/de/de.n3 --n3 http://josd.github.io/eye/reasoning/de/deA.n3 --query http://josd.github.io/eye/reasoning/de/deQ.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -76,6 +76,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/de/de.n3>].
#2019-01-19T23:06:20.749Z in=8 out=1 ent=6 step=18 brake=3 inf=29241 sec=0.034 inf/sec=860029
#2019-02-21T20:23:53.284Z in=8 out=1 ent=6 step=18 brake=3 inf=29442 sec=0.037 inf/sec=795730
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/djiti/graph-10.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -63,6 +63,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/graph-10.n3>].
#2019-01-19T23:06:21.074Z in=11 out=2 ent=2 step=2 brake=1 inf=27201 sec=0.036 inf/sec=755583
#2019-02-21T20:23:53.437Z in=11 out=2 ent=2 step=2 brake=1 inf=27399 sec=0.036 inf/sec=761083
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/djiti/graph-100.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -153,6 +153,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/graph-100.n3>].
#2019-01-19T23:06:21.323Z in=101 out=6 ent=6 step=6 brake=1 inf=44837 sec=0.045 inf/sec=996378
#2019-02-21T20:23:53.584Z in=101 out=6 ent=6 step=6 brake=1 inf=45038 sec=0.039 inf/sec=1154821
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/djiti/graph-1000.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -2145,6 +2145,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/graph-1000.n3>].
#2019-01-19T23:06:21.673Z in=1001 out=92 ent=92 step=92 brake=1 inf=392339 sec=0.102 inf/sec=3846461
#2019-02-21T20:23:53.837Z in=1001 out=92 ent=92 step=92 brake=1 inf=392539 sec=0.109 inf/sec=3601275
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/djiti/graph-10000.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -22107,6 +22107,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/graph-10000.n3>].
#2019-01-19T23:06:22.935Z in=10001 out=966 ent=966 step=966 brake=1 inf=3882893 sec=0.827 inf/sec=4695155
#2019-02-21T20:23:55.025Z in=10001 out=966 ent=966 step=966 brake=1 inf=3883092 sec=0.820 inf/sec=4735478
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --proof http://josd.github.io/eye/reasoning/djiti/proof-10.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -139,6 +139,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/proof-10.n3>].
#2019-01-19T23:06:23.283Z in=39 out=2 ent=8 step=18 brake=2 inf=59457 sec=0.049 inf/sec=1213408
#2019-02-21T20:23:55.286Z in=39 out=2 ent=8 step=18 brake=2 inf=59656 sec=0.054 inf/sec=1104741
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --proof http://josd.github.io/eye/reasoning/djiti/proof-100.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -348,6 +348,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/proof-100.n3>].
#2019-01-19T23:06:23.651Z in=94 out=6 ent=23 step=48 brake=2 inf=119709 sec=0.063 inf/sec=1900143
#2019-02-21T20:23:55.568Z in=94 out=6 ent=23 step=48 brake=2 inf=119906 sec=0.070 inf/sec=1712943
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --proof http://josd.github.io/eye/reasoning/djiti/proof-1000.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -5060,6 +5060,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/proof-1000.n3>].
#2019-01-19T23:06:24.249Z in=1324 out=92 ent=355 step=712 brake=2 inf=1483871 sec=0.242 inf/sec=6131698
#2019-02-21T20:23:56.067Z in=1324 out=92 ent=355 step=712 brake=2 inf=1484070 sec=0.247 inf/sec=6008381
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --proof http://josd.github.io/eye/reasoning/djiti/proof-10000.n3 --query http://josd.github.io/eye/reasoning/djiti/query.n3
PREFIX : <http://josd.github.io/eye/reasoning#>
......@@ -51865,6 +51865,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/djiti/proof-10000.n3>].
#2019-01-19T23:06:27.013Z in=13589 out=966 ent=3682 step=7366 brake=2 inf=15212609 sec=2.226 inf/sec=6834056
#2019-02-21T20:23:58.715Z in=13589 out=966 ent=3682 step=7366 brake=2 inf=15212805 sec=2.187 inf/sec=6956015
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --tactic limited-answer 1 --n3 http://josd.github.io/eye/reasoning/dp/dp.n3 --query http://josd.github.io/eye/reasoning/dp/dpQ.n3
# <http://josd.github.io/eye/reasoning#person5> thinking for 0.025 seconds
......@@ -69,6 +69,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/dp/dp.n3>].
#2019-01-19T23:06:28.245Z in=10 out=1 ent=2 step=2 brake=1 inf=53383 sec=0.045 inf/sec=1186289
#2019-02-21T20:23:59.755Z in=10 out=1 ent=2 step=2 brake=1 inf=53580 sec=0.039 inf/sec=1373846
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --tactic limited-answer 1 --n3 http://josd.github.io/eye/reasoning/dpe/dpe_theory.n3 --n3 http://josd.github.io/eye/reasoning/dpe/dpe_assumption.n3 --query http://josd.github.io/eye/reasoning/dpe/dpe_query.n3
PREFIX : <http://josd.github.io/eye/reasoning/dpe/dpe#>
......@@ -241,6 +241,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/dpe/dpe_theory.n3>].
#2019-01-19T23:06:28.852Z in=16 out=2 ent=32 step=120 brake=4 inf=53138 sec=0.052 inf/sec=1021885
#2019-02-21T20:24:00.067Z in=16 out=2 ent=32 step=120 brake=4 inf=53356 sec=0.046 inf/sec=1159913
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --no-distinct-output --nope --n3 http://josd.github.io/eye/reasoning/dqc/sdcoding.n3 --query http://josd.github.io/eye/reasoning/dqc/sdcoding-q.n3
PREFIX dqc: <http://josd.github.io/eye/reasoning/dqc#>
......@@ -28,6 +28,6 @@ PREFIX dqc: <http://josd.github.io/eye/reasoning/dqc#>
3 dqc:sdcoding 0 .
3 dqc:sdcoding 2 .
#2019-01-19T23:06:29.281Z in=29 out=24 ent=0 step=0 brake=1 inf=36623 sec=0.043 inf/sec=851698
#2019-02-21T20:24:00.313Z in=29 out=24 ent=0 step=0 brake=1 inf=36839 sec=0.035 inf/sec=1052543
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --no-distinct-input --nope --n3 http://josd.github.io/eye/reasoning/dqc/sdcoding-a.n3 --query http://josd.github.io/eye/reasoning/dqc/sdcoding-query.n3
PREFIX dqc: <http://josd.github.io/eye/reasoning/dqc#>
......@@ -10,6 +10,6 @@ PREFIX math: <http://www.w3.org/2000/10/swap/math#>
0 dqc:sdcoding 0 .
2 dqc:sdcoding 2 .
#2019-01-19T23:06:29.603Z in=25 out=4 ent=4 step=4 brake=2 inf=26630 sec=0.037 inf/sec=719730
#2019-02-21T20:24:00.455Z in=25 out=4 ent=4 step=4 brake=2 inf=26843 sec=0.032 inf/sec=838844
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/dt/test-facts.n3 --n3 http://josd.github.io/eye/reasoning/dt/test-dt-1000.n3 --query http://josd.github.io/eye/reasoning/dt/test-query.n3
PREFIX : <http://eulersharp.sourceforge.net/2009/12dtb/test#>
......@@ -15034,6 +15034,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/dt/test-dt-1000.n3>].
#2019-01-19T23:06:30.676Z in=3004 out=1 ent=2999 step=5998 brake=2 inf=4150520 sec=0.534 inf/sec=7772509
#2019-02-21T20:24:01.257Z in=3004 out=1 ent=2999 step=5998 brake=2 inf=4150743 sec=0.539 inf/sec=7700822
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/easter/easterP.n3 --query http://josd.github.io/eye/reasoning/easter/easterF.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -1016,6 +1016,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/easter/easterP.n3>].
#2019-01-19T23:06:31.405Z in=19 out=16 ent=32 step=64 brake=2 inf=223283 sec=0.066 inf/sec=3383076
#2019-02-21T20:24:01.572Z in=19 out=16 ent=32 step=64 brake=2 inf=223504 sec=0.064 inf/sec=3492250
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/einstein/einstein.n3 --query http://josd.github.io/eye/reasoning/einstein/einsteinQ.n3
PREFIX list: <http://www.w3.org/2000/10/swap/list#>
......@@ -110,6 +110,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/einstein/einstein.n3>].
#2019-01-19T23:06:31.953Z in=5 out=1 ent=2 step=4 brake=2 inf=687768 sec=0.139 inf/sec=4947971
#2019-02-21T20:24:01.920Z in=5 out=1 ent=2 step=4 brake=2 inf=687983 sec=0.135 inf/sec=5096170
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --nope --n3 http://josd.github.io/eye/reasoning/equation4/polynomial.n3 --query http://josd.github.io/eye/reasoning/equation4/query.n3
PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
......@@ -1004,6 +1004,6 @@ PREFIX e: <http://eulersharp.sourceforge.net/2003/03swap/log-rules#>
((1.0 0.0) (31.479139483246144 -5.637636835003695) (49.6500993311686 21.292855459119252) (-7.509269162080673 -4.685394625106959) (44.19898428417116 0.09388861810012417)) e:roots ((-30.04806036124109 6.671361387382722) (-1.8564286933350918 -0.8715530609384365) (0.14001882652977038 -0.8874311173161269) (0.2853307448002713 0.725259625875537)).
((1.0 0.0) (-3.4735945942544033 -5.724317381286637) (27.95030525291834 -45.78866148003705) (-35.441953702016335 -26.5046605108508) (-14.350738086782172 -39.59708380047468)) e:roots ((5.746180404504588 9.593740189549036) (-0.3856613070277868 -0.47108060895022996) (-2.1856418312890327 -4.580144382021954) (0.29871732806663354 1.181802182709784)).
#2019-01-19T23:06:34.576Z in=1001 out=1000 ent=1000 step=1000 brake=1 inf=12869477 sec=1.425 inf/sec=9031212
#2019-02-21T20:24:03.886Z in=1001 out=1000 ent=1000 step=1000 brake=1 inf=12869699 sec=1.379 inf/sec=9332632
#ENDS
----------------
Euler's identity
----------------
See https://en.wikipedia.org/wiki/Euler%27s_identity
The tests are at http://josd.github.io/eye/reasoning/euler/test
from sympy import *
if __name__ == "__main__":
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('PREFIX : <http://josd.github.io/eye/reasoning#>')
print('')
print('"E**(I*pi) + 1" :euler-identity %d .' % (E**(I*pi) + 1))
print(':main :euler-identity "E**(I*pi) + 1 = %d".' % (E**(I*pi) + 1))
#Processed by EYE v19.0202.2255 josd
#eye --nope --turtle - --pass
PREFIX : <http://josd.github.io/eye/reasoning#>
:main :euler-identity "E**(I*pi) + 1 = 0".
#2019-02-21T20:24:04.249Z in=1 out=1 ent=0 step=0 brake=1 inf=12457 sec=0.039 inf/sec=319410
#ENDS
#!/bin/bash
python3 euler-identity.py | eye --nope --turtle - --pass > euler-identity.ttl
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/fcm/fcm-plugin.n3 --n3 http://josd.github.io/eye/reasoning/fcm/fl-rules.n3 --n3 http://josd.github.io/eye/reasoning/fcm/example001P.n3 --n3 http://josd.github.io/eye/reasoning/fcm/example002P.n3 --query http://josd.github.io/eye/reasoning/fcm/example003Q.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -669,6 +669,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/fcm/example002P.n3>].
#2019-01-19T23:06:35.406Z in=76 out=8 ent=50 step=307 brake=6 inf=590726 sec=0.131 inf/sec=4509359
#2019-02-21T20:24:04.634Z in=76 out=8 ent=50 step=307 brake=6 inf=590955 sec=0.128 inf/sec=4616836
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/fgcm/fgcm-plugin.n3 --n3 http://josd.github.io/eye/reasoning/fcm/fl-rules.n3 --n3 http://josd.github.io/eye/reasoning/fgcm/patient.n3 --n3 http://josd.github.io/eye/reasoning/fgcm/fgcm-model.n3 --query http://josd.github.io/eye/reasoning/fgcm/fgcm-query.n3
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
......@@ -1211,6 +1211,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
1 log:equalTo _:x_1_20} {1 log:equalTo 1 .
1 log:equalTo 1}) e:derive true}}}].
#2019-01-19T23:06:36.421Z in=253 out=18 ent=237 step=1917 brake=5 inf=1215833 sec=0.257 inf/sec=4730868
#2019-02-21T20:24:05.288Z in=253 out=18 ent=237 step=1917 brake=5 inf=1216052 sec=0.248 inf/sec=4903435
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --tactic limited-answer 1 --n3 http://josd.github.io/eye/reasoning/fib/fib.n3 --query http://josd.github.io/eye/reasoning/fib/fibQ.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -1145,6 +1145,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/fib/fib.n3>].
#2019-01-19T23:06:36.876Z in=4 out=1 ent=1 step=1 brake=1 inf=137787 sec=0.059 inf/sec=2335373
#2019-02-21T20:24:05.555Z in=4 out=1 ent=1 step=1 brake=1 inf=138005 sec=0.050 inf/sec=2760100
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/gedcom/gedcom-facts.n3 --n3 http://josd.github.io/eye/reasoning/gedcom/gedcom-relations.n3 --n3 http://josd.github.io/eye/reasoning/gedcom/rpo-rules.n3 --query http://josd.github.io/eye/reasoning/gedcom/gedcom-filter.n3
PREFIX gc: <http://www.daml.org/2001/01/gedcom/gedcom#>
......@@ -934,6 +934,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
);
r:rule <#lemma92>.
#2019-01-19T23:06:37.588Z in=185 out=6 ent=1591 step=18973 brake=12 inf=864517 sec=0.149 inf/sec=5802128
#2019-02-21T20:24:05.913Z in=185 out=6 ent=1591 step=18973 brake=12 inf=864747 sec=0.152 inf/sec=5689125
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/glass/test.n3 --query http://josd.github.io/eye/reasoning/glass/testQ.n3
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
......@@ -172,6 +172,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/glass/test.n3>].
#2019-01-19T23:06:38.029Z in=9 out=6 ent=7 step=30 brake=2 inf=53121 sec=0.040 inf/sec=1328025
#2019-02-21T20:24:06.172Z in=9 out=6 ent=7 step=30 brake=2 inf=53340 sec=0.044 inf/sec=1212273
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/gps/gps-plugin.n3 --n3 http://josd.github.io/eye/reasoning/gps/gps-example1.n3 --query http://josd.github.io/eye/reasoning/gps/gps-query1.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -285,6 +285,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/gps/gps-plugin.n3>].
#2019-01-19T23:06:38.618Z in=11 out=1 ent=1 step=1 brake=2 inf=123518 sec=0.061 inf/sec=2024885
#2019-02-21T20:24:06.500Z in=11 out=1 ent=1 step=1 brake=2 inf=123735 sec=0.062 inf/sec=1995726
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/gps/gps-plugin.n3 --n3 http://josd.github.io/eye/reasoning/gps/gps-example2.n3 --query http://josd.github.io/eye/reasoning/gps/gps-query2.n3
PREFIX math: <http://www.w3.org/2000/10/swap/math#>
......@@ -5872,6 +5872,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
);
r:rule <#lemma336>.
#2019-01-19T23:06:39.458Z in=44 out=10 ent=10 step=10 brake=2 inf=2336681 sec=0.364 inf/sec=6419453
#2019-02-21T20:24:07.121Z in=44 out=10 ent=10 step=10 brake=2 inf=2336911 sec=0.362 inf/sec=6455555
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --n3 http://josd.github.io/eye/reasoning/graph/graph.axiom.n3 --n3 http://josd.github.io/eye/reasoning/graph/rpo-rules.n3 --query http://josd.github.io/eye/reasoning/graph/graph.filter.n3
PREFIX log: <http://www.w3.org/2000/10/swap/log#>
......@@ -157,6 +157,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/graph/graph.axiom.n3>].
#2019-01-19T23:06:40.047Z in=89 out=1 ent=24 step=70 brake=2 inf=93148 sec=0.050 inf/sec=1862960
#2019-02-21T20:24:07.454Z in=89 out=1 ent=24 step=70 brake=2 inf=93367 sec=0.052 inf/sec=1795519
#ENDS
------------------
Grover's algorithm
------------------
See https://en.wikipedia.org/wiki/Grover%27s_algorithm
The tests are at http://josd.github.io/eye/reasoning/grover/test
......@@ -82,6 +82,6 @@ if __name__ == "__main__":
# run Grover search to find a 7-bit solution
lst = run_grover(eng, 7, alternating_bits_oracle)
n3_lst = '(' + ' '.join([str(i) for i in lst]) + ')'
print('PREFIX : <http://josd.github.io/eye/imagining#>')
print('PREFIX : <http://josd.github.io/eye/reasoning#>')
print('')
print('"grover(7_bits, alternating_bits_oracle)" :grover %s.' % (n3_lst))
print(':main :grover-algorithm "grover(7_bits, alternating_bits_oracle) = %s".' % (n3_lst))
#Processed by EYE v19.0202.2255 josd
#eye --nope --turtle - --pass
PREFIX : <http://josd.github.io/eye/reasoning#>
:main :grover-algorithm "grover(7_bits, alternating_bits_oracle) = (1 0 1 0 1 0 1)".
#2019-02-21T20:24:09.796Z in=1 out=1 ent=0 step=0 brake=1 inf=12491 sec=0.044 inf/sec=283886
#ENDS
#!/bin/bash
python3 grover.py | eye --nope --turtle - --pass > grover.ttl
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --turtle http://josd.github.io/eye/reasoning/h2o/hypothesis-001.n3 --turtle http://josd.github.io/eye/reasoning/h2o/data-001.n3 --n3 http://josd.github.io/eye/reasoning/h2o/rules-001.n3 --query http://josd.github.io/eye/reasoning/h2o/query-001.n3
PREFIX h: <http://josd.github.io/eye/reasoning/h2o#>
......@@ -58,6 +58,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/h2o/rules-001.n3>].
#2019-01-19T23:06:40.776Z in=10 out=1 ent=6 step=12 brake=2 inf=31708 sec=0.044 inf/sec=720636
#2019-02-21T20:24:10.054Z in=10 out=1 ent=6 step=12 brake=2 inf=31906 sec=0.040 inf/sec=797650
#ENDS
#Processed by EYE v19.0116.1239 josd
#Processed by EYE v19.0202.2255 josd
#eye --tactic limited-answer 1 --n3 http://josd.github.io/eye/reasoning/hanoi/hanoi.n3 --pass
# Move top disk from <http://josd.github.io/eye/reasoning#left> to <http://josd.github.io/eye/reasoning#right>
......@@ -149,6 +149,6 @@ PREFIX r: <http://www.w3.org/2000/10/swap/reason#>
};
r:because [ a r:Parsing; r:source <http://josd.github.io/eye/reasoning/hanoi/hanoi.n3>].
#2019-01-19T23:06:40.965Z in=3 out=1 ent=2 step=2 brake=1 inf=39846 sec=0.034 inf/sec=1171941
#2019-02-21T20:24:10.149Z in=3 out=1 ent=2 step=2 brake=1 inf=40043 sec=0.037 inf/sec=1082243
#ENDS