Skip to content

Commit

Permalink
fixing path expressions in blogic
Browse files Browse the repository at this point in the history
  • Loading branch information
josd committed Mar 14, 2023
1 parent 8f15139 commit a449ad3
Show file tree
Hide file tree
Showing 7 changed files with 50 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.8.3] fixing path expressions in blogic
[v3.8.2] fixing https://github.com/eyereasoner/eye/issues/80
[v3.8.1] simplifying version info
[v3.8.0] simplifying blogic reasoning
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.8.2
3.8.3
6 changes: 4 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.8.2').
version_info('EYE v3.8.3').

license_info('MIT License

Expand Down Expand Up @@ -11400,8 +11400,10 @@
-> throw(invalid_graffiti(D, in(A)))
; true
),
findvars(A, Z, zeta),
append(D, Z, E),
findall([X,_],
( member(X, D)
( member(X, E)
),
F
),
Expand Down
Binary file modified eye.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions reasoning/blogic/pi-answer.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <http://eyereasoner.github.io/eye/reasoning#>.

(1000 3.141592653839793) :pi true.

37 changes: 37 additions & 0 deletions reasoning/blogic/pi.n3
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Calculate pi using Nilakantha series
# See http://www.wikihow.com/Calculate-Pi

@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix math: <http://www.w3.org/2000/10/swap/math#>.
@prefix : <http://eyereasoner.github.io/eye/reasoning#>.

(_:N _:Pi _:P) log:onNegativeSurface {
() log:onQuerySurface {
(_:N _:Pi) :pi true.
}.
(1 _:N 0 _:P 1) :pi true.
(3 (4 _:P)!math:product) math:sum _:Pi.
}.

(_:N _:P _:S) log:onNegativeSurface {
() log:onQuerySurface {
(_:N _:N _:P _:P _:S) :pi true.
}.
}.

(_:K _:N _:P0 _:P _:S _:K1 _:K2 _:P1 _:S1) log:onNegativeSurface {
() log:onQuerySurface {
(_:K _:N _:P0 _:P _:S) :pi true.
}.
_:K math:notEqualTo _:N.
(_:K 1) math:sum _:K1.
(2 _:K) math:product _:K2.
(_:P0 (_:S (_:K2 (_:K2 1)!math:sum (_:K2 2)!math:sum)!math:product)!math:quotient) math:sum _:P1.
_:S math:negation _:S1.
(_:K1 _:N _:P1 _:P _:S1) :pi true.
}.

# query
(_:Pi) log:onQuerySurface {
(1000 _:Pi) :pi true.
}.
1 change: 1 addition & 0 deletions reasoning/blogic/test
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,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/lubm.n3 --turtle http://eyereasoner.github.io/eye/reasoning/lubm/facts.ttl --output lubm-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/parteval.n3 --output parteval-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/peano.n3 --output peano-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/pi.n3 --output pi-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/pol1.n3 --output pol1-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/pol2.n3 --output pol2-answer.n3
eye "$@" --wcache http://eyereasoner.github.io/eye/reasoning .. --blogic http://eyereasoner.github.io/eye/reasoning/blogic/qg.n3 --output qg-answer.n3
Expand Down

0 comments on commit a449ad3

Please sign in to comment.