Skip to content

Commit

Permalink
adding graph equality example
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Aug 26, 2024
1 parent 1e04823 commit fb9bc0e
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 0 deletions.
37 changes: 37 additions & 0 deletions etc/equality.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ----------------------
# Graph equality example
# ----------------------

PREFIX log: <http://www.w3.org/2000/10/swap/log#>
PREFIX lingua: <http://www.w3.org/2000/10/swap/lingua#>
PREFIX var: <http://www.w3.org/2000/10/swap/var#>
PREFIX : <#>

GRAPH _:bng_1 {
:A :B :C.
:D :E _:bng_2.
}

GRAPH _:bng_2 {
:F :G var:H.
}

GRAPH _:bng_3 {
:D :E _:bng_4.
:A :B :C.
}

GRAPH _:bng_4 {
:F :G var:I.
}

#query
_:bng_5 lingua:answer _:bng_6.

GRAPH _:bng_5 {
_:bng_1 log:equalTo _:bng_3.
}

GRAPH _:bng_6 {
:test :is true.
}
33 changes: 33 additions & 0 deletions etc/output/equality.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
PREFIX : <https://eyereasoner.github.io/lingua/etc/equality.trig#>
PREFIX lingua: <http://www.w3.org/2000/10/swap/lingua#>
PREFIX log: <http://www.w3.org/2000/10/swap/log#>

:test :is true.

#
# lingua explanation
#

_:bng_1 lingua:explanation _:bng_2.

GRAPH _:bng_5 {
:F :G _:sk_0.
}

GRAPH _:bng_1 {
_:bng_3 log:equalTo _:bng_4.
}

GRAPH _:bng_2 {
:test :is true.
}

GRAPH _:bng_3 {
:A :B :C.
:D :E _:bng_5.
}

GRAPH _:bng_4 {
:D :E _:bng_5.
:A :B :C.
}

0 comments on commit fb9bc0e

Please sign in to comment.