PropCheck.StateM.run_commands
You're seeing just the function
run_commands
, go back to PropCheck.StateM module for more information.
Evaluates a given symbolic command sequence cmds
according to the
state machine specified in mod
.
The result is a triple of the form
{history, dynamic_state, result}
, where:
history
contains the execution history of all commands that were executed without raising an exception. It contains tuples of the form{t:dynamic_state/0, t:term/0}
, specifying the state prior to command execution and the actual result of the command.dynamicState
contains the state of the abstract state machine at the moment when execution stopped. In case execution has stopped due to a false postcondition,dynamic_state
corresponds to the state prior to execution of the last command.result
specifies the outcome of command execution. It can be classified in one of the following categories: <ul> <li> ok <br>All commands were successfully run and all postconditions were true. <li> initialization error <br>There was an error while evaluating the initial state. <li> postcondition error <br>A postcondition was false or raised an exception. <li> precondition error <br>A precondition was false or raised an exception. <li> exception <br>An exception was raised while running a command. </ul>
Similar to run_commands/2
, but also accepts an environment,
used for symbolic variable evaluation during command execution. The
environment consists of {key::atom, value::any}
pairs. Keys may be
used in symbolic variables (i.e. {:var, key}
) within the command sequence
cmds
. These symbolic variables will be replaced by their corresponding
value
during command execution.