-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding create sequent metarule for blogic
- Loading branch information
Showing
11 changed files
with
144 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
5.0.6 | ||
5.0.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@prefix : <http://example.org/ns#>. | ||
|
||
:grannysmith :is :green. | ||
_:sk_42 :is :beautiful. | ||
_:sk_53 :is :beautiful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
@prefix : <http://example.org/ns#>. | ||
|
||
:grannysmith :is :green. | ||
_:sk_51 :is :beautiful. | ||
_:sk_62 :is :beautiful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@prefix : <http://example.org/ns#>. | ||
|
||
_:sk_42 :is :beautiful. | ||
_:sk_53 :is :beautiful. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# ---------------------------- | ||
# Policy model finding example | ||
# ---------------------------- | ||
|
||
@prefix log: <http://www.w3.org/2000/10/swap/log#>. | ||
@prefix list: <http://www.w3.org/2000/10/swap/list#>. | ||
@prefix graph: <http://www.w3.org/2000/10/swap/graph#>. | ||
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>. | ||
@prefix : <http://example.org/ns#>. | ||
|
||
# Pat is an individual | ||
:Pat a vcard:Individual. | ||
|
||
# if X is an individual then X can do A or B | ||
(_:X) log:onNegativeSurface { | ||
_:X a vcard:Individual. | ||
() log:onNegativeSurface { | ||
_:X :canDo :A. | ||
}. | ||
() log:onNegativeSurface { | ||
_:X :canDo :B. | ||
}. | ||
}. | ||
|
||
# if X is an individual who can do A then X can do E or D | ||
(_:X) log:onNegativeSurface { | ||
#_:X a vcard:Individual. | ||
_:X :canDo :A. | ||
() log:onNegativeSurface { | ||
_:X :canDo :E. | ||
}. | ||
() log:onNegativeSurface { | ||
_:X :canDo :D. | ||
}. | ||
}. | ||
|
||
# if X is an individual who can do D then X can do E or F | ||
(_:X) log:onNegativeSurface { | ||
#_:X a vcard:Individual. | ||
_:X :canDo :D. | ||
() log:onNegativeSurface { | ||
_:X :canDo :E. | ||
}. | ||
() log:onNegativeSurface { | ||
_:X :canDo :F. | ||
}. | ||
}. | ||
|
||
# find model reaching goal | ||
(_:Goal _:Sequents _:Model) log:onNegativeSurface { | ||
() log:onNegativeSurface <<_:Goal :findModel (_:Sequents _:Model _:Model)>>. | ||
_:Goal log:callWithCut true. | ||
}. | ||
|
||
(_:Goal _:Sequents1 _:Model1 _:Model _:Prem _:Cases _:Case _:Sequents2 _:Model2) log:onNegativeSurface { | ||
() log:onNegativeSurface <<_:Goal :findModel (_:Sequents1 _:Model1 _:Model)>>. | ||
_:Prem => _:Cases. | ||
_:Cases list:member _:Case. | ||
_:Prem log:call true. | ||
_:Sequents1 list:notMember {_:Prem => _:Cases}. | ||
(_:Sequents1 ({_:Prem => _:Cases})) list:append _:Sequents2. | ||
(_:Model1 (_:Case)) list:append _:Model2. | ||
true log:becomes _:Case. | ||
{ | ||
_:Goal :findModel (_:Sequents2 _:Model2 _:Model). | ||
} log:callWithCleanup { | ||
_:Case log:becomes true. | ||
}. | ||
}. | ||
|
||
# find model where X is an individual who can do E | ||
(_:X _:Model) log:onQuestionSurface { | ||
{ | ||
_:X a vcard:Individual. | ||
_:X :canDo :E. | ||
} :findModel (() () _:Model). | ||
() log:onAnswerSurface { | ||
{ | ||
_:X a vcard:Individual. | ||
_:X :canDo :E. | ||
} :perModel _:Model. | ||
}. | ||
}. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@prefix : <http://example.org/ns#>. | ||
@prefix vcard: <http://www.w3.org/2006/vcard/ns#>. | ||
|
||
{ | ||
:Pat a vcard:Individual. | ||
:Pat :canDo :E. | ||
} :perModel ({ | ||
:Pat :canDo :A. | ||
} { | ||
:Pat :canDo :E. | ||
}). | ||
{ | ||
:Pat a vcard:Individual. | ||
:Pat :canDo :E. | ||
} :perModel ({ | ||
:Pat :canDo :A. | ||
} { | ||
:Pat :canDo :D. | ||
} { | ||
:Pat :canDo :E. | ||
}). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
@prefix log: <http://www.w3.org/2000/10/swap/log#>. | ||
|
||
() log:version "EYE v5.0.6 (2023-10-08)". | ||
() log:version "EYE v5.0.7 (2023-10-09)". |