Skip to main content
Log in

A Syntactic Approach to Foundational Proof-Carrying Code

  • Published:
Journal of Automated Reasoning Aims and scope Submit manuscript

Abstract

Proof-carrying code (PCC) is a general framework for verifying the safety properties of machine-language programs. PCC proofs are usually written in a logic extended with language-specific typing rules; they certify safety but only if there is no bug in the typing rules. In foundational proof-carrying code (FPCC), on the other hand, proofs are constructed and verified by using strictly the foundations of mathematical logic, with no type-specific axioms. FPCC is more flexible and secure because it is not tied to any particular type system and it has a smaller trusted base. Foundational proofs, however, are much harder to construct. Previous efforts on FPCC all required building sophisticated semantic models for types. Furthermore, none of them can be easily extended to support mutable fields and recursive types. In this article, we present a syntactic approach to FPCC that avoids all of these difficulties. Under our new scheme, the foundational proof for a typed machine program simply consists of the typing derivation plus the formalized syntactic soundness proof for the underlying type system. The former can be readily obtained from a type-checker, while the latter is known to be much easier to construct than the semantic soundness proofs. We give a translation from a typed assembly language into FPCC and demonstrate the advantages of our new system through an implementation in the Coq proof assistant.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Ahmed, A. J.: Mutable fields in a semantic model of types, Talk presented at 2000 PCC Workshop, June 2000.

  2. Ahmed, A. J., Appel, A. W. and Virga, R.: A stratified semantics of general references embeddable in higher-order logic, in Proceedings 17th Annual IEEE Symposium on Logic in Computer Science, June 2002, pp. 75–86.

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

  4. Appel, A. W. and Felten, E. W.: Models for security policies in proof-carrying code, Technical Report CS-TR-636-01, Department of Computer Science, Princeton University, Mar. 2001.

  5. Appel, A. W. and Felty, A. P.: A semantic model of types and machine instructions for proof-carrying code, in Proceedings 27th ACM Symposium on Principles of Programming Languages, ACM Press, 2000, pp. 243–253.

  6. Appel, A. W. and McAllester, D.: An indexed model of recursive types for foundational proofcarrying code, ACM Trans. on Programming Languages and Systems 23(5) (Sept. 2001), 657–683.

    Article  Google Scholar 

  7. Colby, C., Lee, P., Necula, G., Blau, F., Plesko, M.and Cline, K.: A certifying compiler for Java, in Proceedings 2000 ACMConference on Programming Language Design and Implementation, ACM Press, New York, 2000, pp. 95–107.

    Chapter  Google Scholar 

  8. Coquand, T. and Huet, G.: The calculus of constructions, Inform. and Comput. 76 (1988), 95–120.

    Article  MATH  MathSciNet  Google Scholar 

  9. Felty, A.: Semantic models of types and machine instructions for proof-carrying code, Talk presented at 2000 PCC Workshop, June 2000.

  10. Grossman, D., Morrisett, G. and Zdancewic, S.: Syntactic type abstraction, ACM Trans. on Programming Languages and Systems 22(6) (Nov. 2000), 1037–1080.

    Article  Google Scholar 

  11. Howard, W. A.: The formulae-as-types notion of constructions, in To H. B. Curry: Essays on Computational Logic, Lambda Calculus and Formalism, Academic Press, 1980.

  12. League, C., Shao, Z. and Trifonov, V.: Precision in practice: A type-preserving Java compiler, in Proceedings 12th International Conference on Compiler Construction, Lecture Notes in Comput. Sci. 2622, Springer-Verlag, Heidelberg, 2003, pp. 106–120.

    Google Scholar 

  13. Michael, N. and Appel, A.: Machine instruction syntax and semantics in higher order logic, in Proceedings 17th International Conference on Automated Deduction, Springer-Verlag, June 2000, pp. 7–24.

  14. Morrisett, G., Crary, K., Glew, N. and Walker, D.: Stack-based typed assembly language, in X. Leroy and A. Ohori (eds), Proceedings 1998 International Workshop on Types in Compilation, Kyoto, Japan, Lecture Notes in Comput. Sci. 1473, Springer-Verlag, March 1998, pp. 28–52.

    Chapter  Google Scholar 

  15. Morrisett, G., Walker, D., Crary, K. and Glew, N.: From System F to typed assembly language, in Proceedings 25th ACM Symposium on Principles of Programming Languages, ACM Press, Jan. 1998, pp. 85–97.

  16. Necula, G.: Proof-carrying code, in Proceedings 24th ACM Symposium on Principles of Programming Languages, ACM Press, New York, Jan. 1997, pp. 106–119.

    Chapter  Google Scholar 

  17. Necula, G.: Compiling with proofs, PhD thesis, School of Computer Science, Carnegie Mellon University, Sept. 1998.

  18. Necula, G. and Lee, P.: Safe kernel extensions without run-time checking, in Proceedings 2nd USENIX Symp. on Operating System Design and Impl., 1996, pp. 229–243.

  19. Necula, G. and Lee, P.: The design and implementation of a certifying compiler, in Proceedings 1998 ACM Conference on Programming Language Design and Implementation, New York, 1998, pp. 333–344.

  20. Paulin-Mohring, C.: Inductive definitions in the system Coq – rules and properties, in M. Bezem and J. Groote (eds), Proceedings TLCA, Lecture Notes in Comput. Sci. 664, Springer-Verlag, 1993.

  21. Shao, Z., Saha, B., Trifonov, V. and Papaspyrou, N.: A type system for certified binaries, in Proceedings 29th ACM Symposium on Principles of Programming Languages, ACM Press, Jan. 2002, pp. 217–232.

  22. Swadi, K. N. and Appel, A.W.: Typed machine language and its semantics, Preliminary version available at www.cs.princeton.edu/∼appel/papers/tml.pdf, July 2001.

  23. The Coq Development Team: The Coq proof assistant reference manual. The Coq release v7.1, Oct. 2001.

  24. Trifonov, V., Saha, B. and Shao, Z.: Fully reflexive intensional type analysis, in Proceedings 2000 ACM International Conference on Functional Programming, ACM Press, Sept. 2000, pp. 82–93.

  25. Werner, B.: Une théorie des constructions inductives, PhD thesis, L'Université Paris 7, Paris, France, 1994.

    Google Scholar 

  26. Wright, A. K. and Felleisen, M.: A syntactic approach to type soundness, Inform. and Comput. 115(1) (1994), 38–94.

    Article  MATH  MathSciNet  Google Scholar 

  27. Xi, H. and Harper, R.: A dependently typed assembly language, in Proceedings 2001 ACM International Conference on Functional Programming, ACM Press, Sept. 2001, pp. 169–180.

Download references

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

About this article

Cite this article

Hamid, N.A., Shao, Z., Trifonov, V. et al. A Syntactic Approach to Foundational Proof-Carrying Code. Journal of Automated Reasoning 31, 191–229 (2003). https://doi.org/10.1023/B:JARS.0000021012.97318.e9

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1023/B:JARS.0000021012.97318.e9

Navigation