Skip to main content

Automatic Construction of Hoare Proofs from Abstract Interpretation Results

  • Conference paper
Programming Languages and Systems (APLAS 2003)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2895))

Included in the following conference series:

Abstract

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Appel, W.A.: Foundational proof-carrying code. In: Proceedings of the 16th Annual IEEE Symposium on Logic in Computer Science, June 2001, pp. 247–258 (2001)

    Google Scholar 

  2. Appel, W.A., Felty, A.P.: A semantic model of types and machine instructions for proof-carrying code. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 2000, pp. 243–253 (2000)

    Google Scholar 

  3. Cousot, P.: The calculational design of a generic abstract interpreter. In: Broy, M., Steinbrüggen, R. (eds.) Calculational System Design. NATO ASI Series F, IOS Press, Amsterdam (1999)

    Google Scholar 

  4. Cousot, P., Cousot, R.: Abstract interpretation: a unified lattice model for static analysis of programs by construction or approximation of fixpoints. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 1977, pp. 238–252 (1977)

    Google Scholar 

  5. Cousot, P., Cousot, R.: Automatic synthesis of optimal invariant assertions: mathematical foundations. In: ACM Symposium on Artificial Intelligence and Programming Languages, ACM SIGPLAN Notices, Rochester, NY, August 1977, vol. 12, pp. 1–12 (1977)

    Google Scholar 

  6. Cousot, P., Cousot, R.: Systematic design of program analysis frameworks. In: Conference Record of the Sixth Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 269–282. ACM Press, New York (1979)

    Chapter  Google Scholar 

  7. Hamid, N., Shao, Z., Trifonov, V., Monnier, S., Ni, Z.: A syntactic approach to foundational proof-carrying code. In: Proceedings of the 17th Annual IEEE Symposium on Logic in Computer Science, June 2002, pp. 89–100 (2002)

    Google Scholar 

  8. Heintze, N., Jaffar, J., Voicu, R.: A framework for combining analysis and verification. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, Boston, MA, USA, January 2000, pp. 26–39 (2000)

    Google Scholar 

  9. Hoare, C.A.R.: An axiomatic basis for computer programming. Communications of the ACM 12(10), 576–580 (1969)

    Article  MATH  Google Scholar 

  10. Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 1998, pp. 85–97 (1998)

    Google Scholar 

  11. Necula, G.C.: Proof-carrying code. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 1997, pp. 106–119 (1997)

    Google Scholar 

  12. Necula, G.C., Lee, P.: Safe, untrusted agents using proof-carrying code. In: Vigna, G. (ed.) Mobile Agents and Security. LNCS, vol. 1419, pp. 61–91. Springer, Heidelberg (1998)

    Chapter  Google Scholar 

  13. Necula, G.C., Rahul, S.P.: Oracle-based checking of untrusted software. In: Proceedings of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, January 2001, pp. 142–154 (2001)

    Google Scholar 

  14. Necula, G.C., Schneck, R.: Proof-carrying code with untrusted proof rules. In: Okada, M., Pierce, B.C., Scedrov, A., Tokuda, H., Yonezawa, A. (eds.) ISSS 2002. LNCS, vol. 2609, pp. 283–298. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2003 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Seo, S., Yang, H., Yi, K. (2003). Automatic Construction of Hoare Proofs from Abstract Interpretation Results. In: Ohori, A. (eds) Programming Languages and Systems. APLAS 2003. Lecture Notes in Computer Science, vol 2895. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-40018-9_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-40018-9_16

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-20536-4

  • Online ISBN: 978-3-540-40018-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics