Tutorial Examples of the Semantic Approach to Foundational Proof-Carrying Code

  • Authors:
  • Amy P. Felty

  • Affiliations:
  • School of Information Technology and Engineering, University of Ottawa, Canada. E-mail: afelty@site.uottawa.ca

  • Venue:
  • Fundamenta Informaticae - Typed Lambda Calculi and Applications 2005, Selected Papers
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

Proof-carrying code provides amechanismfor insuring that a host, or code consumer, can safely run code delivered by a code producer. The host specifies a safety policy as a set of axioms and inference rules. In addition to a compiled program, the code producer delivers a formal proof of safety expressed in terms of those rules that can be easily checked. Foundational proof-carrying code (FPCC) provides increased security and greater flexibility in the construction of proofs of safety. Proofs of safety are constructed from the smallest possible set of axioms and inference rules. For example, typing rules are not included. In our semantic approach to FPCC, we encode a semantics of types from first principles and the typing rules are proved as lemmas. In addition, we start from a semantic definition of machine instructions and safety is defined directly from this semantics. Since FPCC starts from basic axioms and low-level definitions, it is necessary to build up a library of lemmas and definitions so that reasoning about particular programs can be carried out at a higher level, and ideally, also be automated. We describe a high-level organization that involves Hoarestyle reasoning about machine code programs. This organization is presented using two running examples. The examples, as well as illustrating the above mentioned approach to organizing proofs, is designed to provide a tutorial introduction to a variety of facets of our FPCC approach. For example, it illustrates how to prove safety of programs that traverse input data structures as well as allocate new ones.