Skip to main content

Advertisement

SpringerLink
Log in
Menu
Find a journal Publish with us Track your research
Search
Cart
Book cover

European Symposium on Programming

ESOP 2007: Programming Languages and Systems pp 189–204Cite as

  1. Home
  2. Programming Languages and Systems
  3. Conference paper
Abstract Predicates and Mutable ADTs in Hoare Type Theory

Abstract Predicates and Mutable ADTs in Hoare Type Theory

  • Aleksandar Nanevski1,
  • Amal Ahmed2,
  • Greg Morrisett1 &
  • …
  • Lars Birkedal3 
  • Conference paper
  • 1142 Accesses

  • 16 Citations

  • 1 Altmetric

Part of the Lecture Notes in Computer Science book series (LNTCS,volume 4421)

Abstract

Hoare Type Theory (HTT) combines a dependently typed, higher-order language with monadically-encapsulated, stateful computations. The type system incorporates pre- and post-conditions, in a fashion similar to Hoare and Separation Logic, so that programmers can modularly specify the requirements and effects of computations within types.

This paper extends HTT with quantification over abstract predicates (i.e., higher-order logic), thus embedding into HTT the Extended Calculus of Constructions. When combined with the Hoare-like specifications, abstract predicates provide a powerful way to define and encapsulate the invariants of private state that may be shared by several functions, but is not accessible to their clients. We demonstrate this power by sketching a number of abstract data types that demand ownership of mutable memory, including an idealized custom memory manager.

Keywords

  • Typing Rule
  • Small Type
  • Separation Logic
  • Private State
  • Hoare Logic

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.

Chapter PDF

Download to read the full chapter text

References

  1. Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., et al. (eds.) CASSIS 2004. LNCS, vol. 3362, Springer, Heidelberg (2005)

    Google Scholar 

  2. Barnett, M., Naumann, D.: Friends need a bit more: Maintaining invariants over shared state. In: Kozen, D. (ed.) MPC 2004. LNCS, vol. 3125, Springer, Heidelberg (2004)

    Google Scholar 

  3. Benton, N.: Abstracting Allocation: The New new Thing. In: Ésik, Z. (ed.) CSL 2006. LNCS, vol. 4207, Springer, Heidelberg (2006)

    CrossRef  Google Scholar 

  4. Berger, M., Honda, K., Yoshida, N.: A logical analysis of aliasing in imperative higher-order functions. In: ICFP’05, pp. 280–293 (2005)

    Google Scholar 

  5. Biering, B., Birkedal, L., Torp-Smith, N.: BI hyperdoctrines, Higher-Order Separation Logic, and Abstraction. ITU-TR-2005-69, IT University, Copenhagen (2005)

    Google Scholar 

  6. Burdy, L., et al.: An overview of JML tools and applications. International Journal on Software Tools for Technology Transfer 7(3), 212–232 (2005)

    CrossRef  Google Scholar 

  7. DeLine, R., Fahndrich, M.: Enforcing high-level protocols in low-level software. In: PLDI’01, pp. 59–69 (2001)

    Google Scholar 

  8. Detlefs, D.L., et al.: Extended static checking. Compaq Systems Research Center, Research Report 159 (December 1998)

    Google Scholar 

  9. Evans, D., Larochelle, D.: Improving security using extensible lightweight static analysis. IEEE Software 19(1), 42–51 (2002)

    CrossRef  Google Scholar 

  10. Filliâtre, J.-C.: Verification of non-functional programs using interpretations in type theory. Journal of Functional Programming 13(4), 709–745 (2003)

    CrossRef  MathSciNet  MATH  Google Scholar 

  11. Harrison, J.: Inductive definitions: automation and application. In: Schubert, E.T., Alves-Foss, J., Windley, P. (eds.) HUG 1995. LNCS, vol. 971, Springer, Heidelberg (1995)

    Google Scholar 

  12. Jim, T., et al.: Cyclone: A safe dialect of C. In: USENIX Annual Technical Conference (2002)

    Google Scholar 

  13. Krishnaswami, N.: Separation logic for a higher-order typed language. In: SPACE’06 (2006)

    Google Scholar 

  14. Luo, Z.: An Extended Calculus of Constructions. PhD thesis, U. of Edinburgh (1990)

    Google Scholar 

  15. Mandelbaum, Y., Walker, D., Harper, R.: An effective theory of type refinements. In: ICFP’03, pp. 213–226 (2003)

    Google Scholar 

  16. The Coq development team: The Coq proof assistant reference manual. LogiCal Project, Version 8.0 (2004)

    Google Scholar 

  17. McBride, C.: Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh (1999)

    Google Scholar 

  18. Mitchell, J.C.: Foundations for Programming Languages. MIT Press, Cambridge (1996)

    Google Scholar 

  19. Moggi, E.: Notions of computation and monads. Information and Computation 93(1), 55–92 (1991)

    CrossRef  MathSciNet  MATH  Google Scholar 

  20. Morrisett, G., et al.: From System F to typed assembly language. TOPLAS 21(3), 527–568 (1999)

    CrossRef  Google Scholar 

  21. Nanevski, A., et al.: Abstract predicates and mutable ADTs in Hoare Type Theory. TR-14-06, Harvard University (July 2006), Available at http://www.eecs.harvard.edu/~aleks/papers/hoarelogic/htthol.pdf

  22. Nanevski, A., Morrisett, G., Birkedal, L.: Polymorphism and separation in Hoare Type Theory. In: ICFP’06, pp. 62–73 (2006)

    Google Scholar 

  23. Ni, Z., Shao, Z.: Certified assembly programming with embedded code pointers. In: POPL’06, pp. 320–333 (2006)

    Google Scholar 

  24. O’Hearn, P.W., Yang, H., Reynolds, J.C.: Separation and information hiding. In: POPL’04, pp. 268–280 (2004)

    Google Scholar 

  25. Pierce, B.C., Turner, D.N.: Local type inference. TOPLAS 22(1), 1–44 (2000)

    CrossRef  Google Scholar 

  26. Reynolds, J.C.: Separation logic: A logic for shared mutable data structures. In: LICS’02, pp. 55–74 (2002)

    Google Scholar 

  27. Shao, Z., et al.: A type system for certified binaries. TOPLAS 27(1), 1–45 (2005)

    CrossRef  Google Scholar 

  28. Watkins, K., et al.: A concurrent logical framework: The propositional fragment. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, Springer, Heidelberg (2004)

    Google Scholar 

  29. Xi, H.: Applied Type System (extended abstract). In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, Springer, Heidelberg (2004)

    Google Scholar 

  30. Xi, H., Pfenning, F.: Dependent types in practical programming. In: POPL’99 (1999)

    Google Scholar 

  31. Yoshida, N., Honda, K., Berger, M.: Logical reasoning for higher-order functions with local state. Personal communication (August 2006)

    Google Scholar 

  32. Xi, H., Zhu, D.: Safe Programming with Pointers Through Stateful Views. In: Hermenegildo, M.V., Cabeza, D. (eds.) PADL 2004. LNCS, vol. 3350, pp. 83–97. Springer, Heidelberg (2005)

    Google Scholar 

