-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from kframework/hyperproperties-4
Another Hyperproperties stuff
- Loading branch information
Showing
17 changed files
with
255 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# introduce-lemma | ||
|
||
``` | ||
Gamma |- Phi Gamma U {Phi} |- Psi | ||
------------------------------------ | ||
Gamma |- Psi | ||
``` | ||
|
||
```k | ||
module STRATEGY-INTRODUCE-LEMMA | ||
imports PROVER-CORE | ||
imports STRATEGIES-EXPORTED-SYNTAX | ||
rule <k> introduce-lemma(Name : Phi, by: Strat) | ||
=> subgoal(Name, Phi, Strat) | ||
~> #introduceLemma(Name, Phi) | ||
... | ||
</k> | ||
<id> GId </id> | ||
requires notBool AxiomNameToString(Name) in collectLocalAxiomNames(GId) | ||
rule <k> (.K => "Name already used!" ) | ||
~> introduce-lemma(Name : _, by: _) | ||
... | ||
</k> | ||
<id> GId </id> | ||
requires AxiomNameToString(Name) in collectLocalAxiomNames(GId) | ||
syntax KItem ::= #introduceLemma(AxiomName, Pattern) | ||
rule <k> (success ~> #introduceLemma(Name, Phi)) => noop ...</k> | ||
<local-context> (.Bag => | ||
<local-decl> axiom Name : Phi </local-decl> | ||
) ... | ||
</local-context> | ||
endmodule | ||
``` |
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,4 @@ | ||
symbol f() : Int | ||
axiom a: \equals(f(), 1) | ||
claim \equals(\equals(f(), 1), \top()) | ||
strategy axiom-equals-top(a) |
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,32 @@ | ||
<prover> | ||
<exit-code> | ||
0 | ||
</exit-code> | ||
<goals> | ||
<goal> | ||
id: ., parent: . | ||
<claim> | ||
\and ( .Patterns ) | ||
</claim> | ||
<k> | ||
. | ||
</k>n<expected> | ||
. | ||
</expected> | ||
<local-context> | ||
.LocalDeclCellSet | ||
</local-context> | ||
<trace> | ||
. | ||
</trace> | ||
</goals> | ||
<declarations> | ||
<declaration> | ||
axiom a : \equals ( f ( .Patterns ) , 1 ) | ||
</declaration> <declaration> | ||
axiom ax0 : \equals ( \equals ( f ( .Patterns ) , 1 ) , \and ( .Patterns ) ) | ||
</declaration> <declaration> | ||
symbol f ( .Sorts ) : Int | ||
</declaration> | ||
</declarations> | ||
</prover> |
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,3 @@ | ||
claim \equals(1, 1) | ||
strategy introduce-lemma(H: \equals(1,1), by: reflexivity) | ||
. apply(H, fail) |
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,28 @@ | ||
<prover> | ||
<exit-code> | ||
0 | ||
</exit-code> | ||
<goals> | ||
<goal> | ||
id: ., parent: . | ||
<claim> | ||
\and ( .Patterns ) | ||
</claim> | ||
<k> | ||
. | ||
</k>n<expected> | ||
. | ||
</expected> | ||
<local-context> | ||
.LocalDeclCellSet | ||
</local-context> | ||
<trace> | ||
. | ||
</trace> | ||
</goals> | ||
<declarations> | ||
<declaration> | ||
axiom ax0 : \equals ( 1 , 1 ) | ||
</declaration> | ||
</declarations> | ||
</prover> |
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,6 @@ | ||
symbol f(Int) : Int | ||
axiom a: \equals(f(1), 1) | ||
claim \equals(f(\and(1, \and())), 1) | ||
strategy simplify.flatten-ands | ||
. apply-equation -> a at 0 by [] | ||
. reflexivity |
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,32 @@ | ||
<prover> | ||
<exit-code> | ||
0 | ||
</exit-code> | ||
<goals> | ||
<goal> | ||
id: ., parent: . | ||
<claim> | ||
\and ( .Patterns ) | ||
</claim> | ||
<k> | ||
. | ||
</k>n<expected> | ||
. | ||
</expected> | ||
<local-context> | ||
.LocalDeclCellSet | ||
</local-context> | ||
<trace> | ||
. | ||
</trace> | ||
</goals> | ||
<declarations> | ||
<declaration> | ||
axiom a : \equals ( f ( 1 , .Patterns ) , 1 ) | ||
</declaration> <declaration> | ||
axiom ax0 : \equals ( f ( \and ( 1 , \and ( .Patterns ) , .Patterns ) , .Patterns ) , 1 ) | ||
</declaration> <declaration> | ||
symbol f ( Int , .Sorts ) : Int | ||
</declaration> | ||
</declarations> | ||
</prover> |
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