Sound compilation of reals

Writing accurate numerical software is hard because of many sources of unavoidable uncertainties, including finite numerical precision of implementations. We present a programming model where the user writes a program in a real-valued implementation and specification language that explicitly includes different types of uncertainties. We then present a compilation algorithm that generates a finite-precision implementation that is guaranteed to meet the desired precision with respect to real numbers. Our compilation performs a number of verification steps for different candidate precisions. It generates verification conditions that treat all sources of uncertainties in a unified way and encode reasoning about finite-precision roundoff errors into reasoning about real numbers. Such verification conditions can be used as a standardized format for verifying the precision and the correctness of numerical programs. Due to their non-linear nature, precise reasoning about these verification conditions remains difficult and cannot be handled using state-of-the art SMT solvers alone. We therefore propose a new procedure that combines exact SMT solving over reals with approximate and sound affine and interval arithmetic. We show that this approach overcomes scalability limitations of SMT solvers while providing improved precision over affine and interval arithmetic. Our implementation gives promising results on several numerical models, including dynamical systems, transcendental functions, and controller implementations.

[1]  George Candea,et al.  Efficient state merging in symbolic execution , 2012, Software Engineering.

[2]  Viktor Kuncak,et al.  Synthesis of fixed-point programs , 2013, 2013 Proceedings of the International Conference on Embedded Software (EMSOFT).

[3]  Gabriele Paganelli,et al.  Verifying (In-)Stability in Floating-Point Programs by Increasing Precision, Using SMT Solving , 2013, 2013 15th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing.

[4]  Viktor Kuncak,et al.  An overview of the Leon verification system: verification by translation to recursive functions , 2013, SCALA@ECOOP.

[5]  Swarat Chaudhuri,et al.  A Semantics for Approximate Program Transformations , 2013, ArXiv.

[6]  Leonardo Mendonça de Moura,et al.  Solving non-linear arithmetic , 2012, ACCA.

[7]  Olivier Ponsini,et al.  Refining Abstract Interpretation Based Value Analysis with Constraint Programming Techniques , 2012, CP.

[8]  Daniel Kroening,et al.  Deciding floating-point logic with systematic abstraction , 2012, 2012 Formal Methods in Computer-Aided Design (FMCAD).

[9]  Viktor Kuncak,et al.  Certifying Solutions for Numerical Constraints , 2012, RV.

[10]  Eric Goubault,et al.  Modular Static Analysis with Zonotopes , 2012, SAS.

[11]  Sebastian Hack,et al.  A dynamic program analysis to find floating-point accuracy problems , 2012, PLDI.

[12]  Marcelo d'Amorim,et al.  Symbolic Execution with Interval Solving and Meta-heuristic Search , 2012, 2012 IEEE Fifth International Conference on Software Testing, Verification and Validation.

[13]  Daniel Kroening,et al.  Numeric Bounds Analysis with Conflict-Driven Learning , 2012, TACAS.

[14]  W. Marsden I and J , 2012 .

[15]  Viktor Kuncak,et al.  Trustworthy numerical computation in Scala , 2011, OOPSLA '11.

[16]  Sumit Gulwani,et al.  Proving programs robust , 2011, ESEC/FSE '11.

[17]  Florent de Dinechin,et al.  Certifying the Floating-Point Implementation of an Elementary Function Using Gappa , 2011, IEEE Transactions on Computers.

[18]  Xavier Leroy,et al.  Verified squared: does critical software deserve verified tools? , 2011, POPL '11.

[19]  Martin Odersky,et al.  Programming in Scala: A Comprehensive Step-by-Step Guide, 2nd Edition , 2010 .

[20]  Mark Harman,et al.  FloPSy - Search-Based Floating Point Constraint Solving for Symbolic Execution , 2010, ICTSS.

[21]  Paulo Tabuada,et al.  Automatic verification of control system implementations , 2010, EMSOFT '10.

[22]  Sriram Sankaranarayanan,et al.  Integrating ICP and LRA solvers for deciding nonlinear real arithmetic problems , 2010, Formal Methods in Computer Aided Design.