Download references

Author information

Authors and Affiliations

  1. Harvard University,  

    Aleksandar Nanevski & Greg Morrisett

  2. Toyota Technological Institute at Chicago,  

    Amal Ahmed

  3. IT University of Copenhagen,  

    Lars Birkedal

Authors
  1. Aleksandar Nanevski
    View author publications

    You can also search for this author in PubMed Google Scholar

  2. Amal Ahmed
    View author publications

    You can also search for this author in PubMed Google Scholar

  3. Greg Morrisett
    View author publications

    You can also search for this author in PubMed Google Scholar

  4. Lars Birkedal
    View author publications

    You can also search for this author in PubMed Google Scholar

Editor information

Rocco De Nicola

Rights and permissions

Reprints and Permissions

Copyright information

© 2007 Springer Berlin Heidelberg

About this paper

Cite this paper

Nanevski, A., Ahmed, A., Morrisett, G., Birkedal, L. (2007). Abstract Predicates and Mutable ADTs in Hoare Type Theory. In: De Nicola, R. (eds) Programming Languages and Systems. ESOP 2007. Lecture Notes in Computer Science, vol 4421. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-71316-6_14

Download citation

  • .RIS
  • .ENW
  • .BIB
  • DOI: https://doi.org/10.1007/978-3-540-71316-6_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-71314-2

  • Online ISBN: 978-3-540-71316-6

  • eBook Packages: Computer ScienceComputer Science (R0)

Share this paper

Anyone you share the following link with will be able to read this content:

Sorry, a shareable link is not currently available for this article.

Provided by the Springer Nature SharedIt content-sharing initiative

Publish with us

Policies and ethics

search

Navigation

  • Find a journal
  • Publish with us
  • Track your research

Discover content

  • Journals A-Z
  • Books A-Z

Publish with us

  • Publish your research
  • Open access publishing

Products and services

  • Our products
  • Librarians
  • Societies
  • Partners and advertisers

Our imprints

  • Springer
  • Nature Portfolio
  • BMC
  • Palgrave Macmillan
  • Apress
  • Your US state privacy rights
  • Accessibility statement
  • Terms and conditions
  • Privacy policy
  • Help and support
  • Cancel contracts here

167.114.118.210

Not affiliated

Springer Nature

© 2023 Springer Nature