LEMA: towards a language for reliable arithmetic

Generating certified and efficient numerical codes requires information ranging from the mathematical level to the representation of numbers. Even though the mathematical semantics can be expressed using the content part of MathML, this language does not encompass the implementation on computers. Indeed various arithmetics may be involved, like floating-point or fixed-point, in fixed precision or arbitrary precision, and current tools do not handle all of these. Therefore we propose in this paper LEMA (Langage pour les Expressions Math'ematiques Annot'ees), a descriptive language based on MathML with additional expressiveness. LEMA will be used during the automatic generation of certified numerical codes. Such a generation process typically involves several steps, and LEMA would thus act as a glue to represent and store the information at every stage. First, we specify in the language the characteristics of the arithmetic as described in the IEEE 754 floatingpoint standard: formats, exceptions, rounding modes. This can be generalized to other arithmetics. Then, we use annotations to attach a specific arithmetic context to an expression tree. Finally, considering the evaluation of the expression in this context allows us to deduce several properties on the result, like being exact or being an exception. Other useful properties include numerical ranges and error bounds.

[1]  T. J. Dekker,et al.  A floating-point technique for extending the available precision , 1971 .

[2]  Ole Møller Quasi double-precision in floating point addition , 1965 .

[3]  Franz Franchetti,et al.  Operator Language: A Program Generation Framework for Fast Kernels , 2009, DSL.

[4]  Guillaume Melquiond,et al.  De l'arithmétique d'intervalles à la certification de programmes. (From interval arithmetic to program verification) , 2006 .

[5]  Guillaume Melquiond,et al.  Certification of bounds on expressions involving rounded operators , 2007, TOMS.

[6]  Claude Marché,et al.  The Why/Krakatoa/Caduceus Platform for Deductive Program Verification , 2007, CAV.

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

[8]  Franz Franchetti,et al.  SPIRAL: Code Generation for DSP Transforms , 2005, Proceedings of the IEEE.

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

[10]  Vincent Lefèvre,et al.  MPFR: A multiple-precision binary floating-point library with correct rounding , 2007, TOMS.

[11]  Guillaume Revy,et al.  Implementation of binary floating-point arithmetic on embedded integer processors - Polynomial evaluation-based algorithms and certified code generation , 2009 .

[12]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[13]  V. Lefèvre,et al.  Moyens arithmetiques pour un calcul fiable , 2000 .

[14]  J. Stolfi,et al.  Aane Arithmetic and Its Applications to Computer Graphics , 1990 .

[15]  Jean-Michel Muller,et al.  Handbook of Floating-Point Arithmetic (2nd Ed.) , 2018 .

[16]  Arnaud Tisserand,et al.  A floating-point library for integer processors , 2004, SPIE Optics + Photonics.

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

[18]  Franz Franchetti,et al.  Computer Generation of Efficient Software Viterbi Decoders , 2010, HiPEAC.

[19]  Eric Goubault,et al.  Static Analysis of Numerical Algorithms , 2006, SAS.

[20]  Stephen M. Watt,et al.  Mathematical Markup Language (MathML) Version 3.0 , 2001, WWW 2001.

[21]  Josef Stoer,et al.  Numerische Mathematik 1 , 1989 .

[22]  Florent de Dinechin,et al.  Assisted verification of elementary functions using Gappa , 2006, SAC.

[23]  Eric Goubault,et al.  Static Analysis-Based Validation of Floating-Point Computations , 2003, Numerical Software with Result Verification.

[24]  P. Metzger,et al.  Network Working Group , 2000 .