This may involve changing a predicate or introducing new variables and thus increasing the potential for finding different solutions. Predicates in conjunction with methods of logical inference can be used to prove a program's correctness. Proofs are based on a formal functional specification, and a formal model of program semantics. This describes the execution of a sequence of program statement S , which begins in any state satisfying the predicate Q , and is guaranteed to terminate in another state satisfying the predicate R . Q is an assertion called the precondition .
R is an assertion called the postcondition .
This represents the weakest precondition of a command S with respect to a postcondition R . The building blocks for logical constructs are the set of all declarative sentences. The only declarative sentences of interest are those that can be classified as true or false , but not both. Propositions may be elementary or compound sentences. Compound sentences can be built from elementary propositions that are joined or modified using a set of well-defined connectives or operators.