skip to main content
research-article

A typed store-passing translation for general references

Published:26 January 2011Publication History
Skip Abstract Section

Abstract

We present a store-passing translation of System F with general references into an extension of System Fω with certain well-behaved recursive kinds. This seems to be the first type-preserving store-passing translation for general references. It can be viewed as a purely syntactic account of a possible worlds model.

Skip Supplemental Material Section

Supplemental Material

14-mpeg-4.mp4

References

  1. Andreas Abel. fhttp://www2.tcs.ifi.lmu.de/~abel/par10.pdf MiniAgda: Integrating sized and dependent types. In Workshop on Partiality And Recursion in Interactive Theorem Provers (PAR), July 2010.Google ScholarGoogle Scholar
  2. Amal~Jamil Ahmed. fhttp://www.cs.indiana.edu/~amal/ahmedsthesis.pdf Semantics of Types for Mutable State. PhD thesis, Princeton University, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Thorsten Altenkirch, Nils Anders Danielsson, Andres Löh, and Nicolas Oury. http://www.cs.nott.ac.uk/~txa/publ/pisigma-new.pdfΠΣ: Dependent types without the sugar. In Functional and Logic Programming, volume 6009 of Lecture Notes in Computer Science, pages 40--55. Springer, April 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Roberto~M. Amadio and Luca Cardelli. http://research.microsoft.com/Users/luca/Papers/SRT.pdf Subtyping recursive types. ACM Transactions on Programming Languages and Systems, 15(4):575--631, September 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Andrew W. Appel, Paul-André Melliès, Christopher D. Richards, and Jérôme Vouillon. http://www.cs.princeton.edu/~appel/papers/modalmodel.pdf A very modal model of a modern, major, general type system. In ACM Symposium on Principles of Programming Languages (POPL), pages 109--122, January 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Robert Atkey. fhttp://homepages.inf.ed.ac.uk/ratkey/paramnotions-jfp.pdf Parameteris%ed notions of computation. Journal of Functional Programming, 19(3--4):355--376, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Henk P. Barendregt. http://www.elsevier.com/wps/find/bookdescription.cws_home/501727/description The Lambda Calculus, Its Syntax and Semantics. Elsevier Science, 1984.Google ScholarGoogle Scholar
  8. Lars Birkedal, Jan Schwinghammer, and Kristian Støvring. http://www.itu.dk/~birkedal/papers/nakano-conf.pdf A metric model of lambda calculus with guarded recursion. Presented at FICS 2010, July 2010.Google ScholarGoogle Scholar
  9. Lars Birkedal, Kristian Støvring, and Jacob Thamsborg. http://www.itu.dk/~birkedal/papers/ITU-TR-2009-119.pdfThe category-theoretic solution of recursive metric-space quations. Technical Report ITU-2009-119, IT University of Copenhagen, 2009.Google ScholarGoogle Scholar
  10. Lars Birkedal, Kristian Støvring, and Jacob Thamsborg. http://www.itu.dk/~birkedal/papers/parametricity-state-metric-journal.pdfRealizability semantics of parametric polymorphism, general references, and recursive types. Mathematical Structures in Computer Science, 2010. To appear. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Michael Brandt and Fritz Henglein. http://ftp.diku.dk/diku/semantics/papers/D-353.ps.gz Coinductive axiomatization of recursive type equality and subtyping. Fundamenta Informaticæ, 33:309--338, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Arthur Charguéraud and François Pottier. http://gallium.inria.fr/~fpottier/publis/chargueraud-pottier-capabilities.pdf Functional translation of a calculus of capabilities. In ACM International Conference on Functional Programming (ICFP), pages 213--224, September 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Robert Harper. http://www.cs.cmu.edu/~rwh/papers/refs/ipl94.pdf A simplified account of polymorphic references. Information Processing Letters, 51(4):201--206, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Aquinas Hobor, Robert Dockins, and Andrew W. Appel. http://www.comp.nus.edu.sg/~hobor/indirection.pdf A theory of indirection via approximation. In ACM Symposium on Principles of Programming Languages (POPL), January 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Soren B. Lassen. http://www.blassen.dk/soren/papers/1999mfps15.ps Bisimulation in untyped lambda calculus: Böhm trees and bisimulation up to context. In Mathematical Foundations of Programming Semantics, volume 20 of Electronic Notes in Theoretical Computer Science, pages 346--374. Elsevier Science, April 1999.Google ScholarGoogle Scholar
  16. Paul Blain Levy. http://www.cs.bham.ac.uk/~pbl/papers/storagecbv.ps Possible world semantics for general storage in call-by-value. In Computer Science Logic, volume 2471 of Lecture Notes in Computer Science. Springer, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. John C. Mitchell. http://dx.doi.org/10.1016/0890-5401(88)90009-0 Polymorphic type inference and containment. Information and Computation, 76(2--3):211--249, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Eugenio Moggi. http://www.disi.unige.it/person/MoggiE/ftp/ic91.pdf Notions of computation and monads. Information and Computation, 93(1), 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Eugenio Moggi and Amr Sabry. http://www.disi.unige.it/person/MoggiE/ftp/ita04.pdfAn abstract monadic semantics for value recursion. Informatique théorique et applications, 38(4):377--400, 2004.Google ScholarGoogle Scholar
  20. Rasmus Ejlers Møgelberg and Sam Staton. Full abstraction in a metalanguage for state. In Workshop on Syntax and Semantics of Low Level Languages, July 2010.Google ScholarGoogle Scholar
  21. Hiroshi Nakano. http://www602.math.ryukoku.ac.jp/~nakano/papers/modality-lics00.ps.gz A modality for recursion. In IEEE Symposium on Logic in Computer Science (LICS), pages 255--266, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Hiroshi Nakano. http://www602.math.ryukoku.ac.jp/~nakano/papers/modality-tacs01.pdf Fixed-point logic with the approximation modality and its Kripke completeness. In International Symposium on Theoretical Aspects of Computer Software (TACS), volume 2215 of Lecture Notes in Computer Science, pages 165--182. Springer, October 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Aleksandar Nanevski, Greg Morrisett, and Lars Birkedal. http://ynot.cs.harvard.edu/papers/jfpsep07.pdf Hoare type theory, polymorphism and separation. Journal of Functional Programming, 18(5--6), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Peter W. O'Hearn and John C. Reynolds. http://www.dcs.qmul.ac.uk/~ohearn/papers/AlgolToPolyLin.ps From Algol to polymorphic linear lambda-calculus. Journal of the ACM, 47(1):167--223, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Simon Peyton Jones and Philip Wadler. http://homepages.inf.ed.ac.uk/wadler/papers/imperative/imperative.ps.gz Imperative functional programming. In ACM Symposium on Principles of Programming Languages (POPL), pages 71--84, January 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. François Pottier. http://gallium.inria.fr/~fpottier/publis/fpottier-antiframe-2008.pdf Hiding local state in direct style: a higher-order anti-frame rule. In IEEE Symposium on Logic in Computer Science (LICS), pages 331--340, June 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. François Pottier. A formalization of Nakano's type system. http://gallium.inria.fr/~fpottier/fork/, October 2009.Google ScholarGoogle Scholar
  28. François Pottier. The electronic Fork, July 2010. http://gallium.inria.fr/~fpottier/fork/.Google ScholarGoogle Scholar
  29. François Pottier. http://gallium.inria.fr/~fpottier/publis/fpottier-fork-x.pdf A typed store-passing translation for general references (extended version). November 2010.Google ScholarGoogle Scholar
  30. Jan Schwinghammer, Lars Birkedal, Bernhard Reus, and Hongseok Yang. http://www.itu.dk/~birkedal/papers/nested-triples-conf.pdf Nested Hoare triples and frame rules for higher-order store. In Computer Science Logic, volume 5771 of Lecture Notes in Computer Science, pages 440--454. Springer, September 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. Jan Schwinghammer, Hongseok Yang, Lars Birkedal, François Pottier, and Bernhard Reus. http://gallium.inria.fr/~fpottier/publis/sfhs.pdf A semantic foundation for hidden state. In International Conference on Foundations of Software Science and Computation Structures (FOSSACS), volume 6014 of Lecture Notes in Computer Science, pages 2--17. Springer, March 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Christopher Strachey. http://dx.doi.org/10.1023/A:1010000313106 Fundamental concepts in programming languages. Higher-Order and Symbolic Computation, 13(1--2):11--49, April 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Masako Takahashi. http://dx.doi.org/10.1006/inco.1995.1057 Parallel reductions in λ-calculus. Information and Computation, 118(1):120--127, April 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Robert D. Tennent and Dan Ghica. http://dx.doi.org/10.1023/A:1010022312623 Abstract models of storage. Higher-Order and Symbolic Computation, 13:119--129, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Andrew K. Wright and Matthias Felleisen. http://www.cs.rice.edu/CS/PLT/Publications/Scheme/ic94-wf.ps.gz A syntactic approach to type soundness. Information and Computation, 115(1):38--94, November 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A typed store-passing translation for general references

        Recommendations

        Reviews

        Wolfgang Schreiner

        It is a challenging task to create a well-typed semantic model for a programming language that supports references to dynamically allocated memory cells that may hold values of any type, such as functions or addresses of other cells. The essence of the problem is that of circularity: the type of a reference depends on the store whose content is changed over time, and the type of a store depends on the references contained in it. The paper addresses this problem by giving the first translation of an imperative language with general references to an extension of System F called FORK, a second-order typed lambda-calculus that is augmented by recursive kinds in order to allow nonterminating computations on the type level; thus, FORK can model recursive types as lambda terms with infinite reductions. The authors show how System F equipped with general references can be translated to FORK and prove that the translation is type preserving; that is, if the untyped reduction of a program with references yields a term of a certain type, the well-typed reduction in FORK also yields that term. The correctness of the result is substantiated with the help of software: an implementation of the FORK type checker is freely available, as are the language translator and the machine-checked proofs of the soundness theorems. The paper presents an important new result; while being quite technical in nature, it also contains an extensive introduction and explanation of the approach that is accessible to nonexperts in the field. Online Computing Reviews Service

        Access critical reviews of Computing literature here

        Become a reviewer for Computing Reviews.

        Comments

        Login options

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

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 46, Issue 1
          POPL '11
          January 2011
          624 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1925844
          Issue’s Table of Contents
          • cover image ACM Conferences
            POPL '11: Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
            January 2011
            652 pages
            ISBN:9781450304900
            DOI:10.1145/1926385

          Copyright © 2011 ACM

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 26 January 2011

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!