skip to main content
10.1145/1159803.1159812acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Polymorphism and separation in hoare type theory

Published:16 September 2006Publication History

ABSTRACT

In previous work, we proposed a Hoare Type Theory (HTT) which combines effectful higher-order functions, dependent types and Hoare Logic specifications into a unified framework. However, the framework did not support polymorphism, and ailed to provide a modular treatment of state in specifications. In this paper, we address these shortcomings by showing that the addition of polymorphism alone is sufficient for capturing modular state specifications in the style of Separation Logic. Furthermore, we argue that polymorphism is an essential ingredient of the extension, as the treatment of higher-order functions requires operations not encodable via the spatial connectives of Separation Logic.

References

  1. M. Abadi and K.R.M. Leino. A logic of object-oriented programs. In Verification: Theory and Practice, pages 11--41. Springer-Verlag, 2004.]]Google ScholarGoogle Scholar
  2. M. Barnett, K.R.M. Leino, and W. Schulte. The Spec# programming system: An overview. In CASSIS 2004, Lecture Notes in Computer Science. Springer, 2004.]]Google ScholarGoogle Scholar
  3. M. Berger, K. Honda, and N. Yoshida. A logical analysis of aliasing in imperative higher-order functions. In O. Danvy and B.C. Pierce, editors, International Conference on Functional Programming, ICFP'05, pages 280--293, Tallinn, Estonia, September 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. B. Biering, L. Birkedal, and N. Torp-Smith. BI hyperdoctrines, Higher-Order Separation Logic, and Abstraction. Technical Report ITU-TR-2005-69, IT University of Copenhagen, Copenhagen, Denmark, July 2005.]]Google ScholarGoogle Scholar
  5. L. Birkedal, N. Torp-Smith, and J. C. Reynolds. Local reasoning about a copying garbage collector. In Symposium on Principles of Programming Languages, POPL'04, pages 220--231, Venice, Italy, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. L. Birkedal, N. Torp-Smith, and H. Yang. Semantics of separationlogic typing and higher-order frame rules. In Symposium on Logic in Computer Science, LICS'05, pages 260--269, Chicago, Illinois, June 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. Cartwright and D. C. Oppen. Unrestricted procedure calls in Hoare's logic. In Symposium on Principles of Programming Languages, POPL'78, pages 131--140, 1978.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. A. Church. A formulation of the simple theory of types. The Journal of Symbolic Logic, 5(2):56--68, Jun 1940.]]Google ScholarGoogle ScholarCross RefCross Ref
  9. S.A. Cook. Soundness and completeness of an axiom system for program verification. SIAM Journal of Computing, 7(1):70--90, 1978.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D.L. Detlefs, K.R.M. Leino, G. Nelson, and J.B. Saxe. Extended static checking. Compaq Systems Research Center, Research Report 159, December 1998.]]Google ScholarGoogle Scholar
  11. D. Evans and D. Larochelle. Improving security using extensible lightweight static analysis. IEEE Software, 19(1):42--51, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. C.A.R. Hoare. An axiomatic basis for computer programming. Communications of the ACM, 12(10):576--580, 1969.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. M. Hofmann. Extensional Concepts in Intensional Type Theory. PhD thesis, Department of Computer Science, University of Edinburgh, July 1995. Avaliable as Technical Report ECS-LFCS-95-327.]]Google ScholarGoogle Scholar
  14. K. Honda, N. Yoshida, and M. Berger. An observationally complete program logic for imperative higher-order functions. In Symposium on Logic in Computer Science, LICS'05, pages 270--279, Chicago, Illinois, June 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. W.A. Howard. The formulae-as-types notion of construction. In To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus and Formalism, pages 479--490. Academic Press, 1980.]]Google ScholarGoogle Scholar
  16. T. Jim, G. Morrisett, D. Grossman, M. Hicks, J. Cheney, and Y. Wang. Cyclone: A safe dialect of C. In USENIX Annual Technical Conference, pages 275--288, Monterey, Canada, June 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. S.L.P. Jones and P. Wadler. Imperative functional programming. In Symposium on Principles of Programming Languages, POPL'93, pages 71--84, Charleston, South Carolina, 1993.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. N. Krishnaswami. Separation logic for a higher-order typed language. In Workshop on Semantics, Program Analysis and Computing Environments for Memory Management, SPACE'06, pages 73--82, 2006.]]Google ScholarGoogle Scholar
  19. K.R.M. Leino, G. Nelson, and J.B. Saxe. ESC/Java User's Manual. Compaq Systems Research Center, October 2000. Technical Note 2000-002.]]Google ScholarGoogle Scholar
  20. Y. Mandelbaum, D. Walker, and R. Harper. An effective theory of type refinements. In International Conference on Functional Programming, ICFP'03, pages 213--226, Uppsala, Sweden, September 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Martin-Löf. On the meanings of the logical constants and the justifications of the logical laws. Nordic Journal of Philosophical Logic, 1 1):11--60, 1996.]]Google ScholarGoogle Scholar
  22. C. McBride. Dependently Typed Functional Programs and their Proofs. PhD thesis, University of Edinburgh, 1999.]]Google ScholarGoogle Scholar
  23. J.L. McCarthy. Towards a mathematical science of computation. In IFIP Congress, pages 21--28, 1962.]]Google ScholarGoogle Scholar
  24. E. Moggi. Computational lambda-calculus and monads. In Symposium on Logic in Computer Science, LICS'89, pages 14--23, Asilomar, California, 1989.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. E. Moggi. Notions of computation and monads. Information and Computation, 93(1):55--92, 1991.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. A. Nanevski and G. Morrisett. Dependent type theory of stateful higher-order functions. Technical Report TR-24-05, Harvard University, December 2005.]]Google ScholarGoogle Scholar
  27. A. Nanevski, G. Morrisett, and L. Birkedal. Polymorphism and Separation in Hoare Type Theory. Technical Report TR-10-06, Harvard University, April 2006. Available at http://www.eecs.harvard.edu/~aleks/papers/hoarelogic/httsep.pdf.]]Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. A. Nanevski, F. Pfenning, and B. Pientka. Contextual modal type theory. Under consideration for publication in the ACM Transactions on Computation Logic, September 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. G.C. Necula. Proof-carrying code. In Symposium on Principles of Programming Languages, POPL'97, pages 106--119, Paris, January 1997.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. P. O'Hearn, J. Reynolds, and H. Yang. Local reasoning about programs that alter data structures. In International Workshop on Computer Science Logic, CSL'01, volume 2142 of Lecture Notes in Computer Science, pages 1--19. Springer, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. P.W. O'Hearn, H. Yang, and J. C. Reynolds. Separation and information hiding. In Symposium on Principles of Programming Languages, POPL'04, pages 268--280, 2004.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. L.C. Paulson. A formulation of the simple theory of types (for Isabelle). In International Conference in Computer Logic, COLOG'88, volume 417 of Lecture Notes in Computer Science, pages 246--274. Springer, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. S. Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, April 2003.]]Google ScholarGoogle Scholar
  34. F. Pfenning and R. Davies. A judgmental reconstruction of modal logic. Mathematical Structures in Computer Science, 11(4):511--540, 2001.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. B.C. Pierce and D.N. Turner. Local type inference. ACM Transactions on Programming Languages and Systems, 22(1):1--44, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. J.C. Reynolds. Separation logic: A logic for shared mutable data structures. In Symposium on Logic in Computer Science, LICS'02, pages 55--74, 2002.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. Z. Shao, V. Trifonov, B. Saha, and N. Papaspyrou. A type system for certified binaries. ACM Transactions on Programming Languages and Systems, 27(1):1--45, January 2005.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. F. Smith, D. Walker, and G. Morrisett. Alias types. In G. Smolka, editor, European Symposium on Programming, ESOP'00, volume 1782 of Lecture Notes in Computer Science, pages 366--381, Berlin, Germany, 2000.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. SRI International and DSTO. The HOL System: Description. University of Cambridge Computer Laboratory, July 1991.]]Google ScholarGoogle Scholar
  40. P. Wadler. The marriage of effects and monads. In International Conference on Functional Programming, ICFP'98, pages 63--74, Baltimore, Maryland, 1998.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. K. Watkins, I. Cervesato, F. Pfenning, and D. Walker. A concurrent logical framework: The propositional fragment. In S. Berardi, M. Coppo, and F. Damiani, editors, Types for Proofs and Programs, volume 3085 of Lecture Notes in Computer Science, pages 355--377. Springer, 2004.]]Google ScholarGoogle Scholar
  42. H. Xi. Applied Type System (extended abstract). In TYPES'03, pages 394--408. Springer-Verlag LNCS 3085, 2004.]]Google ScholarGoogle Scholar
  43. H. Xi, C. Chen, and G. Chen. Guarded recursive datatype constructors. In Symposium on Principles of Programming Languages, POPL'03, pages 224--235, New Orleans, January 2003.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. D. Zhu and H. Xi. Safe programming with pointers through stateful views. In Practical Aspects of Declarative Languages, PADL'05, volume 3350 of Lecture Notes in Computer Science, pages 83--97, Long Beach, California, January 2005. Springer.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Polymorphism and separation in hoare type theory

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in
      • Published in

        cover image ACM Conferences
        ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
        September 2006
        308 pages
        ISBN:1595933093
        DOI:10.1145/1159803
        • General Chair:
        • John Reppy,
        • Program Chair:
        • Julia Lawall
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 41, Issue 9
          Proceedings of the 2006 ICFP conference
          September 2006
          296 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1160074
          Issue’s Table of Contents

        Copyright © 2006 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 16 September 2006

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        Overall Acceptance Rate333of1,064submissions,31%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader