Abstract
Semidefinite programming (SDP) solvers are increasingly used as primitives in many program verification tasks to synthesize and verify polynomial invariants for a variety of systems including programs, hybrid systems and stochastic models. On one hand, they provide a tractable alternative to reasoning about semi-algebraic constraints. However, the results are often unreliable due to “numerical issues” that include a large number of reasons such as floating-point errors, ill-conditioned problems, failure of strict feasibility, and more generally, the specifics of the algorithms used to solve SDPs. These issues influence whether the final numerical results are trustworthy or not. In this paper, we briefly survey the emerging use of SDP solvers in the static analysis community. We report on the perils of using SDP solvers for common invariant synthesis tasks, characterizing the common failures that can lead to unreliable answers. Next, we demonstrate existing tools for guaranteed semidefinite programming that often prove inadequate to our needs. Finally, we present a solution for verified semidefinite programming that can be used to check the reliability of the solution output by the solver and a padding procedure that can check the presence of a feasible nearby solution to the one output by the solver. We report on some successful preliminary experiments involving our padding procedure.
Similar content being viewed by others
Notes
In the remainder of this paper, the word “invariant” is used for inductive invariant.
Control theorists call (opposite of) such functions Lyapunov functions [32].
Changing \(\sigma _i \ge 0\) to \(\sigma _i\) SOS in (4) is actually a strengthening rather than a relaxation. However, (4) can be viewed as a dual (maximize \(\gamma \text { s.t. } p - \gamma = \sum _i \sigma _i p_i\)) of the problem (3) of primary interest (minimize \(p(x) \text { s.t. } p_i(x) \ge 0\) for all i), which is then relaxed.
Typically, matrices \(C_j\) can be of size \(n \times n\) for n up to a few hundreds.
\(\left( {\begin{array}{c}n+d\\ n\end{array}}\right) \) of up to a few hundreds, for instance \(n \sim 10\) and \(d \sim 3\).
There also exist first order methods handling larger problems but they provide less accurate solutions.
If a matrix is positive semidefinite and one of its diagonal entry (e.g. the (1, 1) entry) equals 0, then the entire row and column that contain that diagonal entry (e.g., the first row and column) equal 0.
As the linear system tends to become more and more ill-conditioned when approaching an optimal solution.
Type double in C.
The emulated floating-point operations are about thousand times slower than native processor operations.
To get a “small” invariant, one minimizes the radius of the ball enclosing it [1].
Assignments \(\tau \) often admit a fixpoint \({{\mathbf {x}}}_0 = \tau ({{\mathbf {x}}}_0)\) meaning that the condition \((p\circ \tau ) - p + \sigma \,g \ge 0\) boils down in \({{\mathbf {x}}}_0\) to \(\sigma ({{\mathbf {x}}}_0)\,g({{\mathbf {x}}}_0) \ge 0\) implying \(\sigma ({{\mathbf {x}}}_0) = 0\) when \(g({{\mathbf {x}}}_0) < 0\).
In practice, \(c < 10^{-3}\) when coefficients of p are of order of magnitude 1.
For \(n = 2\), \(d_\tau = 3\) and \(d = 8\), \(\left( {\begin{array}{c}n+\frac{d}{2}\\ n\end{array}}\right) = \left( {\begin{array}{c}6\\ 2\end{array}}\right) = 15\) whereas \(\left( {\begin{array}{c}n+\frac{d\,d_\tau }{2}\\ n\end{array}}\right) = \left( {\begin{array}{c}14\\ 2\end{array}}\right) = 91\).
References
Adjé A, Garoche P-L, Magron, V (2015) Property-based polynomial invariant generation using sums-of-squares optimization. In: SAS, pp 235–251
Adjé A, Gaubert S, Goubault É (2010) Coupling policy iteration with semi-definite relaxation to compute accurate numerical invariants in static analysis. In: ESOP
Ahmadi AA, Majumdar A (2014) DSOS and SDSOS optimization: LP and SOCP-based alternatives to sum of squares optimization. In: Annual conference on information sciences and systems (CISS)
Alipanahi B, Krislock N, Ghodsi A, Wolkowicz H, Donaldson L, Li M (2013) Determining protein structures from NOESY distance constraints by semidefinite programming. J Comput Biol 20(4):296–310
Alizadeh F, Haeberly J-PA, Overton ML (1998) Primal-dual interior-point methods for semidefinite programming: convergence rates, stability and numerical results. SIAM J Optim 8(3):746–768 (electronic)
Allamigeon X, Gaubert S, Goubault E, Putot S, Stott N (2015) A scalable algebraic method to infer quadratic invariants of switched systems. In: EMSOFT
Anjos MF, Lasserre JB (2012) Introduction to semidefinite, conic and polynomial optimization. In: Handbook on semidefinite, conic and polynomial optimization. Springer
Bagnara R, Rodríguez-Carbonell E, Zaffanella E (2005) Generation of basic semi-algebraic invariants using convex polyhedra. In: SAS
Basu S, Pollock R, Roy M-F (2006) Algorithms in real algebraic geometry. Springer, Berlin
Ben-Tal A, Ghaoui LE (2009) Robust optimization. Princeton series in applied mathematics. Princeton University Press, Princeton
Ben Sassi MA, Sankaranarayanan S, Chen X, Abraham E (2015) Linear relaxations of polynomial positivity for polynomial lyapunov function synthesis. IMA J Math Control Inf
Bernstein SN (1912) Démonstration du théoréme de Weierstrass fondée sur le calcul des probabilités. Communcations de la Société Mathématique de Kharkov 2
Borchers B (1999) CSDP, a C library for semidefinite programming. Optim Methods Softw
Borwein JM (1980) Characterization of optimality for the abstract convex program with finite-dimensional range. J. Aust. Math. Soc. Ser. A 30(4):390–411 81
Borwein JM, Wolkowicz H (1980/81) Facial reduction for a cone-convex programming problem. J. Aust. Math. Soc. Ser. A,
Borwein JM, Wolkowicz H (1981) Regularizing the abstract convex program. J Math Anal Appl 83(2):495–530
Boyd S, Vandenberghe L (2004) Convex optimization. Cambridge university press, Cambridge
Burkowski F, Cheung Y-L, Wolkowicz H (2014) Efficient use of semidefinite programming for selection of rotamers in protein conformations. Inform J Comput 26(4):748–766
Chakarov A, Voronin Y-L, Sankaranarayanan S (2016) Deductive proofs of almost sure persistence and recurrence properties. In: TACAS
Cheung Y-L, Schurr S, Wolkowicz H (2013) Preprocessing and regularization for degenerate semidefinite programs. In: Bailey DH, Bauschke HH, Borwein P, Garvan F, Thera M, Vanderwerff J, Wolkowicz H (eds) Computational and analytical mathematics, in honor of Jonathan Borwein’s 60th birthday, volume 50 of springer proceedings in mathematics & statistics. Springer, Berlin
Cheung Y-L (2013) Preprocessing and reduction for semidefinite programming via facial reduction: theory and practice. PhD thesis, University of Waterloo
Collins GE (1975) Quantifier elimination for real closed fields by cylindrical algebraic decomposition. In: Automata theory and formal languages
Collins GE, Hong H (1991) Partial cylindrical algebraic decomposition for quantifier elimination. J Symb Comput
Cousot P (2005) Proving program invariance and termination by parametric abstraction. lagrangian relaxation and semidefinite programming. In: VMCAI
Cousot P, Cousot R (1977) Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: POPL
Dang T, Gawlitza TM (2011) Template-based unbounded time verification of affine hybrid automata. In: APLAS
Demmel J (1989) On floating point errors in Cholesky. LAPACK Working Note 14 CS-89-87. Department of Computer Science, University of Tennessee, Knoxville, TN, USA
Dolzmann A, Sturm T (1997) REDLOG: computer algebra meets computer logic. ACM SIGSAM Bull
Dür M, Jargalsaikhan B, Still G (2012) The Slater condition is generic in linear conic programming
El Ghaoui L, Oustry F, Lebret H (1998) Robust solutions to uncertain semidefinite programs. SIAM J Optim 9(1):33–52
Farouki RT (2012) The Bernstein polynomial basis: a centennial retrospective. Comput Aided Geomet Des
Féron É (2010) From control systems to control software. Control Systems, IEEE
Fränzle M, Herde C, Teige T, Ratschan S, Schubert T (2007) Efficient solving of large non-linear arithmetic constraint systems with complex Boolean structure. J Satisf Boolean Model Comput Special Issue on SAT/CP Integr
Gao S, Kong S, Clarke EM (2013) Dreal: an SMT solver for nonlinear theories over the reals. In: International conference on automated deduction (CADE), pp 208–214
Gaubert S, Goubault E, Taly A, Zennou S (2007) Static analysis by policy iteration on relational domains. In: ESOP
Gawlitza T, Seidl H (2007) Precise fixpoint computation through strategy iteration. In: ESOP
Gawlitza TM, Monniaux D (2011) Improving strategies via SMT solving. In: ESOP
Gawlitza TM, Seidl H (2010) Computing relaxed abstract semantics w.r.t. quadratic zones precisely. In: SAS
Gruber G, Rendl F (2002) Computational experience with ill-posed problems in semidefinite programming. Comput Optim Appl 21(2):201–212
Handelman D (1988) Representing polynomials by positive linear functions on compact convex polyhedra. Pacific J Math
Harrison J (2007) Verifying nonlinear real formulas via sums of squares. In: TPHOL
Härter V, Jansson C, Lange M (2016) VSDP: verified semidefinite programming. http://www.ti3.tuhh.de/jansson/vsdp/. Accessed on 28 March
Helmberg C (2012) Semidefinite programming. https://www-user.tu-chemnitz.de/~helmberg/semidef.html. Last updated:
Henrion D, Naldi S, Din MS El (2015) Exact algorithms for linear matrix inequalities. arXiv preprint arXiv:1508.03715
IEEE Computer Society. IEEE standard for floating-point arithmetic. IEEE Standard 754-2008, 2008
Jansson C, Chaykin D, Keil C (2007) Rigorous error bounds for the optimal value in semidefinite programming. SIAM J Numer Anal
Kaltofen E, Li B, Yang Z, Zhi L (2012) Exact certification in global polynomial optimization via sums-of-squares of rational functions with rational coefficients. J Symb Comput
Krislock N, Wolkowicz H (2010) Explicit sensor network localization using semidefinite representations and facial reductions. SIAM J Optim 20(5):2679–2708
Lasserre JB (2001) Global optimization with polynomials and the problem of moments. SIAM J Optim
Löfberg J (2009) Pre- and post-processing sum-of-squares programs in practice. In: IEEE transactions on automatic control
Maréchal A, Fouilhé A, King T, Monniaux D, ël Périn M (2016) Polyhedral approximation of multivariate polynomials using Handelman’s theorem. In: VMCAI
Martin-Dorel É, Roux P (2017) A reflexive tactic for polynomial positivity using numerical solvers and floating-point computations. In: Yves B, Viktor V (eds) Proceedings of the 6th ACM SIGPLAN conference on certified programs and proofs, CPP 2017, Paris, France, January 16–17, 2017, pp 90–99. ACM,
Mittelmann HD (2016) Decision tree for optimization software: semidefinite programming. http://plato.asu.edu/sub/nlores.html#semidef. Accessed on 28 March
Monniaux D, Corbineau P (2011) On the generation of positivstellensatz witnesses in degenerate cases. In: ITP
MOSEK ApS (2015) The MOSEK C optimizer API manual Version 7.1 (Revision 40)
Nakata M (2010) A numerical evaluation of highly accurate multiple-precision arithmetic version of semidefinite programming solver: SDPA-GMP, -QD and -DD. In: Computer-aided control system design
Nesterov Y, Nemirovskii A (1994) Interior-point polynomial algorithms in convex programming. Soc Ind Appl Math
Nie J, Ranestad K, Sturmfels B (2008) The algebraic degree of semidefinite programming. Math Program 122(2):379–405
Nuzzo P, Puggelli A, Seshia SA, Sangiovanni-Vincentelli AL (2010) Calcs: SMT solving for non-linear convex constraints. In: Bloem R, Sharygina N (eds) Proceedings of 10th International Conference on Formal Methods in Computer-Aided Design. Switzerland, FMCAD 2010, Lugano, October 20–23, pp 71–79. IEEE
Oulamara M, Venet AJ (2015) Abstract interpretation with higher-dimensional ellipsoids and conic extrapolation. In: CAV
Parrilo P (2000) Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization. PhD thesis, California Institute of Technology
Parrilo PA (2003) Semidefinite programming relaxations for semialgebraic problems. Math Program
Pataki G (2013) Strong duality in conic linear programming: facial reduction and extended duals. In: Bailey DH, Bauschke HH, Borwein P, Garvan F, Thera M, Vanderwerff J, Wolkowicz H (eds) Computational and analytical mathematics, in honor of Jonathan Borwein’s 60th birthday, volume 50 springer proceedings in mathematics & statistics. Springer, Berlin, pp 613–634
Permenter F, Parrilo P (2014) Partial facial reduction: simplified, equivalent sdps via approximations of the psd cone. arXiv preprint arXiv:1408.4685
Permenter F, Parrilo PA (2015) Tools for SDP facial reduction. https://github.com/frankpermenter/frlib. Accessed on 10 Apr 2015
Peyrl H, Parrilo PA (2008) Computing sum of squares decompositions with rational coefficients. Theor Comput Sci
Platzer A, Quesel J-D, Rümmer P (2009) Real world verification. In: CADE
Prajna S, Jadbabaie A (2004) Safety verification using barrier certificates. In: HSCC
Putinar M (1993) Positive polynomials on compact semi-algebraic sets. Indiana Univ Math J
Ramana MV, Tunçel L, Wolkowicz H (1997) Strong duality for semidefinite programming. SIAM J Optim 7(3):641–662
Reid G, Wang F, Wolkowicz H, Wu W (2016) arxiv:1504.00931. Accessed on 31 Mar
Roux P (2016) Formal proofs of rounding error bounds-with application to an automatic positive definiteness check. J Autom Reason
Roux P, Voronin Y-L, Sankaranarayanan S (2016) Validating numerical semidefinite programming solvers for polynomial invariants. In Xavier R (ed) Static analysis - 23rd international symposium, SAS 2016, Edinburgh, UK, September 8–10, 2016, proceedings, volume 9837 of lecture notes in computer science, pp 424–446. Springer
Rump SM (2006) Verification of positive definiteness. BIT Numer Math
Sankaranarayanan S, Sipma H, Manna Z (2008) Constructing invariants for hybrid systems. Formal Methods Syst Des
Sankaranarayanan S, Sipma HB, Manna Z (2005) Scalable analysis of linear systems using mathematical programming. In: VMCAI
Schmieta SH, Pataki G (2016) Reporting solution quality for the DIMACS library of mixed semidefinite-quadratic-linear programs. http://dimacs.rutgers.edu/Challenges/Seventh/Instances/error_report.html. [Online; accessed 23 Mar 2016]
Sherali HD, Cihan H, Tuncbilek CH (1991) A global optimization algorithm for polynomial programming using a reformulation-linearization technique. J Global Optim
Shor NZ (1987) Class of global minimum bounds on polynomial functions. Cybernetics 1987. Originally in Russian: Kibernetika
Shoukry Y, Nuzzo P, Sangiovanni-Vincentelli AL, Seshia SA, Pappas GJ, Tabuada P (2017) SMC: satisfiability modulo convex optimization. In: Goran F, Sayan M (eds) Proceedings of the 20th international conference on hybrid systems: computation and control, HSCC 2017, Pittsburgh, PA, USA, April 18–20, 2017, pages 19–28. ACM
Sturm JF (2000) Error bounds for linear matrix inequalities. SIAM J Optim 10(4):1228–1248 (electronic)
Sturm JF (1999) Using SeDuMi 1.02, a MATLAB toolbox for optimization over symmetric cones. Optim Methods Softw
Sturm JF (2002) Implementation of interior point methods for mixed semidefinite and second order cone optimization problems. Optim Methods Softw 17(6):1105–1154
Tarski A (1951) A decision method for elementary algebra and geometry. Univ. of California Press, Berkeley, Technical report
Tuncel L (2010) Polyhedral and semidefinite programming methods in combinatorial optimization. American Mathematical Society
Tütüncü RH, Toh KC, Todd MJ (2003) Solving semidefinite-quadratic-linear programs using SDPT3. Mathematical programming
Vandenberghe L, Boyd S (1996) Semidefinite programming. SIAM Rev 38(1):49–95
Waki H, Muramatsu M (2010) A facial reduction algorithm for finding sparse SOS representations. Oper Res Lett 38(5):361–365
Waki H, Muramatsu M (2013) Facial reduction algorithms for conic optimization problems. J Optim Theory Appl 158(1):188–215
Waki H, Nakata M, Muramatsu M (2011) Strange behaviors of interior-point methods for solving semidefinite programming problems in polynomial optimization. Comput Optim Appl
Weispfenning V (1997) Quantifier elimination for real algebra—the quadratic case and beyond. In: Applied algebra and error-correcting codes (AAECC)
Wolkowicz H, Zhao Q (1999) Semidefinite programming relaxations for the graph partitioning problem. Discrete Appl. Math. 96/97:461–479 (The satisfiability problem (Certosa di Pontignano, 1996); Boolean functions)
Wolkowicz H, Saigal R, Vandenberghe L (2000) Handbook of semidefinite programming. Kluwer Academic Publishers, Dordrecht
Yamashita M, Fujisawa K, Nakata K, Nakata M, Fukuda M, Kobayashi K, Goto K (2010) A high-performance software package for semidefinite programs: SDPA 7. Technical Report B-460, Tokyo Institute of Technology
Zhao Q, Karisch SE, Rendl F, Wolkowicz H (1998) Semidefinite programming relaxations for the quadratic assignment problem. J Comb Optim 2(1):71–109. Semidefinite programming and interior-point approaches for combinatorial optimization problems (Toronto, ON, 1996)
Acknowledgements
The authors would like to thank Didier Henrion, Pierre-Loïc Garoche and Assalé Adjé for interesting discussions on this subject.
Author information
Authors and Affiliations
Corresponding author
Additional information
This work was supported by the US National Science Foundation (NSF) under CNS-0953941 and CCF-1527075. All opinions expressed are those of the authors and not necessarily of the NSF.
Rights and permissions
About this article
Cite this article
Roux, P., Voronin, YL. & Sankaranarayanan, S. Validating numerical semidefinite programming solvers for polynomial invariants. Form Methods Syst Des 53, 286–312 (2018). https://doi.org/10.1007/s10703-017-0302-y
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10703-017-0302-y