CADiZ

Reference manual / Z-related commands / Refinement commands / sequential composition


This command is part of the experimental refinement editor.

The sequential composition command refines a specification statement to two specification statements that will be executed sequentially. It applies the following inference rule of the refinement calculus.

\vdash? \specstmt F[P \land I, R]      \specstmt F[R, I \land Q]
\vdash? \specstmt F[P,I,Q]

where R is the mid-condition.

The code that is implicitly generated by this refinement rule is the sequential composition of the code implicitly generated by the two specification statements.

The sequential composition command is applicable when any specification statement \specstmt F[P,I,Q] in a goal is inspected.

The mid-condition R is entered into a dialogue box using the syntax of a Z predicate. The default response is the previous response. Alternatively, if a suitable predicate is displayed in the same window, that can have been selected first (crossed). The mid-condition is typechecked in the environment of the inspected specification statement.

Tactic example

"sequential composition" "R" p

This example applies the sequential composition command to specification statement p using the mid-condition R.

A tactic that applies the sequential composition 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.


IT 20-Nov-2000