-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement experimental :match-conclusion for rules
When defining a rule, one can use :match-conclusion instead of :conclusion. If this is used, the conclusion must be given in the step. To achieve this, define-rule with a `:match-conclusion T` adds an additional argument `Quote T` to the start of the argument list, and sets the conclusion to `Proof T`. The `step` command detects rules annotated with `:match-conclusion` and hands the conclusion to the rule as the first argument. Hence, this feature doesn't change functional semantic of rules, it is just syntactic sugar for `step`.
- Loading branch information
1 parent
bf9fc04
commit 2f384aa
Showing
8 changed files
with
75 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
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,12 @@ | ||
(include "Builtin-theory.smt3") | ||
|
||
(declare-rule match1 ((F1 Bool) (F2 Bool)) | ||
:match-conclusion (and F1 F2) | ||
) | ||
|
||
(declare-const c1 Bool) | ||
(declare-const c2 Bool) | ||
(step test1 (and c1 c2) :rule match1) | ||
|
||
; This fails as expected: | ||
; (step test2 :rule match1) |