Skip to content

Commit

Permalink
improving the way to deal with backward rules in blogic
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Apr 14, 2023
1 parent 0fe7e83 commit 1afe565
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 3 deletions.
1 change: 1 addition & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
EYE release

v3.19.0 (2023-04-14) improving the way to deal with backward rules in blogic
v3.18.1 (2023-04-13) using memberchk to improve the performance
v3.18.0 (2023-04-13) more scalable resolve negative surfaces
v3.17.6 (2023-04-12) removing the negative surface count limit
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.18.1
3.19.0
7 changes: 5 additions & 2 deletions eye.pl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
:- use_module(library(semweb/turtle)).
:- catch(use_module(library(http/http_open)), _, true).

version_info('EYE v3.18.1 (2023-04-13)').
version_info('EYE v3.19.0 (2023-04-14)').

license_info('MIT License

Expand Down Expand Up @@ -718,7 +718,8 @@
% blow inference fuse
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, G),
makevars(G, H, beta(V)),
catch(call(H), _, false)
catch(call(H), _, false),
'<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, H)
), false, '<>')),
% resolve positive surface
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, G),
Expand All @@ -745,6 +746,7 @@
% resolve negative surfaces
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, G),
conj_list(G, L),
\+member('<http://www.w3.org/2000/10/swap/log#onQuerySurface>'(_, _), L),
findall(1,
( member('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, _), L)
),
Expand All @@ -754,6 +756,7 @@
memberchk(E, [0, 2, 3]),
'<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(W, F),
conj_list(F, K),
\+member('<http://www.w3.org/2000/10/swap/log#onQuerySurface>'(_, _), K),
length(K, 2),
\+ (member('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, I), K), atomic(I)),
makevars(K, J, beta(W)),
Expand Down
Binary file modified eye.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions reasoning/blogic/edt-answer.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://eulersharp.sourceforge.net/2009/12dtb/test#>.

:i100000 a :N100000.

16 changes: 16 additions & 0 deletions reasoning/blogic/edt.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix : <http://eulersharp.sourceforge.net/2009/12dtb/test#>.

(_:X _:D _:C) log:onNegativeSurface {
() log:onQuerySurface {
_:X a _:D.
}.
_:C rdfs:subClassOf _:D.
_:X a _:C.
}.

# query
() log:onQuerySurface {
:i100000 a :N100000.
}.
1 change: 1 addition & 0 deletions reasoning/blogic/test
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/disj2.n3 --output disj2-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/disj3.n3 --output disj3-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/disj-elim.n3 --output disj-elim-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/edt.n3 --turtle http://eyereasoner.github.io/eye/reasoning/edt/test-facts.ttl --turtle http://eyereasoner.github.io/eye/reasoning/edt/test-dl.ttl --output edt-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/equal.n3 --output equal-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/equal2.n3 --output equal2-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/eras1.n3 --output eras1-answer.n3
Expand Down

0 comments on commit 1afe565

Please sign in to comment.