diff --git a/RELEASE b/RELEASE index 0f905afdf..c5479acfd 100644 --- a/RELEASE +++ b/RELEASE @@ -1,5 +1,6 @@ EYE release +v8.6.16 (2023-11-21) fixing rdfreasoning for variable conclusions v8.6.15 (2023-11-20) taking out sequents in blogic and checking if list-of-3-tuples are unambigous for all built-ins used in rdfreasoning v8.6.14 (2023-11-20) renaming recent work to rdfreasoning v8.6.13 (2023-11-18) beautifying output for looking-through-rdf-glasses diff --git a/VERSION b/VERSION index aec18e369..849161024 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.6.15 +8.6.16 diff --git a/eye.pl b/eye.pl index 5d62dc88d..b5f647538 100644 --- a/eye.pl +++ b/eye.pl @@ -21,7 +21,7 @@ :- use_module(library(pcre)). :- catch(use_module(library(http/http_open)), _, true). -version_info('EYE v8.6.15 (2023-11-20)'). +version_info('EYE v8.6.16 (2023-11-21)'). license_info('MIT License @@ -5379,6 +5379,14 @@ djiti_conc(answer((A, B), void, void), (answer(A, void, void), D)) :- !, djiti_conc(answer(B, void, void), D). +djiti_conc(answer(A, void, void), answer(B, void, void)) :- + is_lott(A), + !, + getconj(A, B). +djiti_conc(A, B) :- + is_lott(A), + !, + getconj(A, B). djiti_conc(A, A). djiti_fact(answer(P, S, O), answer(P, S, O)) :- @@ -7512,7 +7520,11 @@ wg(U), write(' TRACE '), copy_term_nat(Y, V), - wg(V), + ( number(X), + X < 0 + -> fm(V) + ; wg(V) + ), nl, told, ( flag('output', Output) diff --git a/eye.zip b/eye.zip index 49afd6782..abee1770d 100644 Binary files a/eye.zip and b/eye.zip differ diff --git a/rdfreasoning/unpack/README b/rdfreasoning/unpack/README new file mode 100644 index 000000000..53dc374a1 --- /dev/null +++ b/rdfreasoning/unpack/README @@ -0,0 +1,5 @@ +--------- +Packaging +--------- + +An example of packaging and unpackaging in RDF. diff --git a/rdfreasoning/unpack/out/unpack.ttl.out b/rdfreasoning/unpack/out/unpack.ttl.out new file mode 100644 index 000000000..3a98a6ab0 --- /dev/null +++ b/rdfreasoning/unpack/out/unpack.ttl.out @@ -0,0 +1,4 @@ +@prefix : . + +:a :b _:e_c_1 +:u :v _:e_w_1. diff --git a/rdfreasoning/unpack/test b/rdfreasoning/unpack/test new file mode 100755 index 000000000..cb15303f4 --- /dev/null +++ b/rdfreasoning/unpack/test @@ -0,0 +1,2 @@ +#!/bin/bash -x +eye --quiet --nope unpack.ttl --output out/unpack.ttl.out diff --git a/rdfreasoning/unpack/unpack.ttl b/rdfreasoning/unpack/unpack.ttl new file mode 100644 index 000000000..c36e9ee52 --- /dev/null +++ b/rdfreasoning/unpack/unpack.ttl @@ -0,0 +1,92 @@ +@prefix list: . +@prefix log: . +@prefix rule: . +@prefix : . + +# sample data from RubenD +_:b1 :data ( + (_:b2 :package ( + (_:b3 :content ( + (:a :b _:c) + (_:b4 :package ( + (_:b5 :content ( + (:u :v _:w) + (_:b6 :package ( + (_:b7 :content ( + (:x :y _:z) + )) + (_:b7 :usable_until :yesterday) + )) + (_:b6 :tag :invalid) + )) + (_:b5 :usable_until :tomorrow) + (_:b5 :p :o) + )) + (_:b4 :tag :valid) + )) + (_:b3 :usable_until :next_week) + )) + (_:b2 :tag :valid) +). + +# the logic for unpack using backward rules +[] a rule:BackwardRule; + rule:premise (); + rule:conclusion ( + (() :unpackLott ()) + ). + +[] a rule:BackwardRule; + rule:premise ( + (_:g list:firstRest (_:f _:r)) + (_:f :unpack _:a) + (_:r :unpackLott _:b) + ((_:a _:b) list:append _:h) + ); + rule:conclusion ( + (_:g :unpackLott _:h) + ). + +[] a rule:BackwardRule; + rule:premise ( + (_:p list:member (_:a :content _:c)) + (_:p list:member (_:a :usable_until _:t)) + ((:tomorrow :next_week) list:member _:t) + (_:c :unpackLott _:f) + ); + rule:conclusion ( + ((_:b :package _:p) :unpack _:f) + ). + +[] a rule:BackwardRule; + rule:premise ( + (_:p list:member (_:a :content _:c)) + (_:p list:member (_:a :usable_until _:t)) + ((:yesterday :last_week) list:member _:t) + ); + rule:conclusion ( + ((_:b :package _:p) :unpack ()) + ). + +[] a rule:BackwardRule; + rule:premise (); + rule:conclusion ( + ((_:b :tag _:p) :unpack ()) + ). + +[] a rule:BackwardRule; + rule:premise ( + ((_:g) list:notMember (_:a :package _:p)) + ((_:g) list:notMember (_:b :tag _:q)) + ); + rule:conclusion ( + (_:g :unpack (_:g)) + ). + +# unpack the triples that are usable in the future +[] a rule:QueryRule; + rule:premise ( + (_:b :data _:g) + (_:g :unpackLott _:m) + ); + rule:conclusion _:m.