-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
66 changed files
with
392 additions
and
286 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,15 +1,18 @@ | ||
type transl A -> prop. | ||
|
||
type transl any -> prop. | ||
type p any -> any. | ||
type pp any -> any. | ||
transl (y \ _\ M y) :- % strip the hole | ||
P = (w \ p w), | ||
transl (z \ M (P z)). | ||
|
||
transl (x \ pp (X x)). | ||
|
||
% with a hole | ||
pred test1. | ||
test1 :- transl (x0 \ _ \ pp (p x0)). | ||
|
||
% with no hole | ||
pred test2. | ||
test2 :- transl (x0 \ pp (p x0)). | ||
|
||
main :- test1, test2. |
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,3 @@ | ||
pred doomed o:int. | ||
accumulate accumulated. | ||
namespace other { accumulate accumulated. } | ||
main :- | ||
|
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,2 +1,3 @@ | ||
pred doomed i:int. | ||
doomed 0 :- fail. | ||
doomed N :- N > 0, M is N - 1, doomed M. |
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
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,3 +1,7 @@ | ||
type foo any. | ||
type bar any -> any. | ||
|
||
main :- declare_constraint foo [], declare_constraint (bar X) [], X. | ||
|
||
constraint foo bar { rule foo (bar _) <=> false. rule (bar X) <=> (X = true). } | ||
|
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,4 @@ | ||
type a, b, c, d any. | ||
main :- declare_constraint a [_], | ||
declare_constraint b [_], | ||
declare_constraint b [_], | ||
|
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,13 +1,13 @@ | ||
% Test with q X; should yield X=ok | ||
|
||
q X :- a X, b, c X. | ||
:untyped q X :- a X, b, c X. | ||
|
||
a ko. | ||
a ok. | ||
:untyped a ko. | ||
:untyped a ok. | ||
|
||
b :- !. | ||
b. | ||
:untyped b :- !. | ||
:untyped b. | ||
|
||
c ok. | ||
:untyped c ok. | ||
|
||
main :- q X, X = ok. | ||
:untyped main :- q X, X = ok. |
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,16 +1,11 @@ | ||
/* To test: query q X. The only answer should be X = ok. */ | ||
q X :- a X. | ||
q ok. | ||
|
||
a ko :- b Y, !, d Z, !, c Z. | ||
a two. | ||
|
||
b three. | ||
b four. | ||
|
||
c four. | ||
|
||
d three. | ||
d four. | ||
|
||
main :- q X, X = ok. | ||
:untyped q X :- a X. | ||
:untyped q ok. | ||
:untyped a ko :- b Y, !, d Z, !, c Z. | ||
:untyped a two. | ||
:untyped b three. | ||
:untyped b four. | ||
:untyped c four. | ||
:untyped d three. | ||
:untyped d four. | ||
:untyped main :- q X, X = ok. |
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,13 +1,9 @@ | ||
% q X should yield X=ok | ||
|
||
q X :- a X, !. | ||
q X :- b X. | ||
|
||
a X :- c X, !. | ||
|
||
c ok. | ||
c ko. | ||
|
||
b ko. | ||
|
||
main :- q X, X = ok. | ||
:untyped q X :- a X, !. | ||
:untyped q X :- b X. | ||
:untyped a X :- c X, !. | ||
:untyped c ok. | ||
:untyped c ko. | ||
:untyped b ko. | ||
:untyped main :- q X, X = ok. |
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,5 @@ | ||
type foo int. | ||
type bar int. | ||
main :- | ||
foo = _, | ||
_ = 4, | ||
|
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 @@ | ||
main :- p (F X) F X => p (f x) f x. | ||
:untyped main :- p (F X) F X => p (f x) f x. |
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,5 +1,3 @@ | ||
q Y :- pi d\ r Y. | ||
|
||
r _. | ||
|
||
main :- pi c\ q (x\ X c x). | ||
:untyped q Y :- pi d\ r Y. | ||
:untyped r _. | ||
:untyped main :- pi c\ q (x\ X c x). |
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,2 +1,2 @@ | ||
ignore _. | ||
main :- pi c\ Y c = (x\ X c x), ignore (Y c d). | ||
:untyped ignore _. | ||
:untyped main :- pi c\ Y c = (x\ X c x), ignore (Y c d). |
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,2 +1,2 @@ | ||
ignore _. | ||
main :- (pi c\ sigma Y\ X c = Y), ignore (X (f d)). | ||
:untyped ignore _. | ||
:untyped main :- (pi c\ sigma Y\ X c = Y), ignore (X (f d)). |
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,6 +1,6 @@ | ||
app F X :- F X. | ||
c. | ||
ignore _. | ||
foo P :- pi d\ ignore P. | ||
main :- app (x\x) c, F = (y\y), F c, (pi d\ F c), | ||
:untyped app F X :- F X. | ||
:untyped c. | ||
:untyped ignore _. | ||
:untyped foo P :- pi d\ ignore P. | ||
:untyped main :- app (x\x) c, F = (y\y), F c, (pi d\ F c), | ||
foo (G c). |
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,5 +1,3 @@ | ||
p F :- F (x\ c x). | ||
|
||
q (x\ c x). | ||
|
||
main :- p (y\ pi z\ q y). | ||
:untyped p F :- F (x\ c x). | ||
:untyped q (x\ c x). | ||
:untyped main :- p (y\ pi z\ q y). |
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 @@ | ||
main :- | ||
:untyped main :- | ||
(pi c\ sigma X\ pi d\ (X d = f c d, Y c = X)), | ||
Y = c\ d\ f c d. |
Oops, something went wrong.