[23]  Sriram Sankaranarayanan,et al.  Numerical stability analysis of floating-point computations using software model checking , 2010, Eighth ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMOCODE 2010).

[24]  Rupak Majumdar,et al.  Systematic testing for control applications , 2010, Eighth ACM/IEEE International Conference on Formal Methods and Models for Codesign (MEMOCODE 2010).

[25]  Claude Marché,et al.  Multi-Prover Verification of Floating-Point Programs , 2010, IJCAR.

[26]  Zhendong Su,et al.  Perturbing numerical calculations for statistical analysis of floating-point program (in)stability , 2010, ISSTA '10.

[27]  Teresa H. Y. Meng,et al.  Towards program optimization through automated analysis of numerical precision , 2010, CGO '10.

[28]  Eric Goubault,et al.  A Logical Product Approach to Zonotope Intersection , 2010, CAV.

[29]  Sumit Gulwani,et al.  Continuity analysis of programs , 2010, POPL '10.

[30]  Paulo Tabuada,et al.  To Sample or not to Sample: Self-Triggered Control for Nonlinear Systems , 2008, IEEE Transactions on Automatic Control.

[31]  Alfio Quarteroni,et al.  Scientific Computing with MATLAB and Octave, 3rd ed. , 2010 .

[32]  Philipp Rümmer,et al.  An SMT-LIB Theory of Binary Floating-Point Arithmetic ∗ , 2010 .

[33]  Salvador Lucas,et al.  SAT Modulo Linear Arithmetic for Solving Polynomial Constraints , 2010, Journal of Automated Reasoning.

[34]  Daniel Kroening,et al.  Mixed abstractions for floating-point arithmetic , 2009, 2009 Formal Methods in Computer-Aided Design.

[35]  Eric Goubault,et al.  Towards an Industrial Use of FLUCTUAT on Safety-Critical Avionics Software , 2009, FMICS.

[36]  Ji Wang,et al.  Interval Polyhedra: An Abstract Domain to Infer Interval Linear Relationships , 2009, SAS.

[37]  Bertrand Jeannet,et al.  Apron: A Library of Numerical Abstract Domains for Static Analysis , 2009, CAV.

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

[39]  James Demmel,et al.  IEEE Standard for Floating-Point Arithmetic , 2008 .

[40]  Michal Konečný,et al.  Polynomial Function Enclosures and Floating Point Software Verification ? , 2008 .

[41]  Christophe Denis,et al.  Numerical 'health check' for scientific codes: the CADNA approach , 2007, Comput. Phys. Commun..

[42]  Alfio Quarteroni,et al.  Scientific Computing with MATLAB and Octave , 2006 .

[43]  John Harrison,et al.  Floating-Point Verification Using Theorem Proving , 2006, SFM.

[44]  Jérôme Feret,et al.  Static Analysis of Digital Filters , 2004, ESOP.

[45]  Antoine Miné,et al.  Relational Abstract Domains for the Detection of Floating-Point Run-Time Errors , 2004, ESOP.

[46]  Daniel Rueckert,et al.  FPGA-based computation of free-form deformations in medical image registration , 2003, Proceedings. 2003 IEEE International Conference on Field-Programmable Technology (FPT) (IEEE Cat. No.03EX798).

[47]  Patrick Cousot,et al.  A static analyzer for large safety-critical software , 2003, PLDI '03.

[48]  M. Berz,et al.  TAYLOR MODELS AND OTHER VALIDATED FUNCTIONAL INCLUSION METHODS , 2003 .

[49]  Daniel Rueckert,et al.  FPGA-based computation of free-form deformations , 2002, 2002 IEEE International Conference on Field-Programmable Technology, 2002. (FPT). Proceedings..

[50]  Chris Woodford,et al.  Numerical Methods with Worked Examples , 1997 .

[51]  De Figueiredo,et al.  Self-validated numerical methods and applications , 1997 .

[52]  David Goldberg What Every Computer Scientist Should Know About Floating-Point Arithmetic , 1992 .

[53]  William Kahan,et al.  Miscalculating area and angles of a needle-like triangle , 1986 .

[54]  N. Rashevsky,et al.  Mathematical biology , 1961, Connecticut medicine.