Coq Support in HAHA

HAHA is a tool that helps in teaching and learning Hoare logic. It is targeted at an introductory course on software verification. We present a set of new features of the HAHA verification environment that exploit Coq. These features are (1) generation of verification conditions in Coq so that they can be explored and proved interactively and (2) compilation of HAHA programs into CompCert certified compilation tool-chain. With the interactive Coq proving support we obtain an interesting functionality that makes it possible to carefully examine step-by-step verification conditions and systematically discover flaws in their formulation. As a result Coq back-end serves as a kind of specification debugger. 2012 ACM Subject Classification Software and its engineering→ Software verification, Theory of computation → Program verification

[1]  Gary T. Leavens,et al.  Beyond Assertions: Advanced Specification and Verification with JML and ESC/Java2 , 2005, FMCO.

[2]  Frank Piessens,et al.  VeriFast: A Powerful, Sound, Predictable, Fast Verifier for C and Java , 2011, NASA Formal Methods.

[3]  Xavier Leroy,et al.  Formal certification of a compiler back-end or: programming a compiler with a proof assistant , 2006, POPL '06.

[4]  Jean-Christophe Filliâtre,et al.  Why3 - Where Programs Meet Provers , 2013, ESOP.

[5]  K. Rustan M. Leino,et al.  ESC/Java User's Manual , 2000 .

[6]  Zaynah Dargaye,et al.  Vérification formelle d'un compilateur optimisant pour langages fonctionnels. (Formal verification of an optimizing compiler for functional languages) , 2009 .

[7]  Wolfram Schulte,et al.  VCC: Contract-based modular verification of concurrent C , 2009, 2009 31st International Conference on Software Engineering - Companion Volume.

[8]  David R. Cok,et al.  ESC/Java2: Uniting ESC/Java and JML Progress and Issues in Building and Using ESC/Java2, Including a Case Study Involving the Use of the Tool to Verify Portions of an Internet Voting Tally System , 2005 .

[9]  Patrick Cousot,et al.  Inductive definitions, semantics and abstract interpretations , 1992, POPL '92.

[10]  Reiner Hähnle,et al.  A Hoare-Style Calculus with Explicit State Updates , 2008, FM'08 2008.

[11]  Arthur Charguéraud,et al.  Characteristic formulae for the verification of imperative programs , 2011, ICFP.

[12]  J. Filliâtre,et al.  ACSL: ANSI/ISO C Specification Language , 2008 .

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

[14]  Hervé Grall,et al.  Coinductive big-step operational semantics , 2009, Inf. Comput..

[15]  Adam Chlipala,et al.  Certified Programming with Dependent Types - A Pragmatic Introduction to the Coq Proof Assistant , 2013 .

[16]  Nikolai Kosmatov,et al.  Frama-C - A Software Analysis Perspective , 2012, SEFM.

[17]  Xavier Leroy,et al.  A Formally Verified Compiler Back-end , 2009, Journal of Automated Reasoning.

[18]  Xavier Leroy,et al.  Formal Verification of a C Compiler Front-End , 2006, FM.

[19]  Xavier Leroy Mechanized Semantics for Compiler Verification , 2012, APLAS.

[20]  Aleksy Schubert,et al.  Tool Support for Teaching Hoare Logic , 2014, SEFM.

[21]  Claude Marché,et al.  Formal Verification of Numerical Programs: From C Annotated Programs to Mechanical Proofs , 2011, Math. Comput. Sci..