You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where var1, var2,...,vark are all the variables of the model, state is the state provided by the function state, and testnet is the blockchain client provided by the function testnet
Finally, the stub should contain comments with guidance on how to use the stub.
The text was updated successfully, but these errors were encountered:
As all actions are supposed to be mapped into transactions on the blockchain, the stub could probably have a few additional components:
the (import of) the Pytest fixture that sets up the blockchain (this should be provided by the init command)
each action should have a parameter client that provides a client connected to the chain instance provided by the above fixture.
Not exactly part of the user interface, but downstream, to the run trace command, this component should provide the functionality to validate wether the reactor has been filled by the user correctly, contains all necessary actions, etc.
Context: Reactor
Once the user has a TLA+ model, they need to write a reactor:
a set of Python functions connecting the actions of the model to executions of the code.
The task is to generate a stub for the reactor.
Task
The command that needs to be implemented is
atomkraft reactor <action-list> <model> [<reactor-stub-file>]
where
action-list
is a list of actions for which to generate stubsmodel
is the TLA model for which we are implementing a reactorreactor-stub-file
is a path at which the reactor file should be created. If omitted, a default path is used.The stub should include:
act
fromaction-list
, a stub for the step function connecting the abstract action to the code execution.where
var1
,var2
,...,vark
are all the variables of the model,state
is the state provided by the functionstate
, andtestnet
is the blockchain client provided by the functiontestnet
Finally, the stub should contain comments with guidance on how to use the stub.
The text was updated successfully, but these errors were encountered: