This command is part of the experimental refinement editor.
The assignment command refines a specification statement to a parallel assignment statement. It applies the following inference rule of the refinement calculus.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
where B is a parallel assignment.
The code that is implicitly generated by this refinement rule is the parallel assignment B.
The assignment command is applicable
when any specification statement F[P,I,Q] in a goal is inspected.
The parallel assignment B is entered into a dialogue box using the syntax of a Z schema text, e.g. a == 1; b == 2. The default response is the previous response. Alternatively, if a suitable schema text is displayed in the same window, that can have been selected first (crossed). The parallel assignment is typechecked in the environment of the inspected specification statement.
All variables that are assigned to must be listed in the frame F.
"assignment" "B" p
This example applies the assignment command to specification statement p using the parallel assignment B.
A tactic that applies the assignment command must be executed by play tactic; it is not applicable under apply tactic as the resulting code would not be accessible to the code command.