From 4a9de0d4f6cb6567690b72cd5e892d34abc68376 Mon Sep 17 00:00:00 2001 From: josd Date: Mon, 28 Oct 2024 11:18:44 +0100 Subject: [PATCH] refreshing --- reasoning/rdflogic/README | 55 ------ reasoning/rdflogic/ackermann.trig | 118 ------------ reasoning/rdflogic/acp.trig | 89 --------- reasoning/rdflogic/age.trig | 38 ---- reasoning/rdflogic/backward.trig | 29 --- reasoning/rdflogic/cobbler.trig | 20 -- reasoning/rdflogic/color.trig | 90 --------- reasoning/rdflogic/complement.trig | 77 -------- reasoning/rdflogic/complex.trig | 174 ----------------- reasoning/rdflogic/control.trig | 93 --------- reasoning/rdflogic/derived.trig | 39 ---- reasoning/rdflogic/easter.trig | 68 ------- reasoning/rdflogic/equality.trig | 36 ---- reasoning/rdflogic/fibonacci.trig | 59 ------ reasoning/rdflogic/filter.trig | 31 --- reasoning/rdflogic/gcc.trig | 106 ----------- reasoning/rdflogic/gps.trig | 220 ---------------------- reasoning/rdflogic/graph.trig | 51 ----- reasoning/rdflogic/hanoi.trig | 40 ---- reasoning/rdflogic/issue118.trig | 44 ----- reasoning/rdflogic/mapping.trig | 31 --- reasoning/rdflogic/mi.trig | 130 ------------- reasoning/rdflogic/output/ackermann.trig | 13 -- reasoning/rdflogic/output/acp.trig | 4 - reasoning/rdflogic/output/age.trig | 4 - reasoning/rdflogic/output/backward.trig | 4 - reasoning/rdflogic/output/cobbler.trig | 3 - reasoning/rdflogic/output/color.trig | 3 - reasoning/rdflogic/output/complement.trig | 9 - reasoning/rdflogic/output/complex.trig | 8 - reasoning/rdflogic/output/control.trig | 4 - reasoning/rdflogic/output/derived.trig | 3 - reasoning/rdflogic/output/easter.trig | 30 --- reasoning/rdflogic/output/equality.trig | 3 - reasoning/rdflogic/output/fibonacci.trig | 9 - reasoning/rdflogic/output/filter.trig | 3 - reasoning/rdflogic/output/gcc.trig | 3 - reasoning/rdflogic/output/gps.trig | 5 - reasoning/rdflogic/output/graph.trig | 6 - reasoning/rdflogic/output/hanoi.trig | 3 - reasoning/rdflogic/output/issue118.trig | 3 - reasoning/rdflogic/output/mapping.trig | 6 - reasoning/rdflogic/output/mi.trig | 3 - reasoning/rdflogic/output/patch.trig | 6 - reasoning/rdflogic/output/peano.trig | 3 - reasoning/rdflogic/output/pi.trig | 3 - reasoning/rdflogic/output/qiana.trig | 18 -- reasoning/rdflogic/output/queens.trig | 95 ---------- reasoning/rdflogic/output/restdesc.trig | 3 - reasoning/rdflogic/output/sha512.trig | 4 - reasoning/rdflogic/output/slide32.trig | 3 - reasoning/rdflogic/output/slide33.trig | 3 - reasoning/rdflogic/output/snaf.trig | 3 - reasoning/rdflogic/output/socrates.trig | 3 - reasoning/rdflogic/output/statement.trig | 22 --- reasoning/rdflogic/output/tak.trig | 3 - reasoning/rdflogic/output/turing.trig | 6 - reasoning/rdflogic/output/union.trig | 10 - reasoning/rdflogic/output/universal.trig | 7 - reasoning/rdflogic/output/water.trig | 3 - reasoning/rdflogic/patch.trig | 41 ---- reasoning/rdflogic/peano.trig | 85 --------- reasoning/rdflogic/pi.trig | 55 ------ reasoning/rdflogic/qiana.trig | 60 ------ reasoning/rdflogic/queens.trig | 117 ------------ reasoning/rdflogic/restdesc.trig | 182 ------------------ reasoning/rdflogic/sha512.trig | 23 --- reasoning/rdflogic/slide32.trig | 33 ---- reasoning/rdflogic/slide33.trig | 84 --------- reasoning/rdflogic/snaf.trig | 34 ---- reasoning/rdflogic/socrates.trig | 33 ---- reasoning/rdflogic/statement.trig | 33 ---- reasoning/rdflogic/tak.trig | 50 ----- reasoning/rdflogic/test | 46 ----- reasoning/rdflogic/turing.trig | 155 --------------- reasoning/rdflogic/union.trig | 31 --- reasoning/rdflogic/universal.trig | 50 ----- reasoning/rdflogic/water.trig | 73 ------- 78 files changed, 3147 deletions(-) delete mode 100644 reasoning/rdflogic/README delete mode 100644 reasoning/rdflogic/ackermann.trig delete mode 100644 reasoning/rdflogic/acp.trig delete mode 100644 reasoning/rdflogic/age.trig delete mode 100644 reasoning/rdflogic/backward.trig delete mode 100644 reasoning/rdflogic/cobbler.trig delete mode 100644 reasoning/rdflogic/color.trig delete mode 100644 reasoning/rdflogic/complement.trig delete mode 100644 reasoning/rdflogic/complex.trig delete mode 100644 reasoning/rdflogic/control.trig delete mode 100644 reasoning/rdflogic/derived.trig delete mode 100644 reasoning/rdflogic/easter.trig delete mode 100644 reasoning/rdflogic/equality.trig delete mode 100644 reasoning/rdflogic/fibonacci.trig delete mode 100644 reasoning/rdflogic/filter.trig delete mode 100644 reasoning/rdflogic/gcc.trig delete mode 100644 reasoning/rdflogic/gps.trig delete mode 100644 reasoning/rdflogic/graph.trig delete mode 100644 reasoning/rdflogic/hanoi.trig delete mode 100644 reasoning/rdflogic/issue118.trig delete mode 100644 reasoning/rdflogic/mapping.trig delete mode 100644 reasoning/rdflogic/mi.trig delete mode 100644 reasoning/rdflogic/output/ackermann.trig delete mode 100644 reasoning/rdflogic/output/acp.trig delete mode 100644 reasoning/rdflogic/output/age.trig delete mode 100644 reasoning/rdflogic/output/backward.trig delete mode 100644 reasoning/rdflogic/output/cobbler.trig delete mode 100644 reasoning/rdflogic/output/color.trig delete mode 100644 reasoning/rdflogic/output/complement.trig delete mode 100644 reasoning/rdflogic/output/complex.trig delete mode 100644 reasoning/rdflogic/output/control.trig delete mode 100644 reasoning/rdflogic/output/derived.trig delete mode 100644 reasoning/rdflogic/output/easter.trig delete mode 100644 reasoning/rdflogic/output/equality.trig delete mode 100644 reasoning/rdflogic/output/fibonacci.trig delete mode 100644 reasoning/rdflogic/output/filter.trig delete mode 100644 reasoning/rdflogic/output/gcc.trig delete mode 100644 reasoning/rdflogic/output/gps.trig delete mode 100644 reasoning/rdflogic/output/graph.trig delete mode 100644 reasoning/rdflogic/output/hanoi.trig delete mode 100644 reasoning/rdflogic/output/issue118.trig delete mode 100644 reasoning/rdflogic/output/mapping.trig delete mode 100644 reasoning/rdflogic/output/mi.trig delete mode 100644 reasoning/rdflogic/output/patch.trig delete mode 100644 reasoning/rdflogic/output/peano.trig delete mode 100644 reasoning/rdflogic/output/pi.trig delete mode 100644 reasoning/rdflogic/output/qiana.trig delete mode 100644 reasoning/rdflogic/output/queens.trig delete mode 100644 reasoning/rdflogic/output/restdesc.trig delete mode 100644 reasoning/rdflogic/output/sha512.trig delete mode 100644 reasoning/rdflogic/output/slide32.trig delete mode 100644 reasoning/rdflogic/output/slide33.trig delete mode 100644 reasoning/rdflogic/output/snaf.trig delete mode 100644 reasoning/rdflogic/output/socrates.trig delete mode 100644 reasoning/rdflogic/output/statement.trig delete mode 100644 reasoning/rdflogic/output/tak.trig delete mode 100644 reasoning/rdflogic/output/turing.trig delete mode 100644 reasoning/rdflogic/output/union.trig delete mode 100644 reasoning/rdflogic/output/universal.trig delete mode 100644 reasoning/rdflogic/output/water.trig delete mode 100644 reasoning/rdflogic/patch.trig delete mode 100644 reasoning/rdflogic/peano.trig delete mode 100644 reasoning/rdflogic/pi.trig delete mode 100644 reasoning/rdflogic/qiana.trig delete mode 100644 reasoning/rdflogic/queens.trig delete mode 100644 reasoning/rdflogic/restdesc.trig delete mode 100644 reasoning/rdflogic/sha512.trig delete mode 100644 reasoning/rdflogic/slide32.trig delete mode 100644 reasoning/rdflogic/slide33.trig delete mode 100644 reasoning/rdflogic/snaf.trig delete mode 100644 reasoning/rdflogic/socrates.trig delete mode 100644 reasoning/rdflogic/statement.trig delete mode 100644 reasoning/rdflogic/tak.trig delete mode 100755 reasoning/rdflogic/test delete mode 100644 reasoning/rdflogic/turing.trig delete mode 100644 reasoning/rdflogic/union.trig delete mode 100644 reasoning/rdflogic/universal.trig delete mode 100644 reasoning/rdflogic/water.trig diff --git a/reasoning/rdflogic/README b/reasoning/rdflogic/README deleted file mode 100644 index 8101fcf4f..000000000 --- a/reasoning/rdflogic/README +++ /dev/null @@ -1,55 +0,0 @@ ---------- -RDF Logic ---------- - -RDF Logic supports reasoning with forward rules described in RDF as - - _:bng_1 log:implies _:bng_2. - - _:bng_1 { - RDF triples - } - - _:bng_2 { - RDF triples - } - -RDF Logic supports reasoning with backward rules described in RDF as - - _:bng_1 log:isImpliedBy _:bng_2. - - _:bng_1 { - RDF triple - } - - _:bng_2 { - RDF triples - } - -RDF Logic supports querying with queries described in RDF as - - _:bng_1 log:query _:bng_2. - - _:bng_1 { - RDF triples - } - - _:bng_2 { - RDF triples - } - -RDF Logic supports reasoning with rdfsurfaces described in RDF as - - ( graffiti ) log:onNegativeSurface _:bng_1. - - _:bng_1 { - RDF triples - } - -The var: prefix is and is used for -variables that are interpreted as universally quantified variables except for -forward rule conclusion-only variables which are interpreted existentially. - -Literal subjects are described as - - [] rdf:value "aha"; :p :o. diff --git a/reasoning/rdflogic/ackermann.trig b/reasoning/rdflogic/ackermann.trig deleted file mode 100644 index 8e8a49926..000000000 --- a/reasoning/rdflogic/ackermann.trig +++ /dev/null @@ -1,118 +0,0 @@ -# ------------------ -# Ackermann function -# ------------------ -# -# The Ackermann function, holds paramount significance in theoretical -# computer science and computability theory. Formulated by Wilhelm -# Ackermann, it stands as a fundamental example illustrating functions -# that transcend primitive recursion, showcasing the existence of -# computable problems that defy conventional algorithmic approaches. -# Its rapid growth, even for small inputs, makes it a powerful tool in -# complexity theory, establishing lower bounds on computational -# complexity and emphasizing the inherent challenges in designing -# efficient algorithms for certain problems. The Ackermann function’s -# prominence extends to symbolize the limits of computability, playing -# a crucial role in delineating what can and cannot be algorithmically -# computed within the theoretical realms of computer science. -# -# One can see the rapid growth in -# https://github.com/eyereasoner/eye/blob/master/reasoning/ackermann/ackermann-answer.n3 -# where A(4,0) has a value of 2 digits, A(4,1) has a value of 5 digits -# and A(4,2) has a value of 19729 digits. - -@prefix rdf: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# ackermann(x, y) -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - (var:X var:Y) :ackermann var:A. -} - -_:bng_2 { - (var:Y 3) math:sum var:B. - (var:X var:B 2) :ackermann var:C. - (var:C 3) math:difference var:A. -} - -# ackermann(x, y, z) -# succ (x=0) -_:bng_3 log:isImpliedBy _:bng_4. - -_:bng_3 { - (0 var:Y var:Z) :ackermann var:A. -} - -_:bng_4 { - [] rdf:value true; log:callWithCut true. - (var:Y 1) math:sum var:A. -} - -# sum (x=1) -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (1 var:Y var:Z) :ackermann var:A. -} - -_:bng_6 { - [] rdf:value true; log:callWithCut true. - (var:Y var:Z) math:sum var:A. -} - -# product (x=2) -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - (2 var:Y var:Z) :ackermann var:A. -} - -_:bng_8 { - [] rdf:value true; log:callWithCut true. - (var:Y var:Z) math:product var:A. -} - -# exponentiation (x=3), tetration (x=4), pentation (x=5), hexation (x=6), etc -_:bng_9 log:isImpliedBy _:bng_10. - -_:bng_9 { - (var:X 0 var:Z) :ackermann 1. -} - -_:bng_10 { - [] rdf:value true; log:callWithCut true. -} - -_:bng_11 log:isImpliedBy _:bng_12. - -_:bng_11 { - (var:X var:Y var:Z) :ackermann var:A. -} - -_:bng_12 { - (var:Y 1) math:difference var:B. - (var:X var:B var:Z) :ackermann var:C. - (var:X 1) math:difference var:D. - (var:D var:C var:Z) :ackermann var:A. -} - -# query -_:bng_14 log:query _:bng_14. - -_:bng_14 { - (0 0) :ackermann var:A0. - (0 6) :ackermann var:A1. - (1 2) :ackermann var:A2. - (1 7) :ackermann var:A3. - (2 2) :ackermann var:A4. - (2 9) :ackermann var:A5. - (3 4) :ackermann var:A6. - (3 14) :ackermann var:A7. - (4 0) :ackermann var:A8. - (4 1) :ackermann var:A9. - (4 2) :ackermann var:A10. -} diff --git a/reasoning/rdflogic/acp.trig b/reasoning/rdflogic/acp.trig deleted file mode 100644 index 376301349..000000000 --- a/reasoning/rdflogic/acp.trig +++ /dev/null @@ -1,89 +0,0 @@ -# ----------------------------- -# Access control policy example -# ----------------------------- - -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -:test1 :policy :PolicyX; - :has :A, :B, :C. - -:PolicyX a :Policy; - :allOf :A, :B; - :anyOf :C; - :noneOf :D. - -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:Pol :pass :allOfTest. -} - -_:bng_2 { - var:Test :policy var:Pol. - var:Pol a :Policy. - (_:bng_3 _:bng_4) log:forAllIn var:X. -} - -_:bng_3 { - var:Pol :allOf var:Field. -} - -_:bng_4 { - var:Test :has var:Field. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - var:Pol :pass :anyOfTest. -} - -_:bng_6 { - var:Test :policy var:Pol. - var:Pol a :Policy. - (var:Field _:bng_7 var:List) log:collectAllIn var:X. - var:List list:length var:L. - (var:L) log:notEqualTo (0). -} - -_:bng_7 { - var:Pol :anyOf var:Field. - var:Test :has var:Field. -} - -_:bng_8 log:isImpliedBy _:bng_9. - -_:bng_8 { - var:Pol :pass :noneOfTest. -} - -_:bng_9 { - var:Test :policy var:Pol. - var:Pol a :Policy. - (var:Field _:bng_10 var:List) log:collectAllIn var:X. - var:List list:length var:L. - (var:L) log:equalTo (0). -} - -_:bng_10 { - var:Pol :noneOf var:Field. - var:Test :has var:Field. -} - -# query -_:bng_11 log:query _:bng_12. - -_:bng_11 { - var:Pol a :Policy. - var:Pol :pass :allOfTest. - var:Pol :pass :anyOfTest. - var:Pol :pass :noneOfTest. -} - -_:bng_12 { - :test :for var:Pol. - :test :is true. -} diff --git a/reasoning/rdflogic/age.trig b/reasoning/rdflogic/age.trig deleted file mode 100644 index 03be36a70..000000000 --- a/reasoning/rdflogic/age.trig +++ /dev/null @@ -1,38 +0,0 @@ -# ----------- -# Age checker -# ----------- -# -# Is the age of a person above some duration? - -@prefix rdf: . -@prefix xsd: . -@prefix time: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# person data -:patH :birthDay "1944-08-21"^^xsd:date. - -# is the age of a person above some duration? -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:S :ageAbove var:A. -} - -_:bng_2 { - var:S :birthDay var:B. - #[] rdf:value ""; time:localTime var:D. - var:D log:equalTo "2024-08-21T00:00:00.0Z"^^xsd:dateTime. - (var:D var:B) math:difference var:F. - var:F math:greaterThan var:A. -} - -# query -_:bng_3 log:query _:bng_3. - -_:bng_3 { - var:S :ageAbove "P80Y"^^xsd:duration. -} diff --git a/reasoning/rdflogic/backward.trig b/reasoning/rdflogic/backward.trig deleted file mode 100644 index e7743b337..000000000 --- a/reasoning/rdflogic/backward.trig +++ /dev/null @@ -1,29 +0,0 @@ -# --------------------- -# Backward rule example -# --------------------- -# -# See https://www.w3.org/2000/10/swap/doc/tutorial-1.pdf page 17 - -@prefix rdf: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# something is more interesting if it is greater -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:X :moreInterestingThan var:Y. -} - -_:bng_2 { - var:X math:greaterThan var:Y. -} - -# query -_:bng_3 log:query _:bng_3. - -_:bng_3 { - [] rdf:value 5; :moreInterestingThan 3. -} diff --git a/reasoning/rdflogic/cobbler.trig b/reasoning/rdflogic/cobbler.trig deleted file mode 100644 index 91734c148..000000000 --- a/reasoning/rdflogic/cobbler.trig +++ /dev/null @@ -1,20 +0,0 @@ -# ------------ -# Good Cobbler -# ------------ -# -# Example from https://shs.hal.science/halshs-04148373/document -# Using functional logic http://intrologic.stanford.edu/chapters/chapter_11.html - -@prefix log: . -@prefix var: . -@prefix : . - -# some x is a good cobbler -_:x :is (:good :Cobbler). - -# is there some x which is good at some y -_:bng_1 log:query _:bng_1. - -_:bng_1 { - var:x :is (:good var:y). -} diff --git a/reasoning/rdflogic/color.trig b/reasoning/rdflogic/color.trig deleted file mode 100644 index 7433dcd6d..000000000 --- a/reasoning/rdflogic/color.trig +++ /dev/null @@ -1,90 +0,0 @@ -# ------------ -# 4 Color test -# ------------ -# -# See https://en.wikipedia.org/wiki/Four_color_theorem - -@prefix rdf: . -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -# map of European Union -:Austria :neighbours (:Czech_Republic :Germany :Hungary :Italy :Slovenia :Slovakia). -:Belgium :neighbours (:France :Netherlands :Luxemburg :Germany :United_Kingdom). -:Bulgaria :neighbours (:Romania :Greece). -:Croatia :neighbours (:Slovenia :Hungary). -:Cyprus :neighbours (:Greece). -:Czech_Republic :neighbours (:Germany :Poland :Slovakia :Austria). -:Denmark :neighbours (:Germany :Sweden). -:Estonia :neighbours (:Finland :Latvia :Lithuania). -:Finland :neighbours (:Estonia :Sweden). -:France :neighbours (:Spain :Belgium :Luxemburg :Germany :Italy :United_Kingdom). -:Germany :neighbours (:Netherlands :Belgium :Luxemburg :Denmark :France :Austria :Poland :Czech_Republic). -:Greece :neighbours (:Bulgaria :Cyprus). -:Hungary :neighbours (:Austria :Slovakia :Romania :Croatia :Slovenia). -:Ireland :neighbours (:United_Kingdom). -:Italy :neighbours (:France :Austria :Slovenia). -:Latvia :neighbours (:Estonia :Lithuania). -:Lithuania :neighbours (:Estonia :Latvia :Poland). -:Luxemburg :neighbours (:Belgium :France :Germany). -:Malta :neighbours (). -:Netherlands :neighbours (:Belgium :Germany :United_Kingdom). -:Poland :neighbours (:Germany :Czech_Republic :Slovakia :Lithuania). -:Portugal :neighbours (:Spain). -:Romania :neighbours (:Hungary :Bulgaria). -:Slovakia :neighbours (:Czech_Republic :Poland :Hungary :Austria). -:Slovenia :neighbours (:Austria :Italy :Hungary :Croatia). -:Spain :neighbours (:France :Portugal). -:Sweden :neighbours (:Finland :Denmark). -:United_Kingdom :neighbours (:Ireland :Netherlands :Belgium :France). - -# rules -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:MAP :color var:PLACES. -} - -_:bng_2 { - ((var:PLACE var:X) _:bng_3 var:PLACES) log:collectAllIn var:SCOPE. - var:PLACES :places true. - [] rdf:value true; log:callWithCut true. -} - -_:bng_3 { - var:PLACE :neighbours var:Y. -} - -_:bng_4 log:isImpliedBy true. - -_:bng_4 { - () :places true. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - var:PLACES :places true. -} - -_:bng_6 { - var:PLACES list:firstRest ((var:PLACE var:COLOR) var:TAIL). - var:TAIL :places true. - var:PLACE :neighbours var:NEIGHBOURS. - (:red :green :blue :yellow) list:member var:COLOR. - (1 _:bng_7 ()) log:collectAllIn var:SCOPE. -} - -_:bng_7 { - var:TAIL list:member (var:NEIGHBOUR var:COLOR). - var:NEIGHBOURS list:member var:NEIGHBOUR. -} - -# query -_:bng_8 log:query _:bng_8. - -_:bng_8 { - :mapEU :color var:PLACES. -} diff --git a/reasoning/rdflogic/complement.trig b/reasoning/rdflogic/complement.trig deleted file mode 100644 index 80e37cde6..000000000 --- a/reasoning/rdflogic/complement.trig +++ /dev/null @@ -1,77 +0,0 @@ -# ---------------------------------------- -# Negation as envisioned by Wouter Termont -# ---------------------------------------- - -@prefix var: . -@prefix log: . -@prefix : . - -# Each predicate in RDF represents a binary relation, i.e. a set of 2-tuples. -# For each of those relations you can formulate exactly one complementary -# relation, which contains exactly the pairs of elements that are not in the -# original set (from this follows LEM). If we represent the relationship -# between these complements by a predicate, e.g. log:complement, then we -# can express the following in pure RDF -# -# NOT { -# _:s1 :p1 _:o1. -# _:s2 :p2 _:o2. -# _:s3 :p3 _:o3. -# } - -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - _:s1 :p1 _:o1. - _:s2 :p2 _:o2. -} - -_:bng_2 { - :c3 log:complement :p3. - _:s3 :c3 _:o3. -} - -_:bng_3 log:implies _:bng_4. - -_:bng_3 { - _:s2 :p2 _:o2. - _:s3 :p3 _:o3. -} - -_:bng_4 { - :c1 log:complement :p1. - _:s1 :c1 _:o1. -} - -_:bng_5 log:implies _:bng_6. - -_:bng_5 { - _:s3 :p3 _:o3. - _:s1 :p1 _:o1. -} - -_:bng_6 { - :c2 log:complement :p2. - _:s2 :c2 _:o2. -} - -# asserting the following should blow an inference fuse -# _:s1 :p1 _:o1. -# _:s2 :p2 _:o2. -# _:s3 :p3 _:o3. - -# fuse -_:bng_7 log:implies false. - -_:bng_7 { - var:P log:complement var:C. - var:S var:P var:O. - var:S var:C var:O. -} - -# query -_:bng_8 log:query _:bng_8. - -_:bng_8 { - _:bng_7 log:implies false. -} diff --git a/reasoning/rdflogic/complex.trig b/reasoning/rdflogic/complex.trig deleted file mode 100644 index 042dcded6..000000000 --- a/reasoning/rdflogic/complex.trig +++ /dev/null @@ -1,174 +0,0 @@ -# --------------- -# Complex numbers -# --------------- -# -# See https://en.wikipedia.org/wiki/Complex_number. - -@prefix xsd: . -@prefix math: . -@prefix complex: . -@prefix log: . -@prefix var: . -@prefix : . - -# exponentiation -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - ((var:A var:B) (var:C var:D)) complex:exponentiation (var:E var:F). -} - -_:bng_2 { - (var:A var:B) complex:polar (var:R var:T). - (var:R var:C) math:exponentiation var:Z1. - var:D math:negation var:Z2. - (var:Z2 var:T) math:product var:Z3. - (2.718281828459045 var:Z3) math:exponentiation var:Z4. - (2.718281828459045 var:Z5) math:exponentiation var:R. - (var:D var:Z5) math:product var:Z6. - (var:C var:T) math:product var:Z7. - (var:Z6 var:Z7) math:sum var:Z8. - var:Z8 math:cos var:Z9. - (var:Z1 var:Z4 var:Z9) math:product var:E. - var:Z8 math:sin var:Z10. - (var:Z1 var:Z4 var:Z10) math:product var:F. -} - -# asin -_:bng_3 log:isImpliedBy _:bng_4. - -_:bng_3 { - (var:A var:B) complex:asin (var:C var:D). -} - -_:bng_4 { - (1 var:A) math:sum var:Z1. - (var:Z1 2) math:exponentiation var:Z2. - (var:B 2) math:exponentiation var:Z3. - (var:Z2 var:Z3) math:sum var:Z4. - (var:Z4 0.5) math:exponentiation var:Z5. - (1 var:A) math:difference var:Z6. - (var:Z6 2) math:exponentiation var:Z7. - (var:Z7 var:Z3) math:sum var:Z8. - (var:Z8 0.5) math:exponentiation var:Z9. - (var:Z5 var:Z9) math:difference var:Z10. - (var:Z10 2) math:quotient var:E. - (var:Z5 var:Z9) math:sum var:Z11. - (var:Z11 2) math:quotient var:F. - var:E math:asin var:C. - (var:F 2) math:exponentiation var:Z12. - (var:Z12 1) math:difference var:Z13. - (var:Z13 0.5) math:exponentiation var:Z14. - (var:F var:Z14) math:sum var:Z15. - (2.718281828459045 var:D) math:exponentiation var:Z15. -} - -# acos -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (var:A var:B) complex:acos (var:C var:D). -} - -_:bng_6 { - (1 var:A) math:sum var:Z1. - (var:Z1 2) math:exponentiation var:Z2. - (var:B 2) math:exponentiation var:Z3. - (var:Z2 var:Z3) math:sum var:Z4. - (var:Z4 0.5) math:exponentiation var:Z5. - (1 var:A) math:difference var:Z6. - (var:Z6 2) math:exponentiation var:Z7. - (var:Z7 var:Z3) math:sum var:Z8. - (var:Z8 0.5) math:exponentiation var:Z9. - (var:Z5 var:Z9) math:difference var:Z10. - (var:Z10 2) math:quotient var:E. - (var:Z5 var:Z9) math:sum var:Z11. - (var:Z11 2) math:quotient var:F. - var:E math:acos var:C. - (var:F 2) math:exponentiation var:Z12. - (var:Z12 1) math:difference var:Z13. - (var:Z13 0.5) math:exponentiation var:Z14. - (var:F var:Z14) math:sum var:Z15. - (2.718281828459045 var:U) math:exponentiation var:Z15. - var:U math:negation var:D. -} - -# polar -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - (var:X var:Y) complex:polar(var:R var:Tp). -} - -_:bng_8 { - (var:X 2) math:exponentiation var:Z1. - (var:Y 2) math:exponentiation var:Z2. - (var:Z1 var:Z2) math:sum var:Z3. - (var:Z3 0.5) math:exponentiation var:R. - var:X math:absoluteValue var:Z4. - (var:Z4 var:R) math:quotient var:Z5. - var:Z5 math:acos var:T. - (var:X var:Y var:T) complex:dial var:Tp. -} - -# dial -_:bng_9 log:isImpliedBy _:bng_10. - -_:bng_9 { - (var:X var:Y var:T) complex:dial var:Tp. -} - -_:bng_10 { - var:X math:notLessThan 0. - var:Y math:notLessThan 0. - (0 var:T) math:sum var:Tp. -} - -_:bng_11 log:isImpliedBy _:bng_12. - -_:bng_11 { - (var:X var:Y var:T) complex:dial var:Tp. -} - -_:bng_12 { - var:X math:lessThan 0. - var:Y math:notLessThan 0. - (3.141592653589793 var:T) math:difference var:Tp. -} - -_:bng_13 log:isImpliedBy _:bng_14. - -_:bng_13 { - (var:X var:Y var:T) complex:dial var:Tp. -} - -_:bng_14 { - var:X math:lessThan 0. - var:Y math:lessThan 0. - (3.141592653589793 var:T) math:sum var:Tp. -} - -_:bng_15 log:isImpliedBy _:bng_16. - -_:bng_15 { - (var:X var:Y var:T) complex:dial var:Tp. -} - -_:bng_16 { - var:X math:notLessThan 0. - var:Y math:lessThan 0. - (3.141592653589793 2) math:product var:Z1. - (var:Z1 var:T) math:difference var:Tp. -} - -# query -_:bng_17 log:query _:bng_17. - -_:bng_17 { - ((-1 0) (0.5 0)) complex:exponentiation var:C1. - ((2.718281828459045 0) (0 3.141592653589793)) complex:exponentiation var:C2. - ((0 1) (0 1)) complex:exponentiation var:C3. - ((2.718281828459045 0) (-1.57079632679 0)) complex:exponentiation var:C4. - (2 0) complex:asin var:C5. - (2 0) complex:acos var:C6. -} diff --git a/reasoning/rdflogic/control.trig b/reasoning/rdflogic/control.trig deleted file mode 100644 index 519883c10..000000000 --- a/reasoning/rdflogic/control.trig +++ /dev/null @@ -1,93 +0,0 @@ -# --------------- -# Control Systems -# --------------- - -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# input -:input1 :measurement1 (6 11). -:input2 :measurement2 true. -:input3 :measurement3 56967. - -# disturbance -:disturbance1 :measurement3 35766. -:disturbance2 :measurement1 (45 39). - -# state -:state1 :observation1 80. -:state2 :observation2 false. -:state3 :observation3 22. - -# output -:output2 :measurement4 24. -:output2 :target2 29. - -# forward rules -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - :input1 :measurement10 var:M1. - :input2 :measurement2 true. - :disturbance1 :measurement3 var:D1. - (var:M1 19.6) math:product var:C1. # proportial part - (10 var:C2) math:exponentiation var:D1. # compensation part - (var:C1 var:C2) math:difference var:C. # simple feedforward control -} - -_:bng_2 { - :actuator1 :control1 var:C. -} - -_:bng_3 log:implies _:bng_4. - -_:bng_3 { - :input3 :measurement3 var:M3. - :state3 :observation3 var:P3. - :output2 :measurement4 var:M4. - :output2 :target2 var:T2. - (var:T2 var:M4) math:difference var:E. # error - (var:P3 var:M4) math:difference var:D. # differential error - (5.8 var:E) math:product var:C1. # proportial part - (7.3 var:E) math:quotient var:N. # nonlinear factor - (var:N var:D) math:product var:C2. # nonlinear differential part - (var:C1 var:C2) math:sum var:C. # PND feedback control -} - -_:bng_4 { - :actuator2 :control1 var:C. -} - -# backward rules -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - var:I :measurement10 var:M. -} - -_:bng_6 { - var:I :measurement1 (var:M1 var:M2). - var:M1 math:lessThan var:M2. - (var:M2 var:M1) math:difference var:M3. - (var:M3 0.5) math:exponentiation var:M. -} - -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - var:I :measurement10 var:M1. -} - -_:bng_8 { - var:I :measurement1 (var:M1 var:M2). - var:M1 math:notLessThan var:M2. -} - -# query -_:bng_9 log:query _:bng_9. - -_:bng_9 { - var:O :control1 var:C. -} diff --git a/reasoning/rdflogic/derived.trig b/reasoning/rdflogic/derived.trig deleted file mode 100644 index 1735a456d..000000000 --- a/reasoning/rdflogic/derived.trig +++ /dev/null @@ -1,39 +0,0 @@ -# ------------ -# Derived rule -# ------------ -# -# Proving a derived rule. - -@prefix string: . -@prefix log: . -@prefix var: . -@prefix : . - -:Alice a :Cat. -:Minka a :Cat. -:Charly a :Dog. - -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:cat a :Cat. -} - -_:bng_2 { - _:bng_3 log:implies _:bng_4. -} - -_:bng_3 { - var:dog a :Dog. -} - -_:bng_4 { - :test :is true. -} - -# query -_:bng_5 log:query _:bng_5. - -_:bng_5 { - :test :is var:result. -} diff --git a/reasoning/rdflogic/easter.trig b/reasoning/rdflogic/easter.trig deleted file mode 100644 index ab51ff7e6..000000000 --- a/reasoning/rdflogic/easter.trig +++ /dev/null @@ -1,68 +0,0 @@ -# ---------- -# Easter day -# ---------- -# -# See https://en.wikipedia.org/wiki/Date_of_Easter - -@prefix rdf: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# calculate easter day -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:x0 :easter (var:x34 var:x32). -} - -_:bng_2 { - (var:x0 19) math:remainder var:x1. - (var:x0 100) math:integerQuotient var:x2. - (var:x0 100) math:remainder var:x3. - (var:x2 4) math:integerQuotient var:x4. - (var:x2 4) math:remainder var:x5. - (var:x2 8) math:sum var:x6. - (var:x6 25) math:integerQuotient var:x7. - (var:x2 var:x7) math:difference var:x8. - (var:x8 1) math:sum var:x9. - (var:x9 3) math:integerQuotient var:x10. - (19 var:x1) math:product var:x11. - (var:x11 var:x2) math:sum var:x12. - (var:x12 var:x4) math:difference var:x13. - (var:x13 var:x10) math:difference var:x14. - (var:x14 15) math:sum var:x15. - (var:x15 30) math:remainder var:x16. - (var:x3 4) math:integerQuotient var:x17. - (var:x3 4) math:remainder var:x18. - (2 var:x5) math:product var:x19. - (2 var:x17) math:product var:x20. - var:x16 math:negation var:x21. - var:x18 math:negation var:x22. - (32 var:x19 var:x20 var:x21 var:x22) math:sum var:x23. - (var:x23 7) math:remainder var:x24. - (11 var:x16) math:product var:x25. - (22 var:x24) math:product var:x26. - (var:x1 var:x25 var:x26) math:sum var:x27. - (var:x27 451) math:integerQuotient var:x28. - (7 var:x28) math:product var:x29. - var:x29 math:negation var:x30. - (var:x16 var:x24 var:x30 114) math:sum var:x31. - (var:x31 31) math:integerQuotient var:x32. - (var:x31 31) math:remainder var:x33. - (var:x33 1) math:sum var:x34. -} - -# query -_:bng_3 log:query _:bng_4. - -_:bng_3 { - [] rdf:value 27; log:repeat var:x0. - (2024 var:x0) math:sum var:x1. - var:x1 :easter (var:x2 var:x3). -} - -_:bng_4 { - var:x1 :easter (var:x2 var:x3). -} diff --git a/reasoning/rdflogic/equality.trig b/reasoning/rdflogic/equality.trig deleted file mode 100644 index 3fb456c34..000000000 --- a/reasoning/rdflogic/equality.trig +++ /dev/null @@ -1,36 +0,0 @@ -# ---------------------- -# Graph equality example -# ---------------------- - -@prefix log: . -@prefix var: . -@prefix : . - -_:bng_1 { - :A :B :C. - :D :E _:bng_2. -} - -_:bng_2 { - :F :G var:H. -} - -_:bng_3 { - :D :E _:bng_4. - :A :B :C. -} - -_:bng_4 { - :F :G var:I. -} - -#query -_:bng_5 log:query _:bng_6. - -_:bng_5 { - _:bng_1 log:equalTo _:bng_3. -} - -_:bng_6 { - :test :is true. -} diff --git a/reasoning/rdflogic/fibonacci.trig b/reasoning/rdflogic/fibonacci.trig deleted file mode 100644 index 6faef5237..000000000 --- a/reasoning/rdflogic/fibonacci.trig +++ /dev/null @@ -1,59 +0,0 @@ -# ----------------- -# Fibonacci numbers -# ----------------- -# -# See https://en.wikipedia.org/wiki/Fibonacci_number - -@prefix rdf: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# backward rules -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:X :fibonacci var:Y. -} - -_:bng_2 { - (var:X 0 1) :fib var:Y. -} - -_:bng_3 log:isImpliedBy true. - -_:bng_3 { - (0 var:A var:B) :fib var:A. -} - -_:bng_4 log:isImpliedBy true. - -_:bng_4 { - (1 var:A var:B) :fib var:B. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (var:X var:A var:B) :fib var:Y. -} - -_:bng_6 { - var:X math:greaterThan 1. - (var:X 1) math:difference var:C. - (var:A var:B) math:sum var:D. - (var:C var:B var:D) :fib var:Y. -} - -# query -_:bng_7 log:query _:bng_7. - -_:bng_7 { - [] rdf:value 0; :fibonacci var:F1. - [] rdf:value 1; :fibonacci var:F2. - [] rdf:value 6; :fibonacci var:F3. - [] rdf:value 91; :fibonacci var:F4. - [] rdf:value 283; :fibonacci var:F5. - [] rdf:value 3674; :fibonacci var:F6. -} diff --git a/reasoning/rdflogic/filter.trig b/reasoning/rdflogic/filter.trig deleted file mode 100644 index 5a57d55c2..000000000 --- a/reasoning/rdflogic/filter.trig +++ /dev/null @@ -1,31 +0,0 @@ -# ------------ -# Filter query -# ------------ - -@prefix list: . -@prefix string: . -@prefix log: . -@prefix var: . -@prefix : . - -# facts -:Let :param "Huey". -:Let :param "Dewey". -:Let :param "Louie". - -# query -_:bng_1 log:query _:bng_2. - -_:bng_1 { - (var:param _:bng_3 var:filteredParams) log:collectAllIn var:scope. - var:filteredParams list:length 2. -} - -_:bng_2 { - :result :is var:filteredParams. -} - -_:bng_3 { - :Let :param var:param. - var:param string:lessThan "Louie". -} diff --git a/reasoning/rdflogic/gcc.trig b/reasoning/rdflogic/gcc.trig deleted file mode 100644 index a2492be68..000000000 --- a/reasoning/rdflogic/gcc.trig +++ /dev/null @@ -1,106 +0,0 @@ -# ----------------- -# Gray Code Counter -# ----------------- -# -# See https://en.wikipedia.org/wiki/Gray_code - -@prefix rdf: . -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -(0 0) :and 0. -(0 1) :and 0. -(1 0) :and 0. -(1 1) :and 1. - -(0 0) :or 0. -(0 1) :or 1. -(1 0) :or 1. -(1 1) :or 1. - -[] rdf:value 0; :inv 1. -[] rdf:value 1; :inv 0. - -_:bng_1 log:isImpliedBy true. - -_:bng_1 { - (var:D 0 var:Q) :dff var:Q. -} - -_:bng_2 log:isImpliedBy true. - -_:bng_2 { - (var:D 1 var:Q) :dff var:D. -} - -_:bng_3 log:isImpliedBy _:bng_4. - -_:bng_3 { - (var:A var:B) :neta var:Q. -} - -_:bng_4 { - (var:A var:B) :and var:T1. - var:A :inv var:NA. - var:B :inv var:NB. - (var:NA var:NB) :and var:T2. - (var:T1 var:T2) :or var:Q. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (var:A var:B var:C) :netb (var:Q1 var:Q2). -} - -_:bng_6 { - (var:A var:C) :and var:T1. - var:C :inv var:NC. - (var:B var:NC) :and var:T2. - var:A :inv var:NA. - (var:NA var:C) :and var:T3. - (var:T1 var:T2) :or var:Q1. - (var:T2 var:T3) :or var:Q2. -} - -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - (var:C (var:Qa var:Qb var:Qc)) :gcc (var:Za var:Zb var:Zc). -} - -_:bng_8 { - (var:Qa var:Qb var:Qc) :netb (var:D1 var:D2). - (var:Qa var:Qb) :neta var:D3. - (var:D1 var:C var:Qa) :dff var:Za. - (var:D2 var:C var:Qb) :dff var:Zb. - (var:D3 var:C var:Qc) :dff var:Zc. -} - -_:bng_9 log:isImpliedBy true. - -_:bng_9 { - (() var:S) :testgcc (). -} - -_:bng_10 log:isImpliedBy _:bng_11. - -_:bng_10 { - (var:Cc var:S) :testgcc var:Nc. -} - -_:bng_11 { - var:Cc list:firstRest (var:C var:Cs). - var:Nc list:firstRest (var:N var:Ns). - (var:C var:S) :gcc var:N. - (var:Cs var:N) :testgcc var:Ns. -} - -# query -_:bng_12 log:query _:bng_12. - -_:bng_12 { - ((1 1 1 1 1 1 1 1 1) (0 0 0)) :testgcc var:Q. -} diff --git a/reasoning/rdflogic/gps.trig b/reasoning/rdflogic/gps.trig deleted file mode 100644 index 6b3298404..000000000 --- a/reasoning/rdflogic/gps.trig +++ /dev/null @@ -1,220 +0,0 @@ -# ------------------------------ -# Goal driven Parallel Sequences -# ------------------------------ -# -# Inspired by https://www.cs.cmu.edu/~fp/courses/15816-s12/lectures/01-inference.pdf -# -# [[ -# In linear logic we are instead concerned with the change of truth with a -# change of state. We model this in a very simple way: when an inference rule -# is applied we consume the propositions used as bodys and produce the -# propositions in the heads, thereby effecting an overall change in state. -# ]] -# -# See https://github.com/hongsun502/wstLogic -# Weighted state transition logic (wstLogic) for future state prediction -# -# Current adaptive systems are mostly built on detecting an event and take -# corresponding adaptations. Weighted state transition logic aims to model -# the future state, and allows to carry adaptive pathway management based -# on the predicted future state. - -@prefix math: . -@prefix list: . -@prefix log: . -@prefix gps: . -@prefix var: . -@prefix : . - -# find paths in the state space from initial state to goal state within limits -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - () gps:findpath (var:Goal var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort)). -} - -_:bng_2 { - () gps:findpaths (() var:Goal () 0.0 0.0 1.0 1.0 var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort 1)). -} - -_:bng_3 log:isImpliedBy _:bng_4. - -_:bng_3 { - () gps:findpath (var:Goal var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort var:MaxStagecount)). -} - -_:bng_4 { - () gps:findpaths (() var:Goal () 0.0 0.0 1.0 1.0 var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort var:MaxStagecount)). -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - () gps:findpaths (var:Maps var:Goal var:Path var:Duration var:Cost var:Belief var:Comfort var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort var:MaxStagecount)). -} - -_:bng_6 { - var:Goal log:call true. -} - -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - () gps:findpaths (var:Maps_s var:Goal var:Path_s var:Duration_s var:Cost_s var:Belief_s var:Comfort_s var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort var:MaxStagecount)). -} - -_:bng_8 { - var:Map gps:description (var:From var:Transition var:To var:Action var:Duration_n var:Cost_n var:Belief_n var:Comfort_n). - (var:Maps_s (var:Map)) list:append var:Maps_t. - var:Maps_t gps:stagecount var:Stagecount. - var:Stagecount math:notGreaterThan var:MaxStagecount. - (var:Duration_s var:Duration_n) math:sum var:Duration_t. - var:Duration_t math:notGreaterThan var:MaxDuration. - (var:Cost_s var:Cost_n) math:sum var:Cost_t. - var:Cost_t math:notGreaterThan var:MaxCost. - (var:Belief_s var:Belief_n) math:product var:Belief_t. - var:Belief_t math:notLessThan var:MinBelief. - (var:Comfort_s var:Comfort_n) math:product var:Comfort_t. - var:Comfort_t math:notLessThan var:MinComfort. - (var:Path_s (var:Action)) list:append var:Path_t. - var:From log:becomes var:To. - _:bng_9 log:callWithCleanup _:bng_10. -} - -_:bng_9 { - () gps:findpaths (var:Maps_t var:Goal var:Path_t var:Duration_t var:Cost_t var:Belief_t var:Comfort_t var:Path var:Duration var:Cost var:Belief var:Comfort - (var:MaxDuration var:MaxCost var:MinBelief var:MinComfort var:MaxStagecount)). -} - -_:bng_10 { - var:To log:becomes var:From. -} - -# counting the number of stages (a stage is a sequence of gps in the same map) -_:bng_11 log:isImpliedBy true. - -_:bng_11 { - () gps:stagecount 1. -} - -_:bng_12 log:isImpliedBy _:bng_13. - -_:bng_12 { - var:A gps:stagecount var:B. -} - -_:bng_13 { - var:A list:firstRest (var:C var:D). - var:D list:firstRest (var:E var:F). - var:C log:notEqualTo var:E. - var:D gps:stagecount var:G. - (var:G 1) math:sum var:B. -} - -_:bng_14 log:isImpliedBy _:bng_15. - -_:bng_14 { - var:A gps:stagecount var:B. -} - -_:bng_15 { - var:A list:firstRest (var:C var:D). - var:D gps:stagecount var:B. -} - -# current state as practical example -:i1 :location :Gent. - -# map of Belgium -_:bng_16 log:isImpliedBy _:bng_17. - -_:bng_16 { - :map-BE gps:description (_:bng_18 true _:bng_19 :drive_gent_brugge 1500.0 0.006 0.96 0.99). -} - -_:bng_17 { - var:S :location var:L. -} - -_:bng_18 { - var:S :location :Gent. -} - -_:bng_19 { - var:S :location :Brugge. -} - -_:bng_20 log:isImpliedBy _:bng_21. - -_:bng_20 { - :map-BE gps:description (_:bng_22 true _:bng_23 :drive_gent_kortrijk 1600.0 0.007 0.96 0.99). -} - -_:bng_21 { - var:S :location var:L. -} - -_:bng_22 { - var:S :location :Gent. -} - -_:bng_23 { - var:S :location :Kortrijk. -} - -_:bng_24 log:isImpliedBy _:bng_25. - -_:bng_24 { - :map-BE gps:description (_:bng_26 true _:bng_27 :drive_kortrijk_brugge 1600.0 0.007 0.96 0.99). -} - -_:bng_25 { - var:S :location var:L. -} - -_:bng_26 { - var:S :location :Kortrijk. -} - -_:bng_27 { - var:S :location :Brugge. -} - -_:bng_28 log:isImpliedBy _:bng_29. - -_:bng_28 { - :map-BE gps:description (_:bng_30 true _:bng_31 :drive_brugge_oostende 900.0 0.004 0.98 1.0). -} - -_:bng_29 { - var:S :location var:L. -} - -_:bng_30 { - var:S :location :Brugge. -} - -_:bng_31 { - var:S :location :Oostende. -} - -# query -_:bng_32 log:query _:bng_33. - -_:bng_32 { - () gps:findpath (_:bng_34 var:PATH var:DURATION var:COST var:BELIEF var:COMFORT (5000.0 5.0 0.2 0.4 1)). -} - -_:bng_33 { - var:S gps:path (var:PATH var:DURATION var:COST var:BELIEF var:COMFORT). -} - -_:bng_34 { - var:S :location :Oostende. -} diff --git a/reasoning/rdflogic/graph.trig b/reasoning/rdflogic/graph.trig deleted file mode 100644 index f475a756d..000000000 --- a/reasoning/rdflogic/graph.trig +++ /dev/null @@ -1,51 +0,0 @@ -# ---------------------- -# Traversing graph paths -# ---------------------- -# -# Examples of graph based reasoning. - -@prefix log: . -@prefix var: . -@prefix : . - -# French roads -:paris :oneway :orleans. -:paris :oneway :chartres. -:paris :oneway :amiens. -:orleans :oneway :blois. -:orleans :oneway :bourges. -:blois :oneway :tours. -:chartres :oneway :lemans. -:lemans :oneway :angers. -:lemans :oneway :tours. -:angers :oneway :nantes. - -# oneway subproperty of path -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:A :oneway var:B. -} - -_:bng_2 { - var:A :path var:B. -} - -# path transitive property -_:bng_3 log:implies _:bng_4. - -_:bng_3 { - var:A :path var:B. - var:B :path var:C. -} - -_:bng_4 { - var:A :path var:C. - } - -# query -_:bng_5 log:query _:bng_5. - -_:bng_5 { - var:A :path :nantes. -} diff --git a/reasoning/rdflogic/hanoi.trig b/reasoning/rdflogic/hanoi.trig deleted file mode 100644 index dc4f5f407..000000000 --- a/reasoning/rdflogic/hanoi.trig +++ /dev/null @@ -1,40 +0,0 @@ -# --------------- -# Towers of Hanoi -# --------------- -# -# See https://en.wikipedia.org/wiki/Tower_of_Hanoi -# Taken from the book "The Art of Prolog" by Leon Sterling and Ehud Shapiro - -@prefix math: . -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -# M is the sequence of moves to move N disks from X to Y using Z as intermediary -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - (var:N var:X var:Y var:Z) :moves var:M. -} - -_:bng_2 { - var:N math:greaterThan 1. - (var:N 1) math:difference var:N1. - (var:N1 var:X var:Z var:Y) :moves var:M1. - (var:N1 var:Z var:Y var:X) :moves var:M2. - (var:M1 ((var:X var:Y)) var:M2) list:append var:M. -} - -_:bng_3 log:isImpliedBy true. - -_:bng_3 { - (1 var:X var:Y var:Z) :moves ((var:X var:Y)). -} - -# query -_:bng_4 log:query _:bng_4. - -_:bng_4 { - (6 :left :right :center) :moves var:M. -} diff --git a/reasoning/rdflogic/issue118.trig b/reasoning/rdflogic/issue118.trig deleted file mode 100644 index cd9ad4248..000000000 --- a/reasoning/rdflogic/issue118.trig +++ /dev/null @@ -1,44 +0,0 @@ -# --------- -# Issue 118 -# --------- -# -# See https://github.com/eyereasoner/eye/issues/118 - -@prefix log: . -@prefix var: . -@prefix skolem: . -@prefix : . - -:s :value 1 . -:s :copy skolem:bn_5. - -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:s :value var:value. -} - -_:bng_2 { - var:s a :Success. -} - -_:bng_3 log:implies _:bng_4. - -_:bng_3 { - :s :copy var:o. -} - -_:bng_4 { - _:bng_5 log:isImpliedBy _:bng_6. -} - -_:bng_5 { - var:o :value var:value. -} - -_:bng_6 { - :s :value var:value. -} - -# query -_:bng_2 log:query _:bng_2. diff --git a/reasoning/rdflogic/mapping.trig b/reasoning/rdflogic/mapping.trig deleted file mode 100644 index d9cbfce6a..000000000 --- a/reasoning/rdflogic/mapping.trig +++ /dev/null @@ -1,31 +0,0 @@ -# ---------------------- -# Schema mapping example -# ---------------------- - -@prefix schema: . -@prefix foaf: . -@prefix log: . -@prefix var: . -@prefix : . - -# sample data -:Pat a schema:Person. - -# mapping rules: every foaf person is a schema person and vice versa -_:bng_1 log:implies _:bng_2. -_:bng_2 log:implies _:bng_1. - -_:bng_1 { - var:S a foaf:Person -} - -_:bng_2 { - var:S a schema:Person. -} - -# query -_:bng_3 log:query _:bng_3. - -_:bng_3 { - var:WHO a var:WHAT. -} diff --git a/reasoning/rdflogic/mi.trig b/reasoning/rdflogic/mi.trig deleted file mode 100644 index 4b0bf8715..000000000 --- a/reasoning/rdflogic/mi.trig +++ /dev/null @@ -1,130 +0,0 @@ -# ---------------- -# Meta-interpreter -# ---------------- -# -# Inspired by https://www.metalevel.at/acomip/ - -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -# meta-interpreter rules -_:mi_rule1_head log:isImpliedBy true. - -_:mi_rule1_head { - () :mi (). -} - -_:mi_rule2_head log:isImpliedBy _:mi_rule2_body. - -_:mi_rule2_head { - () :mi var:A. -} - -_:mi_rule2_body { - var:A list:firstRest (var:G var:Gs). - () :headBody (var:G var:Goals var:Gs). - () :mi var:Goals. -} - -# general head-body rules -_:hb_rule1_head log:isImpliedBy true. - -_:hb_rule1_head { - () :headBody (_:hb_rule1_head_graph1 var:Rs var:Rs). -} - -_:hb_rule1_head_graph1 { - () :mi (). -} - -_:hb_rule2_head log:isImpliedBy _:hb_rule2_body. - -_:hb_rule2_head { - () :headBody (_:hb_rule2_head_graph1 var:B var:Rs). -} - -_:hb_rule2_head_graph1 { - () :mi var:A. -} - -_:hb_rule2_body { - var:A list:firstRest (var:G var:Gs). - var:B list:firstRest (_:hb_rule2_body_graph1 var:C). - var:C list:firstRest (_:hb_rule2_body_graph2 var:Rs). -} - -_:hb_rule2_body_graph1 { - () :headBody (var:G var:Goals var:Gs). -} - -_:hb_rule2_body_graph2 { - () :mi var:Goals. -} - -_:hb_rule3_head log:isImpliedBy _:hb_rule3_body. - -_:hb_rule3_head { - () :headBody (_:hb_rule3_head_graph1 var:Rs var:Rs). -} - -_:hb_rule3_head_graph1 { - () :headBody (var:Head var:Goals0 var:Goals). -} - -_:hb_rule3_body { - () :headBody (var:Head var:Goals0 var:Goals). -} - -# natnum head-body rules -_:natnum_hb_rule1_head log:isImpliedBy true. - -_:natnum_hb_rule1_head { - () :headBody (_:natnum_hb_rule1_head_graph1 var:Rs var:Rs). -} - -_:natnum_hb_rule1_head_graph1 { - () :natnum (0). -} - -_:natnum_hb_rule2_head log:isImpliedBy _:natnum_hb_rule2_body. - -_:natnum_hb_rule2_head { - () :headBody (_:natnum_hb_rule2_head_graph1 var:A var:Rs). -} - -_:natnum_hb_rule2_head_graph1 { - () :natnum (:s var:X). -} - -_:natnum_hb_rule2_body { - var:A list:firstRest (_:natnum_hb_rule2_body_graph1 var:Rs). -} - -_:natnum_hb_rule2_body_graph1 { - () :natnum var:X. -} - -# query -_:question log:query _:answer. - -_:question { - () :mi (_:question_graph1). -} - -_:question_graph1 { - () :mi (_:question_graph2). -} - -_:question_graph2 { - () :mi (_:question_graph3). -} - -_:question_graph3 { - () :natnum (:s (:s (:s (:s (:s (0)))))). -} - -_:answer { - () :natnum (:s (:s (:s (:s (:s (0)))))). -} diff --git a/reasoning/rdflogic/output/ackermann.trig b/reasoning/rdflogic/output/ackermann.trig deleted file mode 100644 index afc2566d8..000000000 --- a/reasoning/rdflogic/output/ackermann.trig +++ /dev/null @@ -1,13 +0,0 @@ -@prefix : . - -(0 0) :ackermann 1 . -(0 6) :ackermann 7 . -(1 2) :ackermann 4 . -(1 7) :ackermann 9 . -(2 2) :ackermann 7 . -(2 9) :ackermann 21 . -(3 4) :ackermann 125 . -(3 14) :ackermann 131069 . -(4 0) :ackermann 13 . -(4 1) :ackermann 65533 . -(4 2) :ackermann 2003529930406846464979072351560255750447825475569751419265016973710894059556311453089506130880933348101038234342907263181822949382118812668869506364761547029165041871916351587966347219442930927982084309104855990570159318959639524863372367203002916969592156108764948889254090805911457037675208500206671563702366126359747144807111774815880914135742720967190151836282560618091458852699826141425030123391108273603843767876449043205960379124490905707560314035076162562476031863793126484703743782954975613770981604614413308692118102485959152380195331030292162800160568670105651646750568038741529463842244845292537361442533614373729088303794601274724958414864915930647252015155693922628180691650796381064132275307267143998158508811292628901134237782705567421080070065283963322155077831214288551675554073345107213112427399562982719769150054883905223804357045848197956393157853510018992000024141963706813559840464039472194016069517690156119726982337890017641517190051133466306898140219383481435426387306539552969691388024158161859561100640362119796101859534802787167200122604642492385111393400464351623867567078745259464670903886547743483217897012764455529409092021959585751622973333576159552394885297579954028471943529913543763705986928913757153740001986394332464890052543106629669165243419174691389632476560289415199775477703138064781342309596190960654591300890188887588084733625956065444888501447335706058817090162108499714529568344061979690565469813631162053579369791403236328496233046421066136200220175787851857409162050489711781820400187282939943446186224328009837323764931814789848119452713007440220765680910376203999203492023906626264491909167985461515778839060397720759279378852241294301017458086862263369284725851403039615558564330385450688652213114813638408384778263790459607186876728509763471271988890680478243230394718650525660978150729861141430305816927924971409161059417185352275887504477592218301158780701975535722241400019548102005661773589781499532325208589753463547007786690406429016763808161740550405117670093673202804549339027992491867306539931640720492238474815280619166900933805732120816350707634351669869625020969023162859350071874190579161241536897514808261904847946571736601005892476655445840838334790544144817684255327207315586349347605137419779525190365032198020108764738368682531025183377533908861426184800374008082238104076468878471647552945326947661700424461063311238021134588694532200116564076327023074292426051582811070387018345324567635625951430032037432740780879056283663406965030844225855967039271869461158513793386475699748568670079823960604393478850861649260304945061743412365828352144806726676841807083754862211408236579802961200027441324438432402331257403545019352428776430880232850855886089962774458164680857875115807014743763867976955049991643998284357290415378143438847303484261903388841494031366139854257635577105335580206622185577060082551288893332226436281984838613239570676191409638533832374343758830859233722284644287996245605476932428998432652677378373173288063210753211238680604674708428051166488709084770291208161104912555598322366244868556651402684641209694982590565519216188104341226838996283071654868525536914850299539675503954938371853405900096187489473992880432496373165753803673586710175783994818471798498246948060532081996066183434012476096639519778021441199752546704080608499344178256285092726523709898651539462193004607364507926212975917698293892367015170992091531567814439791248475706237804600009918293321306880570046591458387208088016887445835557926258465124763087148566313528934166117490617526671492672176128330845273936469244582892571388877839056300482483799839692029222215486145902373478222682521639957440801727144146179559226175083889020074169926238300282286249284182671243405751424188569994272331606998712986882771820617214453142574944015066139463169197629181506579745526236191224848063890033669074365989226349564114665503062965960199720636202603521917776740668777463549375318899587866282125469797102065747232721372918144666659421872003474508942830911535189271114287108376159222380276605327823351661555149369375778466670145717971901227117812780450240026384758788339396817962950690798817121690686929538248529830023476068454114178139110648560236549754227497231007615131870024053910510913817843721791422528587432098524957878034683703337818421444017138688124249984418618129271198533315382567321870421530631197748535214670955334626336610864667332292409879849256691109516143618601548909740241913509623043612196128165950518666022030715613684732364660868905014263913906515063908199378852318365059897299125404479443425166774299659811849233151555272883274028352688442408752811283289980625912673699546247341543333500147231430612750390307397135252069338173843322950701049061867539433130784798015655130384758155685236218010419650255596181934986315913233036096461905990236112681196023441843363334594927631946101716652913823717182394299216272538461776065694542297877071383198817036964588689811863210976900355735884624464835706291453052757101278872027965364479724025405448132748391794128826423835171949197209797145936887537198729130831738033911016128547415377377715951728084111627597186384924222802373441925469991983672192131287035585307966942713416391033882754318613643490100943197409047331014476299861725424423355612237435715825933382804986243892498222780715951762757847109475119033482241412025182688713728193104253478196128440176479531505057110722974314569915223451643121848657575786528197564843508958384722923534559464521215831657751471298708225909292655638836651120681943836904116252668710044560243704200663709001941185557160472044643696932850060046928140507119069261393993902735534545567470314903886022024639948260501762431969305640666366626090207048887438898907498152865444381862917382901051820869936382661868303915273264581286782806601337500096593364625146091723180312930347877421234679118454791311109897794648216922505629399956793483801699157439700537542134485874586856047286751065423341893839099110586465595113646061055156838541217459801807133163612573079611168343863767667307354583494789788316330129240800836356825939157113130978030516441716682518346573675934198084958947940983292500086389778563494693212473426103062713745077286156922596628573857905533240641849018451328284632709269753830867308409142247659474439973348130810986399417379789657010687026734161967196591599588537834822988270125605842365589539690306474965584147981310997157542043256395776070485100881578291408250777738559790129129407309462785944505859412273194812753225152324801503466519048228961406646890305102510916237770448486230229488966711380555607956620732449373374027836767300203011615227008921843515652121379215748206859356920790214502277133099987729459596952817044582181956080965811702798062669891205061560742325686842271306295009864421853470810407128917646906550836129916694778023822502789667843489199409657361704586786242554006942516693979292624714524945408858422726153755260071904336329196375777502176005195800693847635789586878489536872122898557806826518192703632099480155874455575175312736471421295536494084385586615208012115079075068553344489258693283859653013272046970694571546959353658571788894862333292465202735853188533370948455403336565356988172582528918056635488363743793348411845580168331827676834646291995605513470039147876808640322629616641560667508153710646723108461964247537490553744805318226002710216400980584497526023035640038083472053149941172965736785066421400842696497103241919182121213206939769143923368374709228267738708132236680086924703491586840991153098315412063566123187504305467536983230827966457417620806593177265685841681837966106144963432544111706941700222657817358351259821080769101961052229263879745049019254311900620561906577452416191913187533984049343976823310298465893318373015809592522829206820862230332585280119266496314441316442773003237792274712330696417149945532261035475145631290668854345426869788447742981777493710117614651624183616680254815296335308490849943006763654806102940094693750609845588558043970485914449584445079978497045583550685408745163316464118083123079704389849190506587586425810738422420591191941674182490452700288263983057950057341711487031187142834184499153456702915280104485145176055306971441761368582384102787659324662689978418319620312262421177391477208004883578333569204533935953254564897028558589735505751235129536540502842081022785248776603574246366673148680279486052445782673626230852978265057114624846595914210278122788941448163994973881884622768244851622051817076722169863265701654316919742651230041757329904473537672536845792754365412826553581858046840069367718605020070547247548400805530424951854495267247261347318174742180078574693465447136036975884118029408039616746946288540679172138601225419503819704538417268006398820656328792839582708510919958839448297775647152026132871089526163417707151642899487953564854553553148754978134009964854498635824847690590033116961303766127923464323129706628411307427046202032013368350385425360313636763575212604707425311209233402837482949453104727418969287275572027615272268283376741393425652653283068469997597097750005560889932685025049212884068274139881631540456490350775871680074055685724021758685439053228133770707415830756269628316955687424060527726485853050611356384851965918968649596335568216975437621430778665934730450164822432964891270709898076676625671517269062058815549666382573829274182082278960684488222983394816670984039024283514306813767253460126007269262969468672750794346190439996618979611928750519442356402644303271737341591281496056168353988188569484045342311424613559925272330064881627466723523751234311893442118885085079358163848994487544756331689213869675574302737953785262542329024881047181939037220666894702204258836895840939998453560948869946833852579675161882159410981624918741813364726965123980677561947912557957446471427868624053750576104204267149366084980238274680575982591331006919941904651906531171908926077949119217946407355129633864523035673345588033313197080365457184791550432654899559705862888286866606618021882248602144999973122164138170653480175510438406624412822803616648904257377640956326482825258407669045608439490325290526337532316509087681336614242398309530806549661879381949120033919489494065132398816642080088395554942237096734840072642705701165089075196155370186264797456381187856175457113400473810762763014953309735174180655479112660938034311378532532883533352024934365979129341284854970946826329075830193072665337782559314331110963848053940859283988907796210479847919686876539987477095912788727475874439806779824968278272200926449944559380414608770641941810440758269805688038949654616587983904660587645341810289907194293021774519976104495043196841503455514044820928933378657363052830619990077748726922998608279053171691876578860908941817057993404890218441559791092676862796597583952483926734883634745651687016166240642424241228961118010615682342539392180052483454723779219911228595914191877491793823340010078128326506710281781396029120914720100947878752551263372884222353869490067927664511634758101193875319657242121476038284774774571704578610417385747911301908583877890152334343013005282797038580359815182929600305682612091950943737325454171056383887047528950563961029843641360935641632589408137981511693338619797339821670761004607980096016024823096943043806956620123213650140549586250615282588033022908385812478469315720323233601899469437647726721879376826431828382603564520699468630216048874528424363593558622333506235945002890558581611275341783750455936126130852640828051213873177490200249552738734585956405160830583053770732533971552620444705429573538361113677523169972740292941674204423248113875075631319078272188864053374694213842169928862940479635305150560788126366206497231257579019598873041195626227343728900516561111094111745277965482790471250581999077498063821559376885546498822938985408291325129076478386322494781016753491693489288104203015610283386143827378160946341335383578340765314321417150655877547820252454780657301342277470616744241968952613164274104695474621483756288299771804186785084546965619150908695874251184435837306590951460980451247409411373899927822492983367796011015387096129749705566301637307202750734759922943792393824427421186158236161317886392553095117188421298508307238259729144142251579403883011359083331651858234967221259621812507058113759495525022747274674369887131926670769299199084467161228738858457584622726573330753735572823951616964175198675012681745429323738294143824814377139861906716657572945807804820559511881687188075212971832636442155336787751274766940790117057509819575084563565217389544179875074523854455200133572033332379895074393905312918212255259833790909463630202185353848854825062897715616963860712382771725621313460549401770413581731931763370136332252819127547191443450920711848838366818174263342949611870091503049165339464763717766439120798347494627397822171502090670190302469762151278521956142070806461631373236517853976292092025500288962012970141379640038055734949269073535145961208674796547733692958773628635660143767964038430796864138563447801328261284589184898528048048844180821639423974014362903481665458114454366460032490618763039502356402044530748210241366895196644221339200757479128683805175150634662569391937740283512075666260829890491877287833852178522792045771846965855278790447562192663992008409302075673925363735628390829817577902153202106409617373283598494066652141198183810884515459772895164572131897797907491941013148368544639616904607030107596818933741217575988165127000761262789169510406315857637534787420070222051070891257612361658026806815858499852631465878086616800733264676830206391697203064894405628195406190685242003053463156621891327309069687353181641094514288036605995220248248886711554429104721929134248346438705368508648749099178812670565665387191049721820042371492740164460943459845392536706132210616533085662021188968234005752675486101476993688738209584552211571923479686888160853631615862880150395949418529489227074410828207169303387818084936204018255222271010985653444817207470756019245915599431072949578197878590578940052540122867517142511184356437184053563024181225473266093302710397968091064939272722683035410467632591355279683837705019855234621222858410557119921731717969804339317707750755627056047831779844447637560254637033369247114220815519973691371975163241302748712199863404548248524570118553342675264715978310731245663429805221455494156252724028915333354349341217862037007260315279870771872491234494477147909520734761385425485311552773301030342476835865496093722324007154518129732692081058424090557725645803681462234493189708138897143299831347617799679712453782310703739151473878692119187566700319321281896803322696594459286210607438827416919465162267632540665070881071030394178860564893769816734159025925194611823642945652669372203155504700213598846292758012527715422016629954863130324912311029627923723899766416803497141226527931907636326136814145516376656559839788489381733082668779901962886932296597379951931621187215455287394170243669885593888793316744533363119541518404088283815193421234122820030950313341050704760159987985472529190665222479319715440331794836837373220821885773341623856441380700541913530245943913502554531886454796252260251762928374330465102361057583514550739443339610216229675461415781127197001738611494279501411253280621254775810512972088465263158094806633687670147310733540717710876615935856814098212967730759197382973441445256688770855324570888958320993823432102718224114763732791357568615421252849657903335093152776925505845644010552192644505312073756287744998163646332835816140330175813967359427327690448920361880386754955751806890058532927201493923500525845146706982628548257883267398735220457228239290207144822219885587102896991935873074277815159757620764023951243860202032596596250212578349957710085626386118233813318509014686577064010676278617583772772895892746039403930337271873850536912957126715066896688493880885142943609962012966759079225082275313812849851526902931700263136328942095797577959327635531162066753488651317323872438748063513314512644889967589828812925480076425186586490241111127301357197181381602583178506932244007998656635371544088454866393181708395735780799059730839094881804060935959190907473960904410150516321749681412100765719177483767355751000733616922386537429079457803200042337452807566153042929014495780629634138383551783599764708851349004856973697965238695845994595592090709058956891451141412684505462117945026611750166928260250950770778211950432617383223562437601776799362796099368975191394965033358507155418436456852616674243688920371037495328425927131610537834980740739158633817967658425258036737206469351248652238481341663808061505704829059890696451936440018597120425723007316410009916987524260377362177763430621616744884930810929901009517974541564251204822086714586849255132444266777127863728211331536224301091824391243380214046242223349153559516890816288487989988273630445372432174280215755777967021666317047969728172483392841015642274507271779269399929740308072770395013581545142494049026536105825409373114653104943382484379718606937214444600826798002471229489405761853892203425608302697052876621377373594394224114707074072902725461307358541745691419446487624357682397065703184168467540733466346293673983620004041400714054277632480132742202685393698869787607009590048684650626771363070979821006557285101306601010780633743344773073478653881742681230743766066643312775356466578603715192922768440458273283243808212841218776132042460464900801054731426749260826922155637405486241717031027919996942645620955619816454547662045022411449404749349832206807191352767986747813458203859570413466177937228534940031631599544093684089572533438702986717829770373332806801764639502090023941931499115009105276821119510999063166150311585582835582607179410052528583611369961303442790173811787412061288182062023263849861515656451230047792967563618345768105043341769543067538041113928553792529241347339481050532025708728186307291158911335942014761872664291564036371927602306283840650425441742335464549987055318726887926424102147363698625463747159744354943443899730051742525110877357886390946812096673428152585919924857640488055071329814299359911463239919113959926752576359007446572810191805841807342227734721397723218231771716916400108826112549093361186780575722391018186168549108500885272274374212086524852372456248697662245384819298671129452945515497030585919307198497105414181636968976131126744027009648667545934567059936995464500558921628047976365686133316563907395703272034389175415267500915011198856872708848195531676931681272892143031376818016445477367518353497857924276463354162433601125960252109501612264110346083465648235597934274056868849224458745493776752120324703803035491157544831295275891939893680876327685438769557694881422844311998595700727521393176837831770339130423060958999137314684569010422095161967070506420256733873446115655276175992727151877660010238944760539789516945708802728736225121076224091810066700883474737605156285533943565843756271241244457651663064085939507947550920463932245202535463634444791755661725962187199279186575490857852950012840229035061514937310107009446151011613712423761426722541732055959202782129325725947146417224977321316381845326555279604270541871496236585252458648933254145062642337885651464670604298564781968461593663288954299780722542264790400616019751975007460545150060291806638271497016110987951336633771378434416194053121445291855180136575558667615019373029691932076120009255065081583275508499340768797252369987023567931026804136745718956641431852679054717169962990363015545645090044802789055701968328313630718997699153166679208958768572290600915472919636381673596673959975710326015571920237348580521128117458610065152598883843114511894880552129145775699146577530041384717124577965048175856395072895337539755822087777506072339445587895905719156733 . diff --git a/reasoning/rdflogic/output/acp.trig b/reasoning/rdflogic/output/acp.trig deleted file mode 100644 index c716e6909..000000000 --- a/reasoning/rdflogic/output/acp.trig +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:test :for :PolicyX. -:test :is true. diff --git a/reasoning/rdflogic/output/age.trig b/reasoning/rdflogic/output/age.trig deleted file mode 100644 index 28c110b91..000000000 --- a/reasoning/rdflogic/output/age.trig +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . -@prefix xsd: . - -:patH :ageAbove "P80Y"^^xsd:duration. diff --git a/reasoning/rdflogic/output/backward.trig b/reasoning/rdflogic/output/backward.trig deleted file mode 100644 index 031bdd16a..000000000 --- a/reasoning/rdflogic/output/backward.trig +++ /dev/null @@ -1,4 +0,0 @@ -@prefix rdf: . -@prefix : . - -[] rdf:value 5; :moreInterestingThan 3 . diff --git a/reasoning/rdflogic/output/cobbler.trig b/reasoning/rdflogic/output/cobbler.trig deleted file mode 100644 index 7e96a1c3d..000000000 --- a/reasoning/rdflogic/output/cobbler.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -_:e_x_1 :is (:good :Cobbler). diff --git a/reasoning/rdflogic/output/color.trig b/reasoning/rdflogic/output/color.trig deleted file mode 100644 index 01cc47338..000000000 --- a/reasoning/rdflogic/output/color.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:mapEU :color ((:Austria :green) (:Belgium :yellow) (:Bulgaria :green) (:Croatia :green) (:Cyprus :green) (:Czech_Republic :yellow) (:Denmark :green) (:Estonia :blue) (:Finland :green) (:France :green) (:Germany :blue) (:Greece :red) (:Hungary :blue) (:Ireland :green) (:Italy :blue) (:Latvia :green) (:Lithuania :red) (:Luxemburg :red) (:Malta :red) (:Netherlands :green) (:Poland :green) (:Portugal :green) (:Romania :red) (:Slovakia :red) (:Slovenia :red) (:Spain :red) (:Sweden :red) (:United_Kingdom :red)). diff --git a/reasoning/rdflogic/output/complement.trig b/reasoning/rdflogic/output/complement.trig deleted file mode 100644 index 2ef805e6a..000000000 --- a/reasoning/rdflogic/output/complement.trig +++ /dev/null @@ -1,9 +0,0 @@ -@prefix log: . - -_:bng_1 log:implies false. - -_:bng_1 { - log:complement log:complement log:complement. - log:complement log:complement log:complement. - log:complement log:complement log:complement. -} diff --git a/reasoning/rdflogic/output/complex.trig b/reasoning/rdflogic/output/complex.trig deleted file mode 100644 index 2e82aaa38..000000000 --- a/reasoning/rdflogic/output/complex.trig +++ /dev/null @@ -1,8 +0,0 @@ -@prefix complex: . - -((-1 0) (0.5 0)) complex:exponentiation (6.123233995736766e-17 1.0). -((2.718281828459045 0) (0 3.141592653589793)) complex:exponentiation (-1.0 1.2246467991473532e-16). -((0 1) (0 1)) complex:exponentiation (0.20787957635076193 0.0). -((2.718281828459045 0) (-1.57079632679 0)) complex:exponentiation (0.20787957635177984 0.0). -(2 0) complex:asin (1.5707963267948966 1.3169578969248166). -(2 0) complex:acos (0.0 -1.3169578969248166). diff --git a/reasoning/rdflogic/output/control.trig b/reasoning/rdflogic/output/control.trig deleted file mode 100644 index f90b0aded..000000000 --- a/reasoning/rdflogic/output/control.trig +++ /dev/null @@ -1,4 +0,0 @@ -@prefix : . - -:actuator1 :control1 39.27346198678276 . -:actuator2 :control1 26.08 . diff --git a/reasoning/rdflogic/output/derived.trig b/reasoning/rdflogic/output/derived.trig deleted file mode 100644 index 1b1d71f0b..000000000 --- a/reasoning/rdflogic/output/derived.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:test :is true. diff --git a/reasoning/rdflogic/output/easter.trig b/reasoning/rdflogic/output/easter.trig deleted file mode 100644 index 83054f84d..000000000 --- a/reasoning/rdflogic/output/easter.trig +++ /dev/null @@ -1,30 +0,0 @@ -@prefix rdf: . -@prefix : . - -[] rdf:value 2024; :easter (31 3). -[] rdf:value 2025; :easter (20 4). -[] rdf:value 2026; :easter (5 4). -[] rdf:value 2027; :easter (28 3). -[] rdf:value 2028; :easter (16 4). -[] rdf:value 2029; :easter (1 4). -[] rdf:value 2030; :easter (21 4). -[] rdf:value 2031; :easter (13 4). -[] rdf:value 2032; :easter (28 3). -[] rdf:value 2033; :easter (17 4). -[] rdf:value 2034; :easter (9 4). -[] rdf:value 2035; :easter (25 3). -[] rdf:value 2036; :easter (13 4). -[] rdf:value 2037; :easter (5 4). -[] rdf:value 2038; :easter (25 4). -[] rdf:value 2039; :easter (10 4). -[] rdf:value 2040; :easter (1 4). -[] rdf:value 2041; :easter (21 4). -[] rdf:value 2042; :easter (6 4). -[] rdf:value 2043; :easter (29 3). -[] rdf:value 2044; :easter (17 4). -[] rdf:value 2045; :easter (9 4). -[] rdf:value 2046; :easter (25 3). -[] rdf:value 2047; :easter (14 4). -[] rdf:value 2048; :easter (5 4). -[] rdf:value 2049; :easter (18 4). -[] rdf:value 2050; :easter (10 4). diff --git a/reasoning/rdflogic/output/equality.trig b/reasoning/rdflogic/output/equality.trig deleted file mode 100644 index 1b1d71f0b..000000000 --- a/reasoning/rdflogic/output/equality.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:test :is true. diff --git a/reasoning/rdflogic/output/fibonacci.trig b/reasoning/rdflogic/output/fibonacci.trig deleted file mode 100644 index 0ce97aa91..000000000 --- a/reasoning/rdflogic/output/fibonacci.trig +++ /dev/null @@ -1,9 +0,0 @@ -@prefix rdf: . -@prefix : . - -[] rdf:value 0; :fibonacci 0 . -[] rdf:value 1; :fibonacci 1 . -[] rdf:value 6; :fibonacci 8 . -[] rdf:value 91; :fibonacci 4660046610375530309 . -[] rdf:value 283; :fibonacci 62232491515607091882574410635924603070626544377175485625797 . -[] rdf:value 3674; :fibonacci 295872959797101479478634366815157108100573212705250690577871041398423606408217262643449728342664061812585639168722421830407677671667740585806703531229882783069925750619720511808616484846128237251921414441458265138672827487722512845223115526738192067144721087756159352711138340620702266509343657403678256247195010013499661223527119909308682062873140767135468966093474944529418214755911968500799987099146489838560114063096775586903976827512299123202488315139397181279903459556726060805948910609527571241968534269554079076649680403030083743420820438603816095671532163428933363322524736324029745871445486444623006627119156710782085648303485296149604974010598940800770684835758031137479033374229914629583184427269638360355586190323578625395157899987377625662075558684705457 . diff --git a/reasoning/rdflogic/output/filter.trig b/reasoning/rdflogic/output/filter.trig deleted file mode 100644 index 67c2f90ee..000000000 --- a/reasoning/rdflogic/output/filter.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:result :is ("Huey" "Dewey"). diff --git a/reasoning/rdflogic/output/gcc.trig b/reasoning/rdflogic/output/gcc.trig deleted file mode 100644 index 329401b7e..000000000 --- a/reasoning/rdflogic/output/gcc.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -((1 1 1 1 1 1 1 1 1) (0 0 0)) :testgcc ((0 0 1) (0 1 1) (0 1 0) (1 1 0) (1 1 1) (1 0 1) (1 0 0) (0 0 0) (0 0 1)). diff --git a/reasoning/rdflogic/output/gps.trig b/reasoning/rdflogic/output/gps.trig deleted file mode 100644 index 73f6c0b97..000000000 --- a/reasoning/rdflogic/output/gps.trig +++ /dev/null @@ -1,5 +0,0 @@ -@prefix : . -@prefix gps: . - -:i1 gps:path ((:drive_gent_brugge :drive_brugge_oostende) 2400.0 0.01 0.9408 0.99). -:i1 gps:path ((:drive_gent_kortrijk :drive_kortrijk_brugge :drive_brugge_oostende) 4100.0 0.018000000000000002 0.903168 0.9801). diff --git a/reasoning/rdflogic/output/graph.trig b/reasoning/rdflogic/output/graph.trig deleted file mode 100644 index b5e200956..000000000 --- a/reasoning/rdflogic/output/graph.trig +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . - -:angers :path :nantes. -:lemans :path :nantes. -:chartres :path :nantes. -:paris :path :nantes. diff --git a/reasoning/rdflogic/output/hanoi.trig b/reasoning/rdflogic/output/hanoi.trig deleted file mode 100644 index fede32d84..000000000 --- a/reasoning/rdflogic/output/hanoi.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -(6 :left :right :center) :moves ((:left :center) (:left :right) (:center :right) (:left :center) (:right :left) (:right :center) (:left :center) (:left :right) (:center :right) (:center :left) (:right :left) (:center :right) (:left :center) (:left :right) (:center :right) (:left :center) (:right :left) (:right :center) (:left :center) (:right :left) (:center :right) (:center :left) (:right :left) (:right :center) (:left :center) (:left :right) (:center :right) (:left :center) (:right :left) (:right :center) (:left :center) (:left :right) (:center :right) (:center :left) (:right :left) (:center :right) (:left :center) (:left :right) (:center :right) (:center :left) (:right :left) (:right :center) (:left :center) (:right :left) (:center :right) (:center :left) (:right :left) (:center :right) (:left :center) (:left :right) (:center :right) (:left :center) (:right :left) (:right :center) (:left :center) (:left :right) (:center :right) (:center :left) (:right :left) (:center :right) (:left :center) (:left :right) (:center :right)). diff --git a/reasoning/rdflogic/output/issue118.trig b/reasoning/rdflogic/output/issue118.trig deleted file mode 100644 index 432e4075e..000000000 --- a/reasoning/rdflogic/output/issue118.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:s a :Success. diff --git a/reasoning/rdflogic/output/mapping.trig b/reasoning/rdflogic/output/mapping.trig deleted file mode 100644 index 3985ab242..000000000 --- a/reasoning/rdflogic/output/mapping.trig +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . -@prefix schema: . -@prefix foaf: . - -:Pat a schema:Person. -:Pat a foaf:Person. diff --git a/reasoning/rdflogic/output/mi.trig b/reasoning/rdflogic/output/mi.trig deleted file mode 100644 index 732266bf7..000000000 --- a/reasoning/rdflogic/output/mi.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -() :natnum (:s (:s (:s (:s (:s (0)))))). diff --git a/reasoning/rdflogic/output/patch.trig b/reasoning/rdflogic/output/patch.trig deleted file mode 100644 index 3f2ec9b66..000000000 --- a/reasoning/rdflogic/output/patch.trig +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . - -:pers001 :familyName "Garcia". -:pers001 :givenName "Alex". -:pers002 :familyName "Cardinale". -:pers002 :givenName "Claudia". diff --git a/reasoning/rdflogic/output/peano.trig b/reasoning/rdflogic/output/peano.trig deleted file mode 100644 index b581abfbf..000000000 --- a/reasoning/rdflogic/output/peano.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -(:s (:s (:s (:s (:s (:s 0)))))) :factorial (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s (:s 0)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))). diff --git a/reasoning/rdflogic/output/pi.trig b/reasoning/rdflogic/output/pi.trig deleted file mode 100644 index dab05be8f..000000000 --- a/reasoning/rdflogic/output/pi.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -(5000 3.1415926535917924) :pi true. diff --git a/reasoning/rdflogic/output/qiana.trig b/reasoning/rdflogic/output/qiana.trig deleted file mode 100644 index 21679d0c1..000000000 --- a/reasoning/rdflogic/output/qiana.trig +++ /dev/null @@ -1,18 +0,0 @@ -@prefix : . -@prefix log: . -@prefix var: . - -:Fabian :believes _:e_bng_5_1. -:northStar :notNecessarilyA :gold. - -_:e_bng_5_1 { - _:e_bng_6_1 log:implies _:e_bng_7_1. -} - -_:e_bng_6_1 { - var:x a :glitter. -} - -_:e_bng_7_1 { - var:x :notNecessarilyA :gold. -} diff --git a/reasoning/rdflogic/output/queens.trig b/reasoning/rdflogic/output/queens.trig deleted file mode 100644 index 9c56553fc..000000000 --- a/reasoning/rdflogic/output/queens.trig +++ /dev/null @@ -1,95 +0,0 @@ -@prefix rdf: . -@prefix : . - -[] rdf:value 8; :queens (4 2 7 3 6 8 5 1). -[] rdf:value 8; :queens (5 2 4 7 3 8 6 1). -[] rdf:value 8; :queens (3 5 2 8 6 4 7 1). -[] rdf:value 8; :queens (3 6 4 2 8 5 7 1). -[] rdf:value 8; :queens (5 7 1 3 8 6 4 2). -[] rdf:value 8; :queens (4 6 8 3 1 7 5 2). -[] rdf:value 8; :queens (3 6 8 1 4 7 5 2). -[] rdf:value 8; :queens (5 3 8 4 7 1 6 2). -[] rdf:value 8; :queens (5 7 4 1 3 8 6 2). -[] rdf:value 8; :queens (4 1 5 8 6 3 7 2). -[] rdf:value 8; :queens (3 6 4 1 8 5 7 2). -[] rdf:value 8; :queens (4 7 5 3 1 6 8 2). -[] rdf:value 8; :queens (6 4 2 8 5 7 1 3). -[] rdf:value 8; :queens (6 4 7 1 8 2 5 3). -[] rdf:value 8; :queens (1 7 4 6 8 2 5 3). -[] rdf:value 8; :queens (6 8 2 4 1 7 5 3). -[] rdf:value 8; :queens (6 2 7 1 4 8 5 3). -[] rdf:value 8; :queens (4 7 1 8 5 2 6 3). -[] rdf:value 8; :queens (5 8 4 1 7 2 6 3). -[] rdf:value 8; :queens (4 8 1 5 7 2 6 3). -[] rdf:value 8; :queens (2 7 5 8 1 4 6 3). -[] rdf:value 8; :queens (1 7 5 8 2 4 6 3). -[] rdf:value 8; :queens (2 5 7 4 1 8 6 3). -[] rdf:value 8; :queens (4 2 7 5 1 8 6 3). -[] rdf:value 8; :queens (5 7 1 4 2 8 6 3). -[] rdf:value 8; :queens (6 4 1 5 8 2 7 3). -[] rdf:value 8; :queens (5 1 4 6 8 2 7 3). -[] rdf:value 8; :queens (5 2 6 1 7 4 8 3). -[] rdf:value 8; :queens (6 3 7 2 8 5 1 4). -[] rdf:value 8; :queens (2 7 3 6 8 5 1 4). -[] rdf:value 8; :queens (7 3 1 6 8 5 2 4). -[] rdf:value 8; :queens (5 1 8 6 3 7 2 4). -[] rdf:value 8; :queens (1 5 8 6 3 7 2 4). -[] rdf:value 8; :queens (3 6 8 1 5 7 2 4). -[] rdf:value 8; :queens (6 3 1 7 5 8 2 4). -[] rdf:value 8; :queens (7 5 3 1 6 8 2 4). -[] rdf:value 8; :queens (7 3 8 2 5 1 6 4). -[] rdf:value 8; :queens (5 3 1 7 2 8 6 4). -[] rdf:value 8; :queens (2 5 7 1 3 8 6 4). -[] rdf:value 8; :queens (3 6 2 5 8 1 7 4). -[] rdf:value 8; :queens (6 1 5 2 8 3 7 4). -[] rdf:value 8; :queens (8 3 1 6 2 5 7 4). -[] rdf:value 8; :queens (2 8 6 1 3 5 7 4). -[] rdf:value 8; :queens (5 7 2 6 3 1 8 4). -[] rdf:value 8; :queens (3 6 2 7 5 1 8 4). -[] rdf:value 8; :queens (6 2 7 1 3 5 8 4). -[] rdf:value 8; :queens (3 7 2 8 6 4 1 5). -[] rdf:value 8; :queens (6 3 7 2 4 8 1 5). -[] rdf:value 8; :queens (4 2 7 3 6 8 1 5). -[] rdf:value 8; :queens (7 1 3 8 6 4 2 5). -[] rdf:value 8; :queens (1 6 8 3 7 4 2 5). -[] rdf:value 8; :queens (3 8 4 7 1 6 2 5). -[] rdf:value 8; :queens (6 3 7 4 1 8 2 5). -[] rdf:value 8; :queens (7 4 2 8 6 1 3 5). -[] rdf:value 8; :queens (4 6 8 2 7 1 3 5). -[] rdf:value 8; :queens (2 6 1 7 4 8 3 5). -[] rdf:value 8; :queens (2 4 6 8 3 1 7 5). -[] rdf:value 8; :queens (3 6 8 2 4 1 7 5). -[] rdf:value 8; :queens (6 3 1 8 4 2 7 5). -[] rdf:value 8; :queens (8 4 1 3 6 2 7 5). -[] rdf:value 8; :queens (4 8 1 3 6 2 7 5). -[] rdf:value 8; :queens (2 6 8 3 1 4 7 5). -[] rdf:value 8; :queens (7 2 6 3 1 4 8 5). -[] rdf:value 8; :queens (3 6 2 7 1 4 8 5). -[] rdf:value 8; :queens (4 7 3 8 2 5 1 6). -[] rdf:value 8; :queens (4 8 5 3 1 7 2 6). -[] rdf:value 8; :queens (3 5 8 4 1 7 2 6). -[] rdf:value 8; :queens (4 2 8 5 7 1 3 6). -[] rdf:value 8; :queens (5 7 2 4 8 1 3 6). -[] rdf:value 8; :queens (7 4 2 5 8 1 3 6). -[] rdf:value 8; :queens (8 2 4 1 7 5 3 6). -[] rdf:value 8; :queens (7 2 4 1 8 5 3 6). -[] rdf:value 8; :queens (5 1 8 4 2 7 3 6). -[] rdf:value 8; :queens (4 1 5 8 2 7 3 6). -[] rdf:value 8; :queens (5 2 8 1 4 7 3 6). -[] rdf:value 8; :queens (3 7 2 8 5 1 4 6). -[] rdf:value 8; :queens (3 1 7 5 8 2 4 6). -[] rdf:value 8; :queens (8 2 5 3 1 7 4 6). -[] rdf:value 8; :queens (3 5 2 8 1 7 4 6). -[] rdf:value 8; :queens (3 5 7 1 4 2 8 6). -[] rdf:value 8; :queens (5 2 4 6 8 3 1 7). -[] rdf:value 8; :queens (6 3 5 8 1 4 2 7). -[] rdf:value 8; :queens (5 8 4 1 3 6 2 7). -[] rdf:value 8; :queens (4 2 5 8 6 1 3 7). -[] rdf:value 8; :queens (4 6 1 5 2 8 3 7). -[] rdf:value 8; :queens (6 3 1 8 5 2 4 7). -[] rdf:value 8; :queens (5 3 1 6 8 2 4 7). -[] rdf:value 8; :queens (4 2 8 6 1 3 5 7). -[] rdf:value 8; :queens (6 3 5 7 1 4 2 8). -[] rdf:value 8; :queens (6 4 7 1 3 5 2 8). -[] rdf:value 8; :queens (4 7 5 2 6 1 3 8). -[] rdf:value 8; :queens (5 7 2 6 3 1 4 8). diff --git a/reasoning/rdflogic/output/restdesc.trig b/reasoning/rdflogic/output/restdesc.trig deleted file mode 100644 index 996c70092..000000000 --- a/reasoning/rdflogic/output/restdesc.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:x :relGoal :y. diff --git a/reasoning/rdflogic/output/sha512.trig b/reasoning/rdflogic/output/sha512.trig deleted file mode 100644 index b1e2d4e64..000000000 --- a/reasoning/rdflogic/output/sha512.trig +++ /dev/null @@ -1,4 +0,0 @@ -@prefix rdf: . -@prefix : . - -[] rdf:value "hello world"; :sha512 "309ecc489c12d6eb4cc40f50c902f2b4d0ed77ee511a7c7a9bcd3ca86d4cd86f989dd35bc5ff499670da34255b45b0cfd830e81f605dcf7dc5542e93ae9cd76f". diff --git a/reasoning/rdflogic/output/slide32.trig b/reasoning/rdflogic/output/slide32.trig deleted file mode 100644 index 70d572d24..000000000 --- a/reasoning/rdflogic/output/slide32.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:Ghent a :HumanCommunity. diff --git a/reasoning/rdflogic/output/slide33.trig b/reasoning/rdflogic/output/slide33.trig deleted file mode 100644 index 7eae9bc29..000000000 --- a/reasoning/rdflogic/output/slide33.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:xxx a :aaa. diff --git a/reasoning/rdflogic/output/snaf.trig b/reasoning/rdflogic/output/snaf.trig deleted file mode 100644 index e7ff4b9b3..000000000 --- a/reasoning/rdflogic/output/snaf.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:Alice :hates :Nobody. diff --git a/reasoning/rdflogic/output/socrates.trig b/reasoning/rdflogic/output/socrates.trig deleted file mode 100644 index e6fa5044b..000000000 --- a/reasoning/rdflogic/output/socrates.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:Socrates a :Mortal. diff --git a/reasoning/rdflogic/output/statement.trig b/reasoning/rdflogic/output/statement.trig deleted file mode 100644 index 27006189d..000000000 --- a/reasoning/rdflogic/output/statement.trig +++ /dev/null @@ -1,22 +0,0 @@ -@prefix : . -@prefix var: . -@prefix graph: . - -:test :is true. - -_:e_bng_1_1 { - :u :v :w. - :x :y :z. -} - -_:e_bng_2_1 { - var:X graph:statement _:e_bng_1_1. -} - -_:e_bng_3_1 { - :test :is true. -} - -_:e_bng_4_1 { - var:G graph:statement var:C. -} diff --git a/reasoning/rdflogic/output/tak.trig b/reasoning/rdflogic/output/tak.trig deleted file mode 100644 index 4815ed65c..000000000 --- a/reasoning/rdflogic/output/tak.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -(18 13 8) :tak 13 . diff --git a/reasoning/rdflogic/output/turing.trig b/reasoning/rdflogic/output/turing.trig deleted file mode 100644 index 4781868f2..000000000 --- a/reasoning/rdflogic/output/turing.trig +++ /dev/null @@ -1,6 +0,0 @@ -@prefix : . - -(1 0 1 0 0 1) :compute (1 0 1 0 1 0 "#"). -(1 0 1 1 1 1) :compute (1 1 0 0 0 0 "#"). -(1 1 1 1 1 1) :compute (1 0 0 0 0 0 0 "#"). -() :compute (1 "#"). diff --git a/reasoning/rdflogic/output/union.trig b/reasoning/rdflogic/output/union.trig deleted file mode 100644 index 1d76a8dd3..000000000 --- a/reasoning/rdflogic/output/union.trig +++ /dev/null @@ -1,10 +0,0 @@ -@prefix : . - -:result :is _:sk_15. - -_:sk_15 { - :A :B :C. - :A :X :C. - :D :E :F. - :A :Y :C. -} diff --git a/reasoning/rdflogic/output/universal.trig b/reasoning/rdflogic/output/universal.trig deleted file mode 100644 index 16056b837..000000000 --- a/reasoning/rdflogic/output/universal.trig +++ /dev/null @@ -1,7 +0,0 @@ -@prefix : . -@prefix rdfs: . -@prefix skolem: . - -:pat a rdfs:Resource. -:bob :loves skolem:t_0. -skolem:t_0 :is :lonely. diff --git a/reasoning/rdflogic/output/water.trig b/reasoning/rdflogic/output/water.trig deleted file mode 100644 index 88ee7c0a8..000000000 --- a/reasoning/rdflogic/output/water.trig +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:water :is :observable. diff --git a/reasoning/rdflogic/patch.trig b/reasoning/rdflogic/patch.trig deleted file mode 100644 index 95ea80d9a..000000000 --- a/reasoning/rdflogic/patch.trig +++ /dev/null @@ -1,41 +0,0 @@ -# ------------- -# Patch example -# ------------- -# -# Patching RDF data. - -@prefix rdf: . -@prefix solid: . -@prefix log: . -@prefix var: . -@prefix : . - -# sample data -:pers001 :familyName "Garcia". -:pers001 :givenName "Claudia". -:pers002 :familyName "Cardinale". -:pers002 :givenName "Claudia". - -# patch rule -_:bng_1 log:implies true. - -_:bng_1 { - var:person :familyName "Garcia". - _:bng_2 log:becomes _:bng_3. -} - -_:bng_2 { - var:person :givenName "Claudia". -} - -_:bng_3 { - var:person :givenName "Alex". -} - -# query -_:bng_4 log:query _:bng_4. - -_:bng_4 { - var:person :familyName var:fname. - var:person :givenName var:gname. -} diff --git a/reasoning/rdflogic/peano.trig b/reasoning/rdflogic/peano.trig deleted file mode 100644 index 68b5767be..000000000 --- a/reasoning/rdflogic/peano.trig +++ /dev/null @@ -1,85 +0,0 @@ -# ---------------- -# Peano arithmetic -# ---------------- -# -# See https://en.wikipedia.org/wiki/Peano_axioms - -@prefix log: . -@prefix var: . -@prefix : . - -# add -_:bng_1 log:isImpliedBy true. - -_:bng_1 { - (var:A 0) :add var:A. -} - -_:bng_2 log:isImpliedBy _:bng_3. - -_:bng_2 { - (var:A (:s var:B)) :add (:s var:C). -} - -_:bng_3 { - (var:A var:B) :add var:C. -} - -# multiply -_:bng_4 log:isImpliedBy true. - -_:bng_4 { - (var:A 0) :multiply 0. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (var:A (:s var:B)) :multiply var:C. -} - -_:bng_6 { - (var:A var:B) :multiply var:D. - (var:A var:D) :add var:C. -} - -# factorial -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - var:A :factorial var:B. -} - -_:bng_8 { - (var:A (:s 0)) :fac var:B. -} - -_:bng_9 log:isImpliedBy true. - -_:bng_9 { - (0 var:A) :fac var:A. -} - -_:bng_10 log:isImpliedBy _:bng_11. - -_:bng_10 { - ((:s var:A) var:B) :fac var:C. -} - -_:bng_11 { - (var:B (:s var:A)) :multiply var:D. - (var:A var:D) :fac var:C. -} - -# query -_:bng_12 log:query _:bng_13. - -_:bng_12 { - ((:s 0) (:s (:s 0))) :add var:A. - (var:A (:s (:s 0))) :multiply var:B. - var:B :factorial var:C. -} - -_:bng_13 { - var:B :factorial var:C. -} diff --git a/reasoning/rdflogic/pi.trig b/reasoning/rdflogic/pi.trig deleted file mode 100644 index 22d8b8f28..000000000 --- a/reasoning/rdflogic/pi.trig +++ /dev/null @@ -1,55 +0,0 @@ -# ------------------------------------ -# Calculate pi using Nilakantha series -# ------------------------------------ -# -# See http://www.wikihow.com/Calculate-Pi - -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# components -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - (var:N var:Pi) :pi true. -} - -_:bng_2 { - (1 var:N 0 var:P 1) :pi true. - (4 var:P) math:product var:A. - (3 var:A) math:sum var:Pi. -} - -_:bng_3 log:isImpliedBy true. - -_:bng_3 { - (var:N var:N var:P var:P var:S) :pi true. -} - -_:bng_4 log:isImpliedBy _:bng_5. - -_:bng_4 { - (var:K var:N var:P0 var:P var:S) :pi true. - } - -_:bng_5 { - var:K math:notEqualTo var:N. - (var:K 1) math:sum var:K1. - (2 var:K) math:product var:K2. - (var:K2 1) math:sum var:A. - (var:K2 2) math:sum var:B. - (var:K2 var:A var:B) math:product var:C. - (var:S var:C) math:quotient var:D. - (var:P0 var:D) math:sum var:P1. - var:S math:negation var:S1. - (var:K1 var:N var:P1 var:P var:S1) :pi true. -} - -# query -_:bng_6 log:query _:bng_6. - -_:bng_6 { - (5000 var:Pi) :pi true. -} diff --git a/reasoning/rdflogic/qiana.trig b/reasoning/rdflogic/qiana.trig deleted file mode 100644 index c6d79ff44..000000000 --- a/reasoning/rdflogic/qiana.trig +++ /dev/null @@ -1,60 +0,0 @@ -# -------------- -# Qiana examples -# -------------- -# -# See https://github.com/dig-team/Qiana - -@prefix graph: . -@prefix log: . -@prefix var: . -@prefix : . - -# forall phi, x: says(Einstein, phi) => believes(x, phi) -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:x :believes var:phi. -} - -_:bng_2 { - :Einstein :says var:phi. -} - -# forall phi: says(Einstein, phi) => phi -_:bng_3 log:implies var:phi. - -_:bng_3 { - :Einstein :says var:phi. -} - -# says(Einstein, not (forall x: glitters(x) => gold(x))) -:Einstein :says _:bng_5. - -_:bng_5 { - _:bng_6 log:implies _:bng_7. -} - -_:bng_6 { - var:x a :glitter. -} - -_:bng_7 { - var:x :notNecessarilyA :gold. -} - -# example -:northStar a :glitter. - -# query -_:bng_8 log:query _:bng_8. - -_:bng_8 { - :Fabian :believes var:what. - var:what graph:statement var:content. -} - -_:bng_9 log:query _:bng_9. - -_:bng_9 { - var:x :notNecessarilyA var:what. -} diff --git a/reasoning/rdflogic/queens.trig b/reasoning/rdflogic/queens.trig deleted file mode 100644 index 4395a16db..000000000 --- a/reasoning/rdflogic/queens.trig +++ /dev/null @@ -1,117 +0,0 @@ -# ------------- -# Queens puzzle -# ------------- -# -# See https://en.wikipedia.org/wiki/Eight_queens_puzzle -# Translated from https://hanslen.github.io/2016/05/02/AI-problem-N-queens-problem-%E2%80%93-solved-in-prolog/ - -@prefix rdf: . -@prefix list: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - var:N :queens var:Qs. -} - -_:bng_2 { - (1 var:N) :range var:Us. - (var:Us ()) :queens3 var:Qs. -} - -_:bng_3 log:isImpliedBy true. - -_:bng_3 { - (() var:Qs) :queens3 var:Qs. -} - -_:bng_4 log:isImpliedBy _:bng_5. - -_:bng_4 { - (var:Us var:Ps) :queens3 var:Qs. -} - -_:bng_5 { - var:Us list:select (var:Q var:Us1). - (_:bng_6 false true) log:ifThenElseIn var:SCOPE. - var:QPs list:firstRest (var:Q var:Ps). - (var:Us1 var:QPs) :queens3 var:Qs. -} - -_:bng_6 { - var:Q :attack var:Ps. -} - -_:bng_7 log:isImpliedBy true. - -_:bng_7 { - (var:J var:J) :range (var:J). -} - -_:bng_8 log:isImpliedBy _:bng_9. - -_:bng_8 { - (var:I var:J) :range var:INs. -} - -_:bng_9 { - var:INs list:firstRest (var:I var:Ns). - var:I math:lessThan var:J. - (var:I 1) math:sum var:I1. - (var:I1 var:J) :range var:Ns. -} - -_:bng_10 log:isImpliedBy _:bng_11. - -_:bng_10 { - var:Q :attack var:Qs. -} - -_:bng_11 { - (var:Q 1) :attack3 var:Qs. -} - -_:bng_12 log:isImpliedBy _:bng_13. - -_:bng_12 { - (var:X var:N) :attack3 var:YYs. -} - -_:bng_13 { - var:YYs list:firstRest (var:Y var:Ys). - (var:Y var:N) math:sum var:X. -} - -_:bng_14 log:isImpliedBy _:bng_15. - -_:bng_14 { - (var:X var:N) :attack3 var:YYs. -} - -_:bng_15 { - var:YYs list:firstRest (var:Y var:Ys). - (var:Y var:N) math:difference var:X. -} - -_:bng_16 log:isImpliedBy _:bng_17. - -_:bng_16 { - (var:X var:N) :attack3 var:YYs. -} - -_:bng_17 { - var:YYs list:firstRest (var:Y var:Ys). - (var:N 1) math:sum var:N1. - (var:X var:N1) :attack3 var:Ys -} - -# query -_:bng_18 log:query _:bng_18. - -_:bng_18 { - [] rdf:value 8; :queens var:Qs. -} diff --git a/reasoning/rdflogic/restdesc.trig b/reasoning/rdflogic/restdesc.trig deleted file mode 100644 index 7491b3334..000000000 --- a/reasoning/rdflogic/restdesc.trig +++ /dev/null @@ -1,182 +0,0 @@ -# ------------- -# RESTdesc path -# ------------- -# -# See https://github.com/RubenVerborgh/RESTdesc-Composition-Benchmark - -@prefix http: . -@prefix log: . -@prefix var: . -@prefix : . - -# initial -:x :rel1 :y. - -# RESTdesc -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:a1 :rel1 var:b1. -} - -_:bng_2{ - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel2 var:b1. - var:a2 :rel2 var:b2. - var:a3 :rel2 var:b3. -} - -_:bng_3 log:implies _:bng_4. - -_:bng_3 { - var:a1 :rel2 var:b1. - var:a2 :rel2 var:b2. - var:a3 :rel2 var:b3. -} - -_:bng_4 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel3 var:b1. - var:a2 :rel3 var:b2. - var:a3 :rel3 var:b3. -} - -_:bng_5 log:implies _:bng_6. - -_:bng_5 { - var:a1 :rel3 var:b1. - var:a2 :rel3 var:b2. - var:a3 :rel3 var:b3. -} - -_:bng_6 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel4 var:b1. - var:a2 :rel4 var:b2. - var:a3 :rel4 var:b3. -} - -_:bng_7 log:implies _:bng_8. - -_:bng_7 { - var:a1 :rel4 var:b1. - var:a2 :rel4 var:b2. - var:a3 :rel4 var:b3. -} - -_:bng_8 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel5 var:b1. - var:a2 :rel5 var:b2. - var:a3 :rel5 var:b3. -} - -_:bng_9 log:implies _:bng_10. - -_:bng_9 { - var:a1 :rel5 var:b1. - var:a2 :rel5 var:b2. - var:a3 :rel5 var:b3. -} - -_:bng_10 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel6 var:b1. - var:a2 :rel6 var:b2. - var:a3 :rel6 var:b3. -} - -_:bng_11 log:implies _:bng_12. - -_:bng_11 { - var:a1 :rel6 var:b1. - var:a2 :rel6 var:b2. - var:a3 :rel6 var:b3. -} - -_:bng_12 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel7 var:b1. - var:a2 :rel7 var:b2. - var:a3 :rel7 var:b3. -} - -_:bng_13 log:implies _:bng_14. - -_:bng_13 { - var:a1 :rel7 var:b1. - var:a2 :rel7 var:b2. - var:a3 :rel7 var:b3. -} - -_:bng_14 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel8 var:b1. - var:a2 :rel8 var:b2. - var:a3 :rel8 var:b3. -} - -_:bng_15 log:implies _:bng_16. - -_:bng_15 { - var:a1 :rel8 var:b1. - var:a2 :rel8 var:b2. - var:a3 :rel8 var:b3. -} - -_:bng_16 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel9 var:b1. - var:a2 :rel9 var:b2. - var:a3 :rel9 var:b3. -} - -_:bng_17 log:implies _:bng_18. - -_:bng_17 { - var:a1 :rel9 var:b1. - var:a2 :rel9 var:b2. - var:a3 :rel9 var:b3. -} - -_:bng_18 { - var:request http:methodName "GET"; - http:requestURI var:a1; - http:resp var:resp. - var:resp http:body var:b1. - var:a1 :rel10 var:b1. - var:a2 :rel10 var:b2. - var:a3 :rel10 var:b3. - var:a1 :relGoal var:b1. -} - -# query -_:bng_19 log:query _:bng_19. - -_:bng_19 { - :x :relGoal :y. -} diff --git a/reasoning/rdflogic/sha512.trig b/reasoning/rdflogic/sha512.trig deleted file mode 100644 index 92d875b56..000000000 --- a/reasoning/rdflogic/sha512.trig +++ /dev/null @@ -1,23 +0,0 @@ -# -------------- -# Crypto example -# -------------- - -@prefix rdf: . -@prefix crypto: . -@prefix log: . -@prefix var: . -@prefix : . - -:Let :param "hello world". - -# query -_:bng_1 log:query _:bng_2. - -_:bng_1 { - :Let :param var:X. - var:X crypto:sha512 var:Y. -} - -_:bng_2 { - var:X :sha512 var:Y. -} diff --git a/reasoning/rdflogic/slide32.trig b/reasoning/rdflogic/slide32.trig deleted file mode 100644 index 093ebd214..000000000 --- a/reasoning/rdflogic/slide32.trig +++ /dev/null @@ -1,33 +0,0 @@ -# ---------------------------- -# RDF surfaces slide32 example -# ---------------------------- -# -# slide 32 example from https://www.slideshare.net/PatHayes/blogic-iswc-2009-invited-talk - -@prefix log: . -@prefix : . - -:Ghent a :City. - -(_:x) log:onNegativeSurface _:bng_1. - -_:bng_1 { - _:x a :City. - () log:onNegativeSurface _:bng_2. -} - -_:bng_2 { - _:x a :HumanCommunity. -} - -# query -(_:x) log:onNegativeSurface _:bng_3. - -_:bng_3 { - _:x a :HumanCommunity. - () log:onNegativeAnswerSurface _:bng_4. -} - -_:bng_4 { - _:x a :HumanCommunity. -} diff --git a/reasoning/rdflogic/slide33.trig b/reasoning/rdflogic/slide33.trig deleted file mode 100644 index 3a23ec703..000000000 --- a/reasoning/rdflogic/slide33.trig +++ /dev/null @@ -1,84 +0,0 @@ -# ---------------------------- -# RDF surfaces slide33 example -# ---------------------------- -# -# slide 32 example from https://www.slideshare.net/PatHayes/blogic-iswc-2009-invited-talk - -@prefix skolem: . -@prefix owl: . -@prefix log: . -@prefix : . - -# owl restriction -:aaa owl:onProperty :bbb. -:aaa owl:allValuesFrom :ccc. - -# the following 2 triples should entail :yyy a :ccc. -#:xxx a :aaa. -#:xxx :bbb :yyy. - -# the following codex should entail :xxx a :aaa. -(_:y) log:onNegativeSurface _:bng_1. - -_:bng_1 { - :xxx :bbb _:y. - () log:onNegativeSurface _:bng_2. -} - -_:bng_2 { - _:y a :ccc. -} - -# owl:allValuseFrom description logic -(_:a skolem:b _:c) log:onNegativeSurface _:bng_3. - -_:bng_3 { - _:a owl:onProperty skolem:b. - _:a owl:allValuesFrom _:c. - () log:onNegativeSurface _:bng_4. -} - -_:bng_4 { - (_:x _:y) log:onNegativeSurface _:bng_5. - (_:x) log:onNegativeSurface _:bng_7. -} - -_:bng_5 { - _:x a _:a. - _:x skolem:b _:y. - () log:onNegativeSurface _:bng_6. -} - -_:bng_6 { - _:y a _:c. -} - -_:bng_7 { - (_:y) log:onNegativeSurface _:bng_8. - () log:onNegativeSurface _:bng_10. -} - -_:bng_8 { - _:x skolem:b _:y. - () log:onNegativeSurface _:bng_9. -} - -_:bng_9 { - _:y a _:c. -} - -_:bng_10 { - _:x a _:a. -} - -# query -() log:onNegativeSurface _:bng_11. - -_:bng_11 { - :xxx a :aaa. - () log:onNegativeAnswerSurface _:bng_12. -} - -_:bng_12 { - :xxx a :aaa. -} diff --git a/reasoning/rdflogic/snaf.trig b/reasoning/rdflogic/snaf.trig deleted file mode 100644 index 3a8a022bb..000000000 --- a/reasoning/rdflogic/snaf.trig +++ /dev/null @@ -1,34 +0,0 @@ -# -------------------------- -# Scoped Negation As Failure -# -------------------------- - -@prefix log: . -@prefix var: . -@prefix : . - -# facts -:Alice :loves :Bob. -:Bob a :Person. - -# rule -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:SCOPE log:notIncludes _:bng_3. - var:X a :Person. -} - -_:bng_2 { - :Alice :hates :Nobody. -} - -_:bng_3 { - :Alice :hates var:X. -} - -# query -_:bng_4 log:query _:bng_4. - -_:bng_4 { - var:s :hates var:o. -} diff --git a/reasoning/rdflogic/socrates.trig b/reasoning/rdflogic/socrates.trig deleted file mode 100644 index b8c0623da..000000000 --- a/reasoning/rdflogic/socrates.trig +++ /dev/null @@ -1,33 +0,0 @@ -# ------------------ -# Socrates Inference -# ------------------ -# -# Infer that Socrates is mortal. - -@prefix rdfs: . -@prefix log: . -@prefix var: . -@prefix : . - -# facts -:Socrates a :Human. -:Human rdfs:subClassOf :Mortal. - -# rdfs subclass -_:bng_1 log:implies _:bng_2. - -_:bng_1 { - var:A rdfs:subClassOf var:B. - var:S a var:A. -} - -_:bng_2 { - var:S a var:B. -} - -# query -_:bng_3 log:query _:bng_3. - -_:bng_3 { - var:S a :Mortal. -} diff --git a/reasoning/rdflogic/statement.trig b/reasoning/rdflogic/statement.trig deleted file mode 100644 index e40da312e..000000000 --- a/reasoning/rdflogic/statement.trig +++ /dev/null @@ -1,33 +0,0 @@ -@prefix graph: . -@prefix log: . -@prefix var: . -@prefix : . - -# graph statement -_:bng_1 { - :u :v :w. - :x :y :z. -} - -# void statement -_:bng_1 graph:statement _:bng_1. - -# forward rule -_:bng_2 log:implies _:bng_3. - -_:bng_2 { - var:X graph:statement _:bng_1. -} - -_:bng_3 { - :test :is true. -} - -# query -_:bng_3 log:query _:bng_3. - -_:bng_4 log:query _:bng_4. - -_:bng_4 { - var:G graph:statement var:C. -} diff --git a/reasoning/rdflogic/tak.trig b/reasoning/rdflogic/tak.trig deleted file mode 100644 index 164da61bd..000000000 --- a/reasoning/rdflogic/tak.trig +++ /dev/null @@ -1,50 +0,0 @@ -# ----------------- -# Takeuchi Function -# ----------------- -# -# See https://en.wikipedia.org/wiki/Tak_(function) - -@prefix rdf: . -@prefix math: . -@prefix log: . -@prefix var: . -@prefix : . - -# tak backward rules -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - (var:X var:Y var:Z) :tak var:Z. -} - -_:bng_2 { - _:bng_3 log:call true. - [] rdf:value true; log:callWithCut true. -} - -_:bng_3 { - var:X math:notGreaterThan var:Y. -} - -_:bng_4 log:isImpliedBy _:bng_5. - -_:bng_4 { - (var:X var:Y var:Z) :tak var:A. -} - -_:bng_5 { - (var:X 1) math:difference var:X1. - (var:X1 var:Y var:Z) :tak var:A1. - (var:Y 1) math:difference var:Y1. - (var:Y1 var:Z var:X) :tak var:A2. - (var:Z 1) math:difference var:Z1. - (var:Z1 var:X var:Y) :tak var:A3. - (var:A1 var:A2 var:A3) :tak var:A. -} - -# query -_:bng_6 log:query _:bng_6. - -_:bng_6 { - (18 13 8) :tak var:A. -} diff --git a/reasoning/rdflogic/test b/reasoning/rdflogic/test deleted file mode 100755 index c0111c608..000000000 --- a/reasoning/rdflogic/test +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash - -RED="\e[31m" -GREEN="\e[32m" -YELLOW="\e[33m" -NORMAL="\e[0;39m" - -OK=0 -FAILED=0 - -echo -e "${YELLOW}---------------------${NORMAL}" -echo -e "${YELLOW}Running rdflogic test${NORMAL}" -echo -e "${YELLOW}---------------------${NORMAL}" -echo "" - -pad () { - [ "$#" -gt 1 ] - [ -n "$2" ] - printf "%$2.${2#-}s" "$1" -} - -begin=$(($(date +%s))) -for file in *.trig -do - echo -en "$(pad "${file}" -24)" - start=$(($(date +%s%N)/1000000)) - eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. --nope --rdf-trig-output https://eyereasoner.github.io/eye/reasoning/rdflogic/$file --output output/$file - end=$(($(date +%s%N)/1000000)) - echo -en "${YELLOW}$(pad "`expr $end - $start` msec" 12)${NORMAL} " - if [[ $(git diff output/${file} | wc -l) -eq 0 ]]; then - echo -e "${GREEN}OK${NORMAL}" - ((OK++)) - else - echo -e "${RED}FAILED${NORMAL}" - ((FAILED++)) - fi -done -end=$(($(date +%s))) -echo "" - -echo -e "${YELLOW}`expr $end - $begin` sec${NORMAL} ${GREEN}${OK} OK${NORMAL} ${RED}${FAILED} FAILED${NORMAL}" -if [[ ${FAILED} -eq 0 ]]; then - exit 0 -else - exit 2 -fi diff --git a/reasoning/rdflogic/turing.trig b/reasoning/rdflogic/turing.trig deleted file mode 100644 index 2e8e59e0e..000000000 --- a/reasoning/rdflogic/turing.trig +++ /dev/null @@ -1,155 +0,0 @@ -# -------------- -# Turing Machine -# -------------- -# -# Turing completeness test case. -# See http://en.wikipedia.org/wiki/Prolog#Turing_completeness - -@prefix list: . -@prefix log: . -@prefix var: . -@prefix : . - -# interpreter for Turing machine -_:bng_1 log:isImpliedBy _:bng_2. - -_:bng_1 { - () :compute var:OutTape. -} - -_:bng_2 { - var:Machine :start var:I. - (var:I () "#" ()) :find var:OutTape. -} - -_:bng_3 log:isImpliedBy _:bng_4. - -_:bng_3 { - var:List :compute var:OutTape. -} - -_:bng_4 { - var:List list:firstRest (var:Head var:Tail). - var:Machine :start var:I. - (var:I () var:Head var:Tail) :find var:OutTape. -} - -_:bng_5 log:isImpliedBy _:bng_6. - -_:bng_5 { - (var:State var:Left var:Cell var:Right) :find var:OutTape. -} - -_:bng_6 { - (var:State var:Cell var:Write var:Move) :tape var:Next. - (var:Move var:Left var:Write var:Right var:A var:B var:C) :move true. - (var:Next var:A var:B var:C) :continue var:OutTape. -} - -_:bng_7 log:isImpliedBy _:bng_8. - -_:bng_7 { - (:halt var:Left var:Cell var:Right) :continue var:OutTape. -} - -_:bng_8 { - var:Left :reverse var:R. - var:List list:firstRest (var:Cell var:Right). - (var:R var:List) list:append var:OutTape. -} - -_:bng_9 log:isImpliedBy _:bng_10. - -_:bng_9 { - (var:State var:Left var:Cell var:Right) :continue var:OutTape. -} - -_:bng_10 { - (var:State var:Left var:Cell var:Right) :find var:OutTape. -} - -_:bng_11 log:isImpliedBy _:bng_12. - -_:bng_11 { - (:left () var:Cell var:Right () "#" var:L) :move true. -} - -_:bng_12 { - var:L list:firstRest (var:Cell var:Right). -} - -_:bng_13 log:isImpliedBy _:bng_14. - -_:bng_13 { - (:left var:List var:Cell var:Right var:Tail var:Head var:L) :move true. -} - -_:bng_14 { - var:List list:firstRest (var:Head var:Tail). - var:L list:firstRest (var:Cell var:Right). -} - -_:bng_15 log:isImpliedBy true. - -_:bng_15 { - (:stop var:Left var:Cell var:Right var:Left var:Cell var:Right) :move true. -} - -_:bng_16 log:isImpliedBy _:bng_17. - -_:bng_16 { - (:right var:Left var:Cell () var:L "#" ()) :move true. -} - -_:bng_17 { - var:L list:firstRest (var:Cell var:Left). -} - -_:bng_18 log:isImpliedBy _:bng_19. - -_:bng_18 { - (:right var:Left var:Cell var:List var:L var:Head var:Tail) :move true. -} - -_:bng_19 { - var:List list:firstRest (var:Head var:Tail). - var:L list:firstRest (var:Cell var:Left). -} - -_:bng_20 log:isImpliedBy true. - -_:bng_20 { - () :reverse (). -} - -_:bng_21 log:isImpliedBy _:bng_22. - -_:bng_21 { - var:List :reverse var:Reverse. -} - -_:bng_22 { - var:List list:firstRest (var:Head var:Tail). - var:Tail :reverse var:R. - (var:R (var:Head)) list:append var:Reverse. -} - -# a Turing machine to add 1 to a binary number -:add1 :start 0. - -(0 0 0 :right) :tape 0. -(0 1 1 :right) :tape 0. -(0 "#" "#" :left) :tape 1. -(1 0 1 :stop) :tape :halt. -(1 1 0 :left) :tape 1. -(1 "#" 1 :stop) :tape :halt. - -# query -_:bng_23 log:query _:bng_23. - -_:bng_23 { - (1 0 1 0 0 1) :compute var:A1. - (1 0 1 1 1 1) :compute var:A2. - (1 1 1 1 1 1) :compute var:A3. - () :compute var:A4. -} diff --git a/reasoning/rdflogic/union.trig b/reasoning/rdflogic/union.trig deleted file mode 100644 index 057cf79a3..000000000 --- a/reasoning/rdflogic/union.trig +++ /dev/null @@ -1,31 +0,0 @@ -# ------------------- -# Graph union example -# ------------------- - -@prefix graph: . -@prefix log: . -@prefix var: . -@prefix : . - -_:bng_1 { - :A :B :C. - :A :X :C. - :D :E :F. -} - -_:bng_2 { - :A :Y :C. - :A :B :C. -} - -#query -_:bng_3 log:query _:bng_4. - -_:bng_3 { - (_:bng_1 _:bng_2) graph:union var:U. -} - -_:bng_4 { - :result :is var:R. - var:R graph:statement var:U. -} diff --git a/reasoning/rdflogic/universal.trig b/reasoning/rdflogic/universal.trig deleted file mode 100644 index d49cc2bd2..000000000 --- a/reasoning/rdflogic/universal.trig +++ /dev/null @@ -1,50 +0,0 @@ -# -------------------- -# Universal statements -# -------------------- - -@prefix rdfs: . -@prefix log: . -@prefix var: . -@prefix : . - -# \Every x: type(x, Resource -_:bng_1 log:isImpliedBy true. - -_:bng_1 { - var:X a rdfs:Resource. -} - -# Everybody loves somebody who is lonely -_:bng_2 log:isImpliedBy _:bng_3. - -_:bng_2 { - var:A :loves var:B. -} - -_:bng_3 { - (var:A) log:skolem var:B. -} - -_:bng_4 log:isImpliedBy _:bng_5. - -_:bng_4 { - var:B :is :lonely. -} - -_:bng_5 { - (var:A) log:skolem var:B. -} - -# queries -_:bng_6 log:query _:bng_6. - -_:bng_6 { - :pat a rdfs:Resource. -} - -_:bng_7 log:query _:bng_7. - -_:bng_7 { - :bob :loves var:X. - var:X :is :lonely. -} diff --git a/reasoning/rdflogic/water.trig b/reasoning/rdflogic/water.trig deleted file mode 100644 index 4b564340d..000000000 --- a/reasoning/rdflogic/water.trig +++ /dev/null @@ -1,73 +0,0 @@ -# -------------------------- -# RDF surfaces water example -# -------------------------- -# -# See https://en.wikipedia.org/wiki/Disjunction_elimination - -@prefix log: . -@prefix : . - -# water is an inorganic compound -:water a :InorganicCompound. - -# water is solid or liquid or gas -(_:A) log:onNegativeSurface _:bng_1. - -_:bng_1 { - _:A a :InorganicCompound. - () log:onNegativeSurface _:bng_2. - () log:onNegativeSurface _:bng_3. - () log:onNegativeSurface _:bng_4. -} - -_:bng_2 { - _:A :is :solid. -} - -_:bng_3 { - _:A :is :liquid. -} - -_:bng_4 { - _:A :is :gas. -} - -# solid things are observable -(_:A) log:onNegativeSurface _:bng_5. - -_:bng_5 { - _:A :is :solid. - () log:onNegativeSurface _:bng_6. -} - -_:bng_6 { - _:A :is :observable. -} - -# liquid things are observable -(_:A) log:onNegativeSurface _:bng_7. - -_:bng_7 { - _:A :is :liquid. - () log:onNegativeSurface _:bng_6. -} - -# gas things are observable -(_:A) log:onNegativeSurface _:bng_8. - -_:bng_8 { - _:A :is :gas. - () log:onNegativeSurface _:bng_6. -} - -# query -(_:A) log:onNegativeSurface _:bng_9. - -_:bng_9 { - _:A :is :observable. - () log:onNegativeAnswerSurface _:bng_10. -} - -_:bng_10 { - _:A :is :observable. -}