Certification of safe polynomial memory bounds

  • Authors:
  • Javier De Dios;Ricardo Peña

  • Affiliations:
  • Departamento de Sistemas Informáticos y Computación, Universidad Complutense de Madrid, Spain;Departamento de Sistemas Informáticos y Computación, Universidad Complutense de Madrid, Spain

  • Venue:
  • FM'11 Proceedings of the 17th international conference on Formal methods
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

In previous works, we have developed several algorithms for inferring upper bounds to heap and stack consumption for a simple functional language called Safe. The bounds inferred for a particular recursive function with n arguments takes the form of symbolic n-ary functions from (R+)n to R+ relating the input argument sizes to the number of cells or words respectively consumed in the heap and in the stack. Most frequently, these functions are multivariate polynomials of any degree, although exponential and other functions can be inferred in some cases. Certifying memory bounds is important because the analyses could be unsound, or have been wrongly implemented. But the certifying process should not be necessarily tied to the method used to infer those bounds. Although the motivation for the work presented here is certifying the bounds inferred by our compiler, we have developed a certifying method which could equally be applied to bounds computed by hand. The certification process is divided into two parts: (a) an off-line part consisting of proving the soundness of a set of proof rules. This part is independent of the program being certified, and its correctness is established once forever by using the proof assistant Isabelle/HOL; and (b) a compile-time program-specific part in which the proof rules are applied to a particular program and their premises proved correct. The key idea for the first part is proving an Isabelle/HOL theorem for each syntactic construction of the language, relating the symbolic information asserted by the proof-rule to the dynamic properties about the heap and stack consumption satisfied at runtime. For the second part, we use a mathematical tool for proving instances of Tarski's decision problem on quantified formulas in real closed fields.