Skip to content

Commit

Permalink
simplified blogic implementation thanks to erasure at even level
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Feb 27, 2023
1 parent 0727a38 commit 59458fc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 29 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.3.0] simplified blogic implementation thanks to erasure at even level
[v3.2.3] fixing issue https://github.com/eyereasoner/eye/issues/72
[v3.2.2] fixing issue https://github.com/eyereasoner/eye/issues/71
[v3.2.1] making log:isImpliedBy explicit instead of just its syntactic sugar <= (obs from Jesse Wright)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.3
3.3.0
40 changes: 12 additions & 28 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.2.3 josd').
version_info('EYE v3.3.0 josd').

license_info('MIT License

Expand Down Expand Up @@ -723,38 +723,22 @@
append(K, D, E),
conj_list(F, E)
), '<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, F), '<>')),
% resolve negative surface 1
% erase at even level
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(X, G),
getlist(X, V),
conj_list(G, L),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, H), L, K),
getlist(Y, W),
conj_list(C, K),
conj_list(H, M),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, C), M, _)
), '<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(W, C), '<>')),
% resolve negative surface 2
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(X, G),
getlist(X, V),
conj_list(G, L),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, H), L, K),
conj_list(H, M),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, C), M, _),
call(C),
conj_list(J, K)
), '<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, J), '<>')),
% resolve negative surface 3
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(X, G),
getlist(X, V),
conj_list(G, L),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, H), L, K),
getlist(Y, W),
getlist(Y, []),
conj_list(H, M),
select(Q, M, N),
member(Q, L),
conj_list(O, N),
conj_list(C, ['<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, O)|K])
), '<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(W, C), '<>')),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, O), M, N),
( conj_list(O, D),
append(K, D, E),
conj_list(C, E)
; length(K, I),
I > 1,
conj_list(F, N),
conj_list(C, ['<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(Y, F)|K])
)), '<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, C), '<>')),
% non-unit resolution
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(X, G),
getlist(X, V),
Expand Down
Binary file modified eye.zip
Binary file not shown.

0 comments on commit 59458fc

Please sign in to comment.