Certified Abstract Interpretation with Pretty-Big-Step Semantics

This paper describes an investigation into developing certified abstract interpreters from big-step semantics using the Coq proof assistant. We base our approach on Schmidt's abstract interpretation principles for natural semantics, and use a pretty-big-step (PBS) semantics, a semantic format proposed by Charguéraud. We propose a systematic representation of the PBS format and implement it in Coq. We then show how the semantic rules can be abstracted in a methodical fashion, independently of the chosen abstract domain, to produce a set of abstract inference rules that specify an abstract interpreter. We prove the correctness of the abstract interpreter in Coq once and for all, under the assumption that abstract operations faithfully respect the concrete ones. We finally show how to define correct-by-construction analyses: their correction amounts to proving they belong to the abstract semantics.

[1]  Thomas P. Jensen,et al.  A Calculational Approach to Control-Flow Analysis by Abstract Interpretation , 2008, SAS.

[2]  David A. Schmidt Abstract Interpretation of Small-Step Semantics , 1996, LOMAPS.

[3]  Patrick Cousot,et al.  The calculational design of a generic abstract interpreter , 1999 .

[4]  Arthur Charguéraud,et al.  A trusted mechanised JavaScript specification , 2014, POPL.

[5]  P. Hill,et al.  Verification of C Programs Via Natural Semantics and Abstract Interpretation (Extended Abstract) , 2007 .

[6]  Conor McBride,et al.  Elimination with a Motive , 2000, TYPES.

[7]  David A. Schmidt Natural-Semantics-Based Abstract Interpretation (Preliminary Version) , 1995, SAS.

[8]  Thomas P. Jensen,et al.  Control-flow analysis of function calls and returns by abstract interpretation , 2009, Inf. Comput..

[9]  Tobias Nipkow,et al.  Verified Bytecode Verifiers , 2001, FoSSaCS.

[10]  Valérie Gouranton,et al.  Dynamic Slicing: a generic analysis based on a natural semantics format , 1999, J. Log. Comput..

[11]  Thomas Jensen,et al.  Pretty-big-step-semantics-based Certified Abstract Interpretation , 2014, JFLA.

[12]  Mads Dam Analysis and verification of multiple-agent languages : 5th LOMAPS Workshop, Stockholm, Sweden, June 24-26, 1996 : selected papers , 1997 .

[13]  Xavier Leroy,et al.  Coinductive big-step operational semantics , 2006, Inf. Comput..

[14]  Peter D. Mosses,et al.  Deriving Pretty-Big-Step Semantics from Small-Step Semantics , 2014, ESOP.

[15]  David Cachera,et al.  A Certified Denotational Abstract Interpreter , 2010, ITP.

[16]  David Pichardie Building Certified Static Analysers by Modular Construction of Well-founded Lattices , 2008, Electron. Notes Theor. Comput. Sci..

[17]  Olivier Danvy,et al.  Abstracting abstract machines , 2011, Commun. ACM.

[18]  Patrick Cousot,et al.  Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints , 1977, POPL.

[19]  Xavier Leroy,et al.  Formal verification of a realistic compiler , 2009, CACM.

[20]  Arthur Charguéraud,et al.  Pretty-Big-Step Semantics , 2013, ESOP.

[21]  David Cachera,et al.  Extracting a Data Flow Analyser in Constructive Logic , 2004, ESOP.

[22]  Matthew Might,et al.  Abstracting abstract machines , 2010, ICFP '10.