Automatic Construction of Hoare Proofs from Abstract Interpretation Results

By combining program logic and static analysis, we present an automatic approach to construct program proofs to be used in Proof-Carrying Code. We use Hoare logic in representing the proofs of program properties, and the abstract interpretation in computing the program properties. This combination automatizes proof construction; an abstract interpretation automatically estimates program properties (approximate invariants) of our interest, and our proof-construction method constructs a Hoare-proof for those approximate invariants. The proof-checking side (code consumer’s side) is insensitive to a specific static analysis; the assertions in the Hoare proofs are always first-order logic formulas for integers, into which we first compile the abstract interpreters’ results. Both the property-compilation and the proof construction refer to the standard safety conditions that are prescribed in the abstract interpretation framework. We demonstrate this approach for a simple imperative language with an example property being the integer ranges of program variables. We prove the correctness of our approach, and analyze the size complexity of the generated proofs.

[1]  Joxan Jaffar,et al.  A framework for combining analysis and verification , 2000, POPL '00.

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

[3]  George C. Necula,et al.  Oracle-based checking of untrusted software , 2001, POPL '01.

[4]  Andrew W. Appel,et al.  A semantic model of types and machine instructions for proof-carrying code , 2000, POPL '00.

[5]  Manfred Broy,et al.  Calculational system design , 1999 .

[6]  Zhong Shao,et al.  A Syntactic Approach to Foundational Proof-Carrying Code , 2004, Journal of Automated Reasoning.

[7]  Patrick Cousot,et al.  Automatic synthesis of optimal invariant assertions: Mathematical foundations , 1977 .

[8]  George C. Necula,et al.  Proof-Carrying Code with Untrusted Proof Rules , 2002, ISSS.

[9]  I. H. Öğüş,et al.  NATO ASI Series , 1997 .

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

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

[12]  George C. Necula,et al.  Safe, Untrusted Agents Using Proof-Carrying Code , 1998, Mobile Agents and Security.

[13]  Andrew W. Appel,et al.  Foundational proof-carrying code , 2001, Proceedings 16th Annual IEEE Symposium on Logic in Computer Science.

[14]  Akinori Yonezawa,et al.  Software Security — Theories and Systems , 2003, Lecture Notes in Computer Science.

[15]  Patrick Cousot,et al.  Systematic design of program analysis frameworks , 1979, POPL.

[16]  J. C. Byington,et al.  Mobile agents and security , 1998, IEEE Commun. Mag..