Skip to content

Commit

Permalink
adding some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Oct 25, 2024
1 parent ebd0333 commit e36e6d1
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions reasoning/rdflogic/output/test.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@prefix : <http://example.org/#>.

:result :is {
:a :b :c.
:d :e :f.
}.
29 changes: 29 additions & 0 deletions reasoning/rdflogic/test.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix : <http://example.org/#>.

:g1 log:univ (log:conjunction
[ log:univ (log:triple :a :b :c)]
[ log:univ (log:triple :d :e :f)]
).

:g2 log:univ (log:conjunction
[ log:univ (log:triple :d :e :f)]
[ log:univ (log:triple :a :b :c)]
[ log:univ (log:triple :d :e :f)]
).

[ log:univ (log:conjunction
[ log:univ (log:triple :g1 log:equalTo :g2)]
[ log:univ (log:triple (:g1 :g2) graph:union var:R)]
)] log:implies [ log:univ (log:conjunction
[ log:univ (log:triple :result :is var:R)]
)].

# query
[ log:univ (log:conjunction
[ log:univ (log:triple :result :is var:R)]
)] log:query [ log:univ (log:conjunction
[ log:univ (log:triple :result :is var:R)]
)].

0 comments on commit e36e6d1

Please sign in to comment.