package qcheck-stm
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=ce75e64a125c5593d8e3c91752406067
sha512=cbac110fcf490a4c71229937936eb705699489d666c55938df6ce2e31d224494a92d8dc36946e24a506f1962c23d9ac10bf1c0c2685b237e111241ee0a9049b8
doc/qcheck-stm.domain/STM_domain/Make/argument-1-Spec/index.html
Parameter Make.Spec
val arb_cmd : state -> cmd QCheck.arbitraryA command generator. Accepts a state parameter to enable state-dependent cmd generation.
val init_state : stateThe model's initial state.
val show_cmd : cmd -> stringshow_cmd c returns a string representing the command c.
next_state c s expresses how interpreting the command c moves the model's internal state machine from the state s to the next state. Ideally a next_state function is pure, as it is run more than once.
val init_sut : unit -> sutInitialize the system under test.
val cleanup : sut -> unitUtility function to clean up the sut after each test instance, e.g., for closing sockets, files, or resetting global parameters
precond c s expresses preconditions for command c in terms of the model state s. A precond function should be pure. precond is useful, e.g., to prevent the shrinker from breaking invariants when minimizing counterexamples.
run c i should interpret the command c over the system under test (typically side-effecting).
postcond c s res checks whether res arising from interpreting the command c over the system under test with run agrees with the model's result. A postcond function should be a pure.
Note: the state parameter s is the model's state before executing the command c (the "old/pre" state). This is helpful to model, e.g., a remove cmd that returns the removed element.