Abstracting Allocation

The New new Thing
  • Nick Benton
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4207)


We introduce a Floyd-Hoare-style framework for specification and verification of machine code programs, based on relational parametricity (rather than unary predicates) and using both step-indexing and a novel form of separation structure. This yields compositional, descriptive and extensional reasoning principles for many features of low-level sequential computation: independence, ownership transfer, unstructured control flow, first-class code pointers and address arithmetic. We demonstrate how to specify and verify the implementation of a simple memory manager and, independently, its clients in this style. The work has been fully machine-checked within the Coq proof assistant.


Return Address Separation Logic Ownership Transfer Code Pointer Type Lambda Calculus 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abadi, M., Cardelli, L., Curien, P.-L.: Formal parametric polymorphism. Theoretical Computer Science 121 (1993)Google Scholar
  2. 2.
    Abadi, M., Plotkin, G.D.: A PER model of polymorphism and recursive types. In: Proc. 5th IEEE Symposium on Logic in Computer Science (LICS), pp. 355–365. IEEE Computer Society Press, Los Alamitos (1990)CrossRefGoogle Scholar
  3. 3.
    Ahmed, A.: Step-indexed syntactic logical relations for recursive and quantified types. In: Sestoft, P. (ed.) ESOP 2006. LNCS, vol. 3924, pp. 69–83. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  4. 4.
    Appel, A.: Foundational proof-carrying code. In: Proc. 16th IEEE Symposium on Logic in Computer Science (LICS) (2001)Google Scholar
  5. 5.
    Appel, A., Felty, A.: A semantic model of types and machine instructions for proof-carrying code. In: Proc. 27th ACM Symposium on Principles of Programming Languages (POPL) (2000)Google Scholar
  6. 6.
    Appel, A., McAllester, D.: An indexed model of recursive types for foundational proof-carrying code. ACM Transactions on Programming Languages and Systems (TOPLAS) 23(5) (2001)Google Scholar
  7. 7.
    Benton, N.: Simple relational correctness proofs for static analyses and program transformations. In: Proc. 31st ACM Symposium on Principles of Programming Languages (POPL) (January 2004), revised version available from:
  8. 8.
    Benton, N.: A typed, compositional logic for a stack-based abstract machine. In: Yi, K. (ed.) APLAS 2005. LNCS, vol. 3780, pp. 364–380. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  9. 9.
    Benton, N., Leperchey, B.: Relational reasoning in a nominal semantics for storage. In: Urzyczyn, P. (ed.) TLCA 2005. LNCS, vol. 3461, pp. 86–101. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  10. 10.
    Chen, J., Wu, D., Appel, A.W., Fang, H.: A provably sound TAL for back-end optimization. In: Proc. ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI) (2003)Google Scholar
  11. 11.
    Hamid, N.A., Shao, Z., Trifonov, V., Monnier, S., Ni, Z.: A syntactic approach to foundational proof-carrying code. Journal of Automated Reasoning 31(3-4) (2003)Google Scholar
  12. 12.
    Marti, N., Affeldt, R., Yonezawa, A.: Verification of the heap manager of an operating system using separation logic. In: Proc. 3rd Workshop on Semantics, Program Analysis and Computing Environments for Memory Management (SPACE) (2006)Google Scholar
  13. 13.
    Mijajlovic, I., Torp-Smith, N., O’Hearn, P.: Refinement and separation contexts. In: Lodaya, K., Mahajan, M. (eds.) FSTTCS 2004. LNCS, vol. 3328, pp. 421–433. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  14. 14.
    Morrisett, G., Walker, D., Crary, K., Glew, N.: From System F to typed assembly language. ACM Transactions on Programming Languages and Systems (TOPLAS) 21(3) (1999)Google Scholar
  15. 15.
    Necula, G.: Proof-carrying code. In: Proc. 24th ACM Symposium on Principles of Programming Languages (POPL) (1997)Google Scholar
  16. 16.
    Ni, Z., Shao, Z.: Certified assembly programming with embedded code pointers. In: Proc. 33rd ACM Symposium on Principles of Programming Languages (POPL) (2006)Google Scholar
  17. 17.
    Pitts, A.M.: Parametric polymorphism and operational equivalence. Mathematical Structures in Computer Science 10 (2000)Google Scholar
  18. 18.
    Pitts, A.M., Stark, I.D.B.: Operational reasoning for functions with local state. In: Higher Order Operational Techniques in Semantics. CUP (1998)Google Scholar
  19. 19.
    Plotkin, G.D., Abadi, M.: A logic for parametric polymorphism. In: Bezem, M., Groote, J.F. (eds.) TLCA 1993. LNCS, vol. 664. Springer, Heidelberg (1993)CrossRefGoogle Scholar
  20. 20.
    Reddy, U.S., Yang, H.: Correctness of data representations involving heap data structures. Science of Computer Programming 50(1–3), 129–160 (2004)MATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: Proc. 17th IEEE Symposium on Logic in Computer Science (LICS) (2002)Google Scholar
  22. 22.
    Vouillon, J., Mellies, P.-A.: Semantic types: A fresh look at the ideal model for types. In: Proc. 31st ACM Symposium on Principles of Programming Languages (POPL) (2004)Google Scholar
  23. 23.
    Yang, H.: Relational separation logic. Theoretical Computer Science(submitted, 2004)Google Scholar
  24. 24.
    Yu, D., Hamid, N.A., Shao, Z.: Building certified libraries for PCC: Dynamic storage allocation. Science of Computer Programming 50 (2004)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Nick Benton
    • 1
  1. 1.Microsoft Research 

Personalised recommendations