CADiZ

Reference manual / Z-related commands / Refinement commands / weaken precondition


This command is part of the experimental refinement editor.

The weaken precondition command refines a specification statement to another with a weaker precondition. It applies the following inference rule of the refinement calculus.

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

where R is the new precondition.

No code is implicitly generated by this refinement rule.

The weaken precondition command is applicable when any specification statement \specstmt F[P,I,Q] in a goal is inspected, except where the precondition is already as weak as it can be (true).

The new precondition 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 new precondition is typechecked in the environment of the inspected specification statement.

Tactic example

"weaken precondition" "R" p

This example applies the weaken precondition command to specification statement p using the predicate R.


IT 20-Nov-2000