Skip to content

Commit

Permalink
adding non-unit resolution for blogic
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Feb 15, 2023
1 parent 4273854 commit 9792285
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 16 deletions.
1 change: 1 addition & 0 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
EYE release

[v2.11.0] adding non-unit resolution for blogic
[v2.10.3] adding blogic negative surface redundancy removal
[v2.10.2] using log:onQuerySurface instead of log:onConstructSurface
[v2.10.1] fixing https://github.com/eyereasoner/Notation3-By-Example/blob/main/log/blogic/negativeSurface3.n3
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.10.3
2.11.0
24 changes: 23 additions & 1 deletion 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 v2.10.3 josd').
version_info('EYE v2.11.0 josd').

license_info('MIT License

Expand Down Expand Up @@ -740,6 +740,28 @@
-> assertz('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, H))
; true
)), true, '<>')),
% non-unit resolution
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#onPositiveSurface>'(_, _), 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)
),
D
),
length(D, E),
E < 4,
'<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, F),
conj_list(F, K),
length(K, 2),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(U, C), K, [P]),
select('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(_, P), L, M),
conj_list(H, ['<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(U, C)|M]),
( \+'<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, H)
-> assertz('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, H))
; true
)), true, '<>')),
% adjust graffiti
assertz(implies(('<http://www.w3.org/2000/10/swap/log#onNegativeSurface>'(V, G),
findvars(G, U, beta),
Expand Down
Binary file modified eye.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle.n3
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
8 changes: 8 additions & 0 deletions reasoning/blogic/beetle10a-answer.n3
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ log:onNegativeSurface :is :beautiful.
_:e_O_1 a rdfs:Resource.
}.
} :is :beautiful.
{
() log:onNegativeSurface {
_:e_A_1 :is :beautiful.
}.
() log:onNegativeSurface {
_:e_A_1 :is :beautiful.
}.
} :is :beautiful.
(_:e_S_1 _:e_O_1) :is :beautiful.
log:onQuerySurface :is :beautiful.
{
Expand Down
3 changes: 3 additions & 0 deletions reasoning/blogic/beetle12.n3
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
}.

# query
# (_:S _:O) log:onQuerySurface {
# _:S :is _:O.
# }
() log:onAskSurface {
:beetle :is :beautiful.
}.
3 changes: 3 additions & 0 deletions reasoning/blogic/beetle12a.n3
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@
}.

# query
# (_:S _:O) log:onQuerySurface {
# _:S :is _:O.
# }
() log:onAskSurface {
:beetle :is :beautiful.
}.
3 changes: 3 additions & 0 deletions reasoning/blogic/beetle14.n3
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
}.

# query
# (_:S _:O) log:onQuerySurface {
# _:S :is _:O.
# }
() log:onAskSurface {
:herbie :is :beautiful.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle2.n3
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle3.n3
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle4.n3
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle5.n3
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/beetle8.n3
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
}.

# query
() log:onAskSurface {
:beetle :is :beautiful.
(_:S _:O) log:onQuerySurface {
_:S :is _:O.
}.
3 changes: 3 additions & 0 deletions reasoning/blogic/beetle9.n3
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
}.

# query
# (_:S _:O) log:onQuerySurface {
# _:S :is _:O.
# }
() log:onAskSurface {
:beetle :is :beautiful.
}.
4 changes: 2 additions & 2 deletions reasoning/blogic/disj-elim.n3
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@
}.

# query
() log:onAskSurface {
:bob :saying :C.
(_:S _:O) log:onQuerySurface {
_:S :saying _:O.
}.

0 comments on commit 9792285

Please sign in to comment.