diff --git a/rdfreasoning/temp/backward.ttl b/rdfreasoning/temp/backward.ttl new file mode 100644 index 000000000..24c32ba13 --- /dev/null +++ b/rdfreasoning/temp/backward.ttl @@ -0,0 +1,27 @@ +@prefix math: . +@prefix rule: . +@prefix : . + +# see https://www.w3.org/2000/10/swap/doc/tutorial-1.pdf page 17 +# something is more interesting if it is greater +[] a rule:BackwardRule; + rule:vars ( + _:X + _:Y + ); + rule:conclusion ( + (_:X :moreInterestingThan _:Y) + ); + rule:premise ( + (_:X math:greaterThan _:Y) + ). + +# query +[] a rule:QueryRule; + rule:vars (); + rule:premise ( + (5 :moreInterestingThan 3) + ); + rule:conclusion ( + (5 :moreInterestingThan 3) + ). diff --git a/rdfreasoning/temp/forward.ttl b/rdfreasoning/temp/forward.ttl new file mode 100644 index 000000000..6206b6236 --- /dev/null +++ b/rdfreasoning/temp/forward.ttl @@ -0,0 +1,30 @@ +@prefix rdf: . +@prefix rule: . +@prefix : . + +# facts +:Socrates a :Human. + +# humans are mortal +[] a rule:ForwardRule; + rule:vars ( + _:S + ); + rule:premise ( + (_:S rdf:type :Human) + ); + rule:conclusion ( + (_:S rdf:type :Mortal) + ). + +# query +[] a rule:QueryRule; + rule:vars ( + _:S + ); + rule:premise ( + (_:S rdf:type :Mortal) + ); + rule:conclusion ( + (_:S rdf:type :Mortal) + ). diff --git a/rdfreasoning/temp/out/backward.ttl.out b/rdfreasoning/temp/out/backward.ttl.out new file mode 100644 index 000000000..0a4de93a5 --- /dev/null +++ b/rdfreasoning/temp/out/backward.ttl.out @@ -0,0 +1,3 @@ +@prefix : . + +5 :moreInterestingThan 3 . diff --git a/rdfreasoning/temp/out/forward.ttl.out b/rdfreasoning/temp/out/forward.ttl.out new file mode 100644 index 000000000..a09795399 --- /dev/null +++ b/rdfreasoning/temp/out/forward.ttl.out @@ -0,0 +1,3 @@ +@prefix : . + +:Socrates a :Mortal. diff --git a/rdfreasoning/temp/test b/rdfreasoning/temp/test index 918350caa..6cbebfe56 100755 --- a/rdfreasoning/temp/test +++ b/rdfreasoning/temp/test @@ -1,5 +1,7 @@ #!/bin/bash -x eye --quiet --nope append.ttl --output out/append.ttl.out +eye --quiet --nope backward.ttl --output out/backward.ttl.out +eye --quiet --nope forward.ttl --output out/forward.ttl.out eye --quiet --nope lott.ttl --output out/lott.ttl.out eye --quiet --nope sha512.ttl --output out/sha512.ttl.out eye --quiet --nope socrates-contradiction.ttl 2> out/socrates-contradiction.ttl.out