Synthesizing Basic Semialgebraic Invariants by Semidefinite Programming

Invariant generation plays a central role in the verification of programs and hybrid systems. In this paper, we propose an approach to synthesize basic semialgebraic invariants using semidefinite programming (SDP) that combine advantages of both symbolic constraint solving and numeric constraint solving. The advantages of our approach is threefold: first, it is powerful enough to be applied to arbitrary templates as symbolic computation based techniques; second, it uses semidefinite programming instead of time-consuming symbolic subroutines and is therefore efficient enough as other numeric computation based techniques; lastly, there are some (although weaker) theoretical guarantees of completeness of it, which previously can only be provided by symbolic computation based techniques. In addition, we discuss how to generalize our approach to the case when templates are semialgebraic and the case when non-polynomial functions such as trigonometric functions, logarithmic functions, exponential functions, rational functions are present in programs.

[1]  Jun Sun,et al.  FiB: Squeezing loop invariants by interpolation between forward/backward predicate transformers , 2017, 2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE).

[2]  Alan Edelman,et al.  Julia: A Fresh Approach to Numerical Computing , 2014, SIAM Rev..

[3]  Steven M. German,et al.  A synthesizer of inductive assertions , 1975, IEEE Transactions on Software Engineering.

[4]  Jean B. Lasserre,et al.  A "Joint+Marginal" Approach to Parametric Polynomial Optimization , 2009, SIAM J. Optim..

[5]  Jean B. Lasserre,et al.  Global Optimization with Polynomials and the Problem of Moments , 2000, SIAM J. Optim..

[6]  Deepak Kapur,et al.  A Quantifier-Elimination Based Heuristic for Automatically Generating Inductive Assertions for Programs , 2006, J. Syst. Sci. Complex..

[7]  Alexander Schrijver,et al.  Theory of linear and integer programming , 1986, Wiley-Interscience series in discrete mathematics and optimization.

[8]  Didier Henrion,et al.  Strong duality in Lasserre’s hierarchy for polynomial optimization , 2014, Optim. Lett..

[9]  Christof Löding,et al.  ICE: A Robust Framework for Learning Invariants , 2014, CAV.

[10]  Enric Rodríguez-Carbonell,et al.  An Abstract Interpretation Approach for Automatic Generation of Polynomial Invariants , 2004, SAS.

[11]  Henny B. Sipma,et al.  Linear Invariant Generation Using Non-linear Constraint Solving , 2003, CAV.

[12]  Zachary Kincaid,et al.  Non-linear reasoning for invariant synthesis , 2017, Proc. ACM Program. Lang..

[13]  James H. Davenport,et al.  Real Quantifier Elimination is Doubly Exponential , 1988, J. Symb. Comput..

[14]  Robert W. Floyd,et al.  Assigning Meanings to Programs , 1993 .

[15]  Joël Ouaknine,et al.  Polynomial Invariants for Affine Programs , 2018, LICS.

[16]  C. A. R. Hoare,et al.  An axiomatic basis for computer programming , 1969, CACM.

[17]  Koushil Sreenath,et al.  Discrete Control Barrier Functions for Safety-Critical Control of Discrete Systems with Application to Bipedal Robot Navigation , 2017, Robotics: Science and Systems.

[18]  Edsger W. Dijkstra,et al.  Guarded commands, nondeterminacy and formal derivation of programs , 1975, Commun. ACM.

[19]  Jean B. Lasserre,et al.  Tractable approximations of sets defined with quantifiers , 2014, Math. Program..

[20]  Ben Wegbreit,et al.  The synthesis of loop predicates , 1974, CACM.

[21]  P. Ezudheen,et al.  Horn-ICE learning for synthesizing invariants and contracts , 2018, Proc. ACM Program. Lang..

[22]  Liyun Dai,et al.  Generating Non-linear Interpolants by Semidefinite Programming , 2013, CAV.

[23]  Henny B. Sipma,et al.  Non-linear loop invariant generation using Gröbner bases , 2004, POPL.

[24]  Liyun Dai,et al.  Interpolant Synthesis for Quadratic Polynomial Inequalities and Combination with EUF , 2016, IJCAR.

[25]  Kwangkeun Yi,et al.  Predicate Generation for Learning-Based Quantifier-Free Loop Invariant Inference , 2012, Log. Methods Comput. Sci..

[26]  Peter Naur Proof of Algorithms by General Snapshots , 1966 .

[27]  Zohar Manna,et al.  Logical analysis of programs , 1976, CACM.

[28]  Liang Zou,et al.  Abstraction of Elementary Hybrid Systems by Variable Transformation , 2014, FM.

[29]  Enric Rodríguez-Carbonell,et al.  Generating all polynomial invariants in simple loops , 2007, J. Symb. Comput..

[30]  Dan Roth,et al.  Learning invariants using decision trees and implication counterexamples , 2016, POPL.

[31]  Patrick Cousot,et al.  Proving Program Invariance and Termination by Parametric Abstraction, Lagrangian Relaxation and Semidefinite Programming , 2005, VMCAI.

[32]  A. Tarski A Decision Method for Elementary Algebra and Geometry , 2023 .

[33]  Thomas W. Reps,et al.  A Method for Symbolic Computation of Abstract Operations , 2012, CAV.

[34]  Marie-Françoise Roy,et al.  Real algebraic geometry , 1992 .

[35]  Markus Müller-Olm,et al.  Polynomial Constants Are Decidable , 2002, SAS.

[36]  Helmut Seidl,et al.  Precise interprocedural analysis through linear algebra , 2004, POPL.

[37]  Enric Rodríguez-Carbonell,et al.  Automatic Generation of Polynomial Loop Invariants: Algebraic Foundations , 2004, ISSAC '04.

[38]  Jean B. Lasserre,et al.  Positivity and Optimization: Beyond Polynomials , 2012 .

[39]  Nikolaj Bjørner,et al.  Z3: An Efficient SMT Solver , 2008, TACAS.

[40]  Alexander Aiken,et al.  A Data Driven Approach for Algebraic Loop Invariants , 2013, ESOP.

[41]  Christopher W. Brown QEPCAD B: a program for computing with semi-algebraic sets using CADs , 2003, SIGS.

[42]  Bruno Buchberger,et al.  Bruno Buchberger's PhD thesis 1965: An algorithm for finding the basis elements of the residue class ring of a zero dimensional polynomial ideal , 2006, J. Symb. Comput..

[43]  Jean-Pierre Talpin,et al.  Polyhedral Analysis for Synchronous Languages , 1999, SAS.

[44]  Michael Karr,et al.  Affine relationships among variables of a program , 1976, Acta Informatica.

[45]  Nicolas Halbwachs,et al.  Automatic discovery of linear restraints among variables of a program , 1978, POPL.