Skip to content

Commit

Permalink
preparing rdf12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Oct 11, 2024
1 parent 3baedf8 commit 8a6ce27
Show file tree
Hide file tree
Showing 15 changed files with 132 additions and 65 deletions.
1 change: 1 addition & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
EYE release

v10.24.20 (2024-10-11) preparing rdf12 support
v10.24.19 (2024-10-11) fixing issue with rdfsurfaces in cgs (closed graph semantics)
v10.24.18 (2024-10-10) fixing graph:statement for cgs (closed graph semantics)
v10.24.17 (2024-10-09) fixing log:query for bng (blank node graphs)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.24.19
10.24.20
13 changes: 7 additions & 6 deletions eye.pl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
:- catch(use_module(library(process)), _, true).
:- catch(use_module(library(http/http_open)), _, true).

version_info('EYE v10.24.19 (2024-10-11)').
version_info('EYE v10.24.20 (2024-10-11)').

license_info('MIT License

Expand Down Expand Up @@ -2158,9 +2158,12 @@
subject(S, Ts),
verb(P, Tp),
object(O, To),
{ append([Ts, Tp, To], T)
},
edgename(N),
{ ( flag('trig-output')
-> append([['\'<http://www.w3.org/1999/02/22-rdf-syntax-ns#reifies>\''(N, triple(S, P, O))], Ts, Tp, To], T)
; append([Ts, Tp, To], T)
)
},
[gt_gt].
pathitem(Node, []) -->
['{'],
Expand Down Expand Up @@ -5402,7 +5405,7 @@
'<http://www.w3.org/2000/10/swap/log#isImpliedBy>'(A, B),
'<http://www.w3.org/2000/10/swap/graph#statement>'(A, C),
'<http://www.w3.org/2000/10/swap/graph#statement>'(B, D)
), (C:-D), '<>')),
), ':-'(C, D), '<>')),

% create queries
assertz(implies((
Expand Down Expand Up @@ -5697,7 +5700,6 @@
makevars([I, J], [Iu, Ju], beta(U)),
C = implies(Iu, Ju, '<>'),
copy_term_nat(C, CC),
labelvars(CC, 0, _, avar),
( \+cc(CC)
-> assertz(cc(CC)),
assertz(C),
Expand Down Expand Up @@ -12247,7 +12249,6 @@

labelvars(A, B, C, D) :-
var(A),
nonvar(D),
!,
atom_number(E, B),
atomic_list_concat([D, E], A), % failing when A is an attributed variable
Expand Down
Binary file modified eye.zip
Binary file not shown.
5 changes: 5 additions & 0 deletions reasoning/issue118/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---------
Issue 118
---------

See https://github.com/eyereasoner/eye/issues/118
10 changes: 10 additions & 0 deletions reasoning/issue118/issue118-answer.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@prefix : <http:/example.org/>.
@prefix skolem: <https://eyereasoner.github.io/.well-known/genid/d983461b-11b7-4e52-89c1-328e91bf1de1#>.

:s a :Success.
{
skolem:bn_5 :value ?U_1.
} <= {
:s :value ?U_1.
}.
skolem:bn_5 a :Success.
15 changes: 15 additions & 0 deletions reasoning/issue118/issue118.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@prefix : <http:/example.org/>.
@prefix skolem: <https://eyereasoner.github.io/.well-known/genid/d983461b-11b7-4e52-89c1-328e91bf1de1#>.

:s :value 1 .
:s :copy skolem:bn_5.

{ ?s :value ?value } => { ?s a :Success } .

{
:s :copy ?o
}
=>
{
{ ?o :value ?value } <= { :s :value ?value }
} .
2 changes: 2 additions & 0 deletions reasoning/issue118/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. --nope https://eyereasoner.github.io/eye/reasoning/issue118/issue118.n3 --pass-only-new --output issue118-answer.n3
22 changes: 16 additions & 6 deletions reasoning/n3trig/in.n3
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://example.org/#>.
Expand Down Expand Up @@ -28,9 +29,18 @@ _:bng_2 {
}.
}.

# query
{
?G graph:statement ?C.
} =^ {
?G graph:statement ?C.
}.
# occurences
:s :p << :d :e :f >> .
:s :p << :g :h :i ~ :x >> .

<< :a :b _:x ~ :r >> :c :d .
<< :a :b _:y ~ :r >> :c :d .

<< :s :p [ :q1 "A" ; :q2 "B" ] ~ :x >> .

# annotations
:s :p :o {| :j :k |} .

:liz :marriedTo :richard
{| :from 1964; :to 1975 |}
{| :from 1980; :to 2001 |} .
36 changes: 31 additions & 5 deletions reasoning/n3trig/out.n3
Original file line number Diff line number Diff line change
@@ -1,14 +1,40 @@
@prefix : <http://example.org/#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.

:s :p << :d :e :f >>.
:s :p << :g :h :i ~ :x >>.
:s :p :o.
_:bne_20 rdf:reifies <<( :d :e :f )>>.
:x rdf:reifies <<( :g :h :i )>>.
:r rdf:reifies <<( :a :b _:e_x_1 )>>.
:r rdf:reifies <<( :a :b _:e_y_1 )>>.
:x rdf:reifies <<( :s :p _:bn_1 )>>.
<< :a :b _:e_x_1 ~ :r >> :c :d.
<< :a :b _:e_y_1 ~ :r >> :c :d.
_:bn_1 :q1 "A".
_:bn_1 :q2 "B".
<< :s :p :o >> :j :k.
:liz :marriedTo :richard.
<< :liz :marriedTo :richard >> :from 1964 .
<< :liz :marriedTo :richard >> :from 1980 .
<< :liz :marriedTo :richard >> :to 1975 .
<< :liz :marriedTo :richard >> :to 2001 .
_:bng_1 log:implies _:bng_2.

_:e_bng_1_1 {
:s :p _:e_x_1.
:s :p :o.
_:bng_1 {
_:sk_1 graph:statement _:sk_2.
_:sk_2 graph:member _:bng_3.
}

_:e_bng_2_1 {
_:bng_2 {
var:x_0 graph:statement _:sk_0.
}

_:bng_3 {
:a :b :c.
:d :e _:e_x_1.
}

_:sk_0 {
Expand Down
43 changes: 43 additions & 0 deletions reasoning/n3trig/out.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
@prefix : <http://example.org/#>.
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.

:s :p << :d :e :f >>.
:s :p << :g :h :i ~ :x >>.
:s :p :o.
_:bne_20 rdf:reifies <<( :d :e :f )>>.
:x rdf:reifies <<( :g :h :i )>>.
:r rdf:reifies <<( :a :b _:e_x_1 )>>.
:r rdf:reifies <<( :a :b _:e_y_1 )>>.
:x rdf:reifies <<( :s :p _:bn_1 )>>.
<< :a :b _:e_x_1 ~ :r >> :c :d.
<< :a :b _:e_y_1 ~ :r >> :c :d.
_:bn_1 :q1 "A".
_:bn_1 :q2 "B".
<< :s :p :o >> :j :k.
:liz :marriedTo :richard.
<< :liz :marriedTo :richard >> :from 1964 .
<< :liz :marriedTo :richard >> :from 1980 .
<< :liz :marriedTo :richard >> :to 1975 .
<< :liz :marriedTo :richard >> :to 2001 .
_:bng_1 log:implies _:bng_2.

_:bng_1 {
_:sk_1 graph:statement _:sk_2.
_:sk_2 graph:member _:bng_3.
}

_:bng_2 {
var:x_0 graph:statement _:sk_0.
}

_:bng_3 {
:a :b :c.
}

_:sk_0 {
:u :v :w.
:x :y :z.
}
2 changes: 1 addition & 1 deletion reasoning/n3trig/test
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. --nope https://eyereasoner.github.io/eye/reasoning/n3trig/in.n3 --output out.n3
eye --quiet --skolem-genid 8b98b360-9a70-4845-b52c-c675af60ad01 --wcache https://eyereasoner.github.io/eye/reasoning .. --nope --trig-output https://eyereasoner.github.io/eye/reasoning/n3trig/in.n3 --pass-all --output out.trig
2 changes: 0 additions & 2 deletions reasoning/temp/test

This file was deleted.

23 changes: 0 additions & 23 deletions reasoning/temp/test-output.ttl

This file was deleted.

21 changes: 0 additions & 21 deletions reasoning/temp/test.ttl

This file was deleted.

0 comments on commit 8a6ce27

Please sign in to comment.