-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refresh existential claim variables (#1910)
* Add test/issue-1909 * deriveWith: Refresh existential variables * removeDestination: refresh claim at beginning Modifying the right-hand side of the claim at the end of deriveWith does not have the intended effect because the right-hand side of the claim is eventually replaced by the transition rule, which assumes that the right-hand side never changes. Co-authored-by: ana-pantilie <[email protected]>
- Loading branch information
1 parent
4066d2c
commit 68c549b
Showing
7 changed files
with
127 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
include $(CURDIR)/../include.mk |
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,15 @@ | ||
module VERIFICATION | ||
imports TEST | ||
endmodule | ||
|
||
module SUM-SPEC | ||
import VERIFICATION | ||
|
||
rule <k> loop(N:Int) => . ...</k> | ||
<counter> C:Int => ?_ </counter> | ||
<sum> S:Int => ?S:Int </sum> | ||
requires | ||
N >=Int 0 | ||
ensures | ||
?S ==Int S +Int N *Int C +Int (N -Int 1) *Int N /Int 2 | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) 2020 K Team. All Rights Reserved. | ||
|
||
module TEST-SYNTAX | ||
imports INT | ||
|
||
syntax Pgm ::= loop ( Int ) | ||
endmodule | ||
|
||
module TEST | ||
imports TEST-SYNTAX | ||
|
||
configuration | ||
<k> $PGM:Pgm </k> | ||
<counter> 1 </counter> | ||
<sum> 0 </sum> | ||
|
||
rule | ||
<k> loop(0) => . ... </k> | ||
rule | ||
<k> loop(Times:Int => Times -Int 1) ...</k> | ||
<counter> C:Int => C +Int 1 </counter> | ||
<sum> S:Int => S +Int C </sum> | ||
requires Times >Int 0 | ||
endmodule |