-
Notifications
You must be signed in to change notification settings - Fork 52
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
6 changed files
with
57 additions
and
6 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
From elpi Require Import elpi. | ||
|
||
Elpi Db my_db lp:{{ | ||
pred graft_me o:int. | ||
|
||
:name "graft_me0" | ||
graft_me 0. | ||
}}. | ||
|
||
Elpi Command test_wanted_order. | ||
Elpi Accumulate Db my_db. | ||
Elpi Accumulate lp:{{ | ||
main L1 :- | ||
std.findall (graft_me _) L2, | ||
std.forall2 L1 L2 (x\y\ sigma X\ graft_me X = y, int X = x). | ||
}}. | ||
Elpi Typecheck. | ||
|
||
Elpi test_wanted_order 0. | ||
|
||
Elpi Query lp:{{ | ||
coq.elpi.accumulate _ "my_db" (clause "graft_me2" (after "graft_me0") (graft_me 2)). | ||
}}. | ||
|
||
Elpi test_wanted_order 0 2. | ||
|
||
Elpi Query lp:{{ | ||
coq.elpi.accumulate _ "my_db" (clause "graft_me1" (before "graft_me2") (graft_me 1)). | ||
}}. | ||
|
||
Elpi test_wanted_order 0 1 2. | ||
|
||
Elpi Query lp:{{ | ||
coq.elpi.accumulate _ "my_db" (clause _ (replace "graft_me2") (graft_me 3)). | ||
}}. | ||
|
||
Elpi test_wanted_order 0 1 3. |