Proving Program Invariance and Termination by
Parametric Abstraction, Lagrangian Relaxation
and Semidefnite Programming
Ecole Normale Sup´
45 rue d’Ulm, 75230 Paris cedex 05 (France)
In order to verify semialgebraic programs, we automatize
the Floyd/Naur/Hoare proof method. The main task is to automatically
infer valid invariants and rank functions.
First we express the program semantics in polynomial form. Then the
unknown rank function and invariants are abstracted in parametric form.
The implication in the Floyd/Naur/Hoare veri±cation conditions is han-
dled by abstraction into numerical constraints by Lagrangian relaxation.
The remaining universal quanti±cation is handled by semide±nite pro-
gramming relaxation. Finally the parameters are computed using semidef-
inite programming solvers.
This new approach exploits the recent progress in the numerical resolu-
tion of linear or bilinear matrix inequalities by semide±nite programming
using eﬃcient polynomial primal/dual interior point methods generaliz-
ing those well-known in linear programming to convex optimization.
The framework is applied to invariance and termination proof of sequen-
tial, nondeterministic, concurrent, and fair parallel imperative polyno-
mial programs and can easily be extended to other safety and liveness
Bilinear matrix inequality (BMI), Convex optimization, In-
variance, Lagrangian relaxation, Linear matrix inequality (LMI), Live-
ness, Parametric abstraction, Polynomial optimization, Proof, Rank func-
tion, Safety, S-procedure, Semide±nite programming, Termination pre-
condition, Termination, Program veri±cation.
Program verifcation is based on reasonings by induction (e.g. on program steps)
which involves the discovery oF unknown inductive arguments (e.g. rank Func-
tions, invariants) satisFying universally quantifed verifcation conditions. ±or
static analysis the discovery oF the inductive arguments must be automated,
which consists in solving the constraints provided by the verifcation conditions.
Several methods have been considered: recurrence/di²erence equation resolu-
tion; iteration, possibly with convergence acceleration; or direct methods (such
R. Cousot (Ed.): VMCAI 2005, LNCS 3385, pp. 1–24, 2005.
Springer-Verlag Berlin Heidelberg 2005