Proving Program Invariance and Termination by Parametric Abstraction, Lagrangian Relaxation and Semidefinite Programming

  • Patrick Cousot
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3385)


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 verification conditions is handled by abstraction into numerical constraints by Lagrangian relaxation. The remaining universal quantification is handled by semidefinite programming relaxation. Finally the parameters are computed using semidefinite programming solvers.

This new approach exploits the recent progress in the numerical resolution of linear or bilinear matrix inequalities by semidefinite programming using efficient polynomial primal/dual interior point methods generalizing those well-known in linear programming to convex optimization.

The framework is applied to invariance and termination proof of sequential, nondeterministic, concurrent, and fair parallel imperative polynomial programs and can easily be extended to other safety and liveness properties.


Bilinear matrix inequality (BMI) Convex optimization Invariance Lagrangian relaxation Linear matrix inequality (LMI) Liveness Parametric abstraction Polynomial optimization Proof Rank function Safety S-procedure Semidefinite programming Termination precondition Termination Program verification 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Benson, S., Ye, Y.: DSDP4: A software package implementing the dual-scaling algorithm for semidefinite programming. Technical Report ANL/MCS-TM-255, Argonne National Laboratory (2002)Google Scholar
  2. 2.
    Boyd, S., Ghaoui, L.E., Féron, É., Balakrishnan, V.: Linear Matrix Inequalities in System and Control Theory. SIAM, Philadelphia (1994)MATHGoogle Scholar
  3. 3.
    Brauburger, J., Giesl, J.: Approximating the domains of functional and imperative programs. Sci. Comput. Programming 35(1), 113–136 (1999)MATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Burer, S., Monteiro, R.: A nonlinear programming algorithm for solving semidefinite programs via low-rank factorization. Mathematical Programming (series B) 95(2), 329–357 (2003)MATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Collins, G., Hong, H.: Partial cylindrical algebraic decomposition for quantifier elimination. J. Symb. Comput. 12, 299–328 (1991)MATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    Colón, M., Sipma, H.: Synthesis of linear ranking functions. In: Margaria, T., Yi, W. (eds.) TACAS 2001. LNCS, vol. 2031, pp. 67–81. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  7. 7.
    Cousot, P.: Méthodes itératives de construction et d’approximation de points fixes d’opérateurs monotones sur un treillis, analyse sémantique de programmes. Thèse d’Etat ès sciences mathématiques, Univ. scient. et méd. de Grenoble (1978)Google Scholar
  8. 8.
    Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: 4th POPL, pp. 238–252. ACM Press, New York (1977)Google Scholar
  9. 9.
    Cousot, P., Cousot, R.: Static determination of dynamic properties of recursive procedures. In: IFIP Conf. on Formal Description of Programming Concepts, St- Andrews, pp. 237–277. North-Holland, Amsterdam (1977)Google Scholar
  10. 10.
    Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: 6th POPL, pp. 269–282. ACM Press, New York (1979)Google Scholar
  11. 11.
    Cousot, P., Cousot, R.: ‘À la Floyd’ induction principles for proving inevitability properties of programs. In: Algebraic Methods in Semantics, ch. 8, pp. 277–312. Cambridge U. Press, Cambridge (1985)Google Scholar
  12. 12.
    Cousot, P., Cousot, R.: Abstract interpretation and application to logic programs12. J. Logic Programming 13(2-3), 103–179 (1992)MATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Cousot, P., Cousot, R.: Abstract interpretation frameworks. J. Logic and Comp. 2(4), 511–547 (1992)MATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Cousot, P., Halbwachs, N.: Automatic discovery of linear restraints among variables of a program. In: 5th POPL, pp. 84–97. ACM Press, New York (1978)Google Scholar
  15. 15.
    Féron, É.: Abstraction mechanisms across the board: A short introduction. Workshop on Robustness, Abstractions and Computations, Philadelphia, March 18 (2004)Google Scholar
  16. 16.
    Floyd, R.: Assigning meaning to programs. In: Proc. Symposium in Applied Mathematics. AMS, vol. 19, pp. 19–32 (1967)Google Scholar
  17. 17.
    Gahinet, P., Nemirovski, A., Laub, A., Chilali, M.: LMI Control Toolbox for use with Matlab ®, user’s guide (1995)Google Scholar
  18. 18.
    Gulwani, S., Necula, G.: Discovering affine equalities using random interpretation. In: 30th POPL, pp. 74–84. ACM Press, New York (2003)Google Scholar
  19. 19.
    Hoare, C.: An axiomatic basis for computer programming. Comm. ACM 12(10), 576–580 (1969)MATHCrossRefGoogle Scholar
  20. 20.
  21. 21.
    Karr, M.: Affine relationships among variables of a program. Acta Informat. 6, 133–151 (1976)MATHCrossRefMathSciNetGoogle Scholar
  22. 22.
    Kočvara, M., Stingl, M.: Penbmi User’s Guide, Version 1.1 (2004)Google Scholar
  23. 23.
  24. 24.
    Manna, Z.: Mathematical theory of computation. McGraw Hill, New York (1974)MATHGoogle Scholar
  25. 25.
    Naur, P.: Proofs of algorithms by general snapshots. BIT 6, 310–316 (1966)CrossRefGoogle Scholar
  26. 26.
    Nesterov, Y.: Squared functional systems and optimization problems. In: High Performance Optimization, pp. 405–440. Kluwer Acad. Pub., Dordrecht (2000)Google Scholar
  27. 27.
    Nesterov, Y., Nemirovskii, A.: Polynomial barrier methods in convex programming. Èkonom. i Mat. Metody 24(6), 1084–1091 (1988)MATHMathSciNetGoogle Scholar
  28. 28.
    Parrilo, P.: Semidefinite programming relaxations for semialgebraic problems. Mathematical Programming 96(2), 293–320 (2003)MATHCrossRefMathSciNetGoogle Scholar
  29. 29.
    Podelski, A., Rybalchenko, A.: A complete method for the synthesis of linear ranking functions. In: Steffen, B., Levi, G. (eds.) VMCAI 2004. LNCS, vol. 2937, pp. 239–251. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  30. 30.
    Prajna, S., Papachristodoulou, A., Seiler, P., Parrilo, P.: SOStools: Sum of squares optimization toolbox for Matlab (2004)Google Scholar
  31. 31.
    Sturm, J.: Using SeDuMi 1.02, a Matlab toolbox for optimization over symmetric cones. Optimization Methods and Software 11–12, 625–653 (1999)Google Scholar
  32. 32.
    Toh, K., Todd, M., Tütüncü, R.: SDPT3–a Matlab software package for semidefinite programming. Optimization Methods and Software 11, 545–581 (1999)CrossRefMathSciNetGoogle Scholar
  33. 33.
    Yakubovich, V.: Nonconvex optimization problem: The infinite-horizon linearquadratic control problem with quadratic constraints. Systems Cosntrol Lett. 19, 13–22 (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2005

Authors and Affiliations

  • Patrick Cousot
    • 1
  1. 1.École Normale SupérieureParisFrance

Personalised recommendations