Skip to content

Commit

Permalink
fixing log:query for bng (blank node graphs)
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Oct 9, 2024
1 parent 5ad2c84 commit a5cf3a5
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 6 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.17 (2024-10-09) fixing log:query for bng (blank node graphs)
v10.24.16 (2024-10-07) adding extra ("skolem-genid" "your-genid" args) log:skolem iri
v10.24.15 (2024-10-06) refactoring graph statement maps
v10.24.14 (2024-10-05) fixing https://github.com/eyereasoner/eye/issues/118 for gsm
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.24.16
10.24.17
11 changes: 6 additions & 5 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.16 (2024-10-07)').
version_info('EYE v10.24.17 (2024-10-09)').

license_info('MIT License

Expand Down Expand Up @@ -5285,9 +5285,9 @@
\+atomic(A),
\+atomic(B),
djiti_answer(answer(B), D),
\+implies(A, D, '<>'),
!,
makevars(implies(A, D, '<>'), C, zeta).
makevars(implies(A, D, '<>'), C, zeta),
\+C,
!.
djiti_fact(quad(T, G), quad(T, G)) :-
!,
( \+graphid(G)
Expand Down Expand Up @@ -5396,7 +5396,8 @@
assertz(implies((
'<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), '<>')),
'<http://www.w3.org/2000/10/swap/graph#statement>'(B, D)
), (C:-D), '<>')),

% create queries
assertz(implies((
Expand Down
Binary file modified eye.zip
Binary file not shown.
77 changes: 77 additions & 0 deletions reasoning/bng/complement.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# ----------------------------------------
# Negation as envisioned by Wouter Termont
# ----------------------------------------

@prefix var: <http://www.w3.org/2000/10/swap/var#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://example.org/#>.

# Each predicate in RDF represents a binary relation, i.e. a set of 2-tuples.
# For each of those relations you can formulate exactly one complementary
# relation, which contains exactly the pairs of elements that are not in the
# original set (from this follows LEM). If we represent the relationship
# between these complements by a predicate, e.g. log:complement, then we
# can express the following in pure RDF
#
# NOT {
# _:s1 :p1 _:o1.
# _:s2 :p2 _:o2.
# _:s3 :p3 _:o3.
# }

_:bng_1 log:implies _:bng_2.

_:bng_1 {
_:s1 :p1 _:o1.
_:s2 :p2 _:o2.
}

_:bng_2 {
:c3 log:complement :p3.
_:s3 :c3 _:o3.
}

_:bng_3 log:implies _:bng_4.

_:bng_3 {
_:s2 :p2 _:o2.
_:s3 :p3 _:o3.
}

_:bng_4 {
:c1 log:complement :p1.
_:s1 :c1 _:o1.
}

_:bng_5 log:implies _:bng_6.

_:bng_5 {
_:s3 :p3 _:o3.
_:s1 :p1 _:o1.
}

_:bng_6 {
:c2 log:complement :p2.
_:s2 :c2 _:o2.
}

# asserting the following should blow an inference fuse
# _:s1 :p1 _:o1.
# _:s2 :p2 _:o2.
# _:s3 :p3 _:o3.

# fuse
_:bng_7 log:implies false.

_:bng_7 {
var:P log:complement var:C.
var:S var:P var:O.
var:S var:C var:O.
}

# query
_:bng_8 log:query _:bng_8.

_:bng_8 {
_:bng_7 log:implies false.
}
9 changes: 9 additions & 0 deletions reasoning/bng/output/complement.trig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@prefix log: <http://www.w3.org/2000/10/swap/log#>.

_:bng_1 log:implies false.

_:bng_1 {
log:complement log:complement log:complement.
log:complement log:complement log:complement.
log:complement log:complement log:complement.
}

0 comments on commit a5cf3a5

Please sign in to comment.