-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(IC-1579): combined TLA model of the instrumented governance meth…
…ods (#3499) This creates an overall model of the governance-ledger interaction that can then be model checked using TLC.
- Loading branch information
Showing
19 changed files
with
675 additions
and
267 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,29 @@ | ||
---- MODULE Common_Apalache ---- | ||
EXTENDS TLC | ||
|
||
(* | ||
@typeAlias: proc = Str; | ||
@typeAlias: account = Str; | ||
@typeAlias: neuronId = Int; | ||
@typeAlias: methodCall = Transfer({ from: $account, to: $account, amount: Int, fee: Int}) | AccountBalance({ account: $account }); | ||
@typeAlias: methodResponse = Fail(UNIT) | TransferOk(UNIT) | BalanceQueryOk(Int); | ||
@typeAlias: neurons = $neuronId -> {cached_stake: Int, account: $account, maturity: Int, fees: Int}; | ||
*) | ||
_type_alias_dummy == TRUE | ||
|
||
|
||
VARIABLES | ||
\* @type: $neurons; | ||
neuron, | ||
\* @type: $account -> $neuronId; | ||
neuron_id_by_account, | ||
\* @type: Set($neuronId); | ||
locks, | ||
\* @type: Seq({caller : $proc, method_and_args: $methodCall }); | ||
governance_to_ledger, | ||
\* @type: Set({caller: $proc, response: $methodResponse }); | ||
ledger_to_governance, | ||
\* @type: $proc -> Str; | ||
pc | ||
|
||
==== |
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
Oops, something went wrong.