-
Notifications
You must be signed in to change notification settings - Fork 1
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 #47 from freespek/th/instrument-only-monitor-vars
Instrument only monitor variables
- Loading branch information
Showing
7 changed files
with
125 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
(* | ||
* This specification ensures that a token is properly | ||
* deposited and claimed. | ||
*) | ||
---- MODULE timelock_mon2 ---- | ||
VARIABLES | ||
\* @type: Int; | ||
balance, | ||
\* @type: Str; | ||
last_error | ||
|
||
Deposit(env, from, token, amount, claimants, time_bound) == | ||
\/ /\ balance' = amount | ||
/\ last_error' = "" | ||
\/ /\ UNCHANGED balance | ||
/\ last_error' = "contract is not initialized" | ||
|
||
Claim(env, claimant) == | ||
\/ /\ UNCHANGED balance | ||
/\ last_error' \in { "", "contract is not initialized" } | ||
\/ /\ balance' = 0 | ||
/\ last_error' = "" | ||
|
||
============================= |
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,25 @@ | ||
{ "#meta": { | ||
"format": "ITF", | ||
"varTypes": { | ||
"balance": "Int", | ||
"is_initialized": "Bool", | ||
"last_error": "Str" | ||
}, | ||
"format-description": "https://apalache.informal.systems/docs/adr/015adr-trace.html", | ||
"description": "Created by Apalache on Mon May 06 08:21:52 UTC 2024" | ||
}, | ||
"vars": [ | ||
"is_initialized", | ||
"last_error" | ||
], | ||
"states": [ | ||
{ | ||
"#meta": { | ||
"index": 0 | ||
}, | ||
"balance": { "#bigint": "123" }, | ||
"is_initialized": false, | ||
"last_error": "" | ||
} | ||
] | ||
} |
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