Skip to main content Accessibility help
×
×
Home

Realisability semantics of parametric polymorphism, general references and recursive types

  • LARS BIRKEDAL (a1), KRISTIAN STØVRING (a1) and JACOB THAMSBORG (a1)
Abstract

We present a realisability model for a call-by-value, higher-order programming language with parametric polymorphism, general first-class references, and recursive types. The main novelty is a relational interpretation of open types that include general reference types. The interpretation uses a new approach to modelling references.

The universe of semantic types consists of world-indexed families of logical relations over a universal predomain. In order to model general reference types, worlds are finite maps from locations to semantic types: this introduces a circularity between semantic types and worlds that precludes a direct definition of either. Our solution is to solve a recursive equation in an appropriate category of metric spaces. In effect, types are interpreted using a Kripke logical relation over a recursively defined set of worlds.

We illustrate how the model can be used to prove simple equivalences between different implementations of imperative abstract data types.

Copyright
References
Hide All
Abadi, M. (2000) Top-top-closed relations and admissibility. Mathematical Structures in Computer Science 10 (3)313320.
Abadi, M. and Plotkin, G. D. (1990) A per model of polymorphism and recursive types. In: Proceedings of LICS 355–365.
Abramsky, S., Honda, K. and McCusker, G. (1998) A fully abstract game semantics for general references. In: Proceedings of LICS 334–344.
Abramsky, S. and Jagadeesan, R. (2005) A game semantics for generic polymorphism. Annals of Pure and Applied Logic 133 (1–3)337.
Ahmed, A. (2004) Semantics of Types for Mutable State, Ph.D. thesis, Princeton University.
Ahmed, A., Dreyer, D. and Rossberg, A. (2009) State-dependent representation independence. In: Proceedings of POPL 340–353.
Amadio, R. M. (1991) Recursion over realizability structures. Information and Computation 91 (1)5585.
Amadio, R. M. and Curien, P.-L. (1998) Domains and Lambda-Calculi, Cambridge University Press.
America, P. and Rutten, J. J. M. M. (1989) Solving reflexive domain equations in a category of complete metric spaces. J. Comput. Syst. Sci. 39 (3)343375.
Baier, C. and Majster-Cederbaum, M. E. (1997) The connection between initial and unique solutions of domain equations in the partial order and metric approach. Formal Aspects of Computing 9 (4)425445.
Benton, N. and Hur, C.-K. (2009) Biorthogonality, step-indexing and compiler correctness. In: Proceedings of ICFP 97–108.
Benton, N. and Leperchey, B. (2005) Relational reasoning in a nominal semantics for storage. In: Proceedings of TLCA. Springer-Verlag Lecture Notes in Computer Science 3461 86101.
Birkedal, L., Reus, B., Schwinghammer, J., Støvring, K., Thamsborg, J. and Yang, H. (2010a) Step-indexed kripke models over recursive worlds. Submitted for publication. Available at http://www.itu.dk/people/birkedal/papers/step-recworld-conf.pdf.
Birkedal, L., Støvring, K. and Thamsborg, J. (2009) Relational parametricity for references and recursive types. In: Proceedings of TLDI 91–104.
Birkedal, L., Støvring, K. and Thamsborg, J. (2010b) A relational realizability model for higher-order stateful ADTs. Submitted for publication. Available at http://www.itu.dk/people/birkedal/papers/relrmhoadt.pdf.
Bohr, N. and Birkedal, L. (2006) Relational reasoning for recursive types and references. In: Proceedings of APLAS. Springer-Verlag Lecture Notes in Computer Science 4279 7996.
Cardone, F. (1989) Relational semantics for recursive types and bounded quantification. In: Proceedings of ICALP. Springer-Verlag Lecture Notes in Computer Science 372 164178.
Crary, K. and Harper, R. (2007) Syntactic logical relations for polymorphic and recursive types. Electronic Notes in Theoretical Computer Science 172 259299.
Laird, J. (2007) A fully abstract trace semantics for general references. In: Proceedings of ICALP. Springer-Verlag Lecture Notes in Computer Science 4596 667679.
Levy, P. B. (2006) Call-by-push-value: Decomposing call-by-value and call-by-name. Higher-Order and Symbolic Computation 19 (4)377414.
MacQueen, D. B., Plotkin, G. D. and Sethi, R. (1986) An ideal model for recursive polymorphic types. Information and Control 71 (1/2)95130.
McCusker, G. (2000) Games and full abstraction for FPC. Information and Computation 160 (1–2)161.
Moggi, E. (1991) Notions of computation and monads. Information and Computation 93 5592.
Petersen, R. L., Birkedal, L., Nanevski, A. and Morrisett, G. (2008) A realizability model for impredicative Hoare type theory. In: Proceedings of ESOP. Springer-Verlag Lecture Notes in Computer Science 4960 337352.
Pierce, B. C. (2002) Types and Programming Languages, The MIT Press.
Pitts, A. M. (1996) Relational properties of domains. Information and Computation 127 6690.
Pitts, A. M. (1998) Existential types: Logical relations and operational equivalence. In: Proceedings of ICALP. Springer-Verlag Lecture Notes in Computer Science 1443 309326.
Plotkin, G. D. and Power, J. (2004) Computational effects and operations: An overview. Electronic Notes in Theoretical Computer Science 73 149163.
Schwinghammer, J., Birkedal, L., Reus, B. and Yang, H. (2009) Nested Hoare triples and frame rules for higher-order store. In: Proceedings of CSL. Springer-Verlag Lecture Notes in Computer Science 5771 440454.
Schwinghammer, J., Yang, H., Birkedal, L., Pottier, F. and Reus, B. (2010) A semantic foundation for hidden state. In: Proceedings of FOSSACS. Springer-Verlag Lecture Notes in Computer Science 6014 217.
Smyth, M. B. (1992) Topology. In: Abramsky, S., Gabbay, D. and Maibaum, T. S. E. (eds.) Handbook of Logic in Computer Science, Oxford University Press.
Smyth, M. B. and Plotkin, G. D. (1982) The category-theoretic solution of recursive domain equations. SIAM Journal on Computing 11 (4)761783.
Wagner, K. R. (1994) Solving Recursive Domain Equations with Enriched Categories, Ph.D. thesis, Carnegie Mellon University.
Winskel, G. (1993) The Formal Semantics of Programming Languages, Foundation of Computing Series, The MIT Press.
Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Mathematical Structures in Computer Science
  • ISSN: 0960-1295
  • EISSN: 1469-8072
  • URL: /core/journals/mathematical-structures-in-computer-science
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 0 *
Loading metrics...

Abstract views

Total abstract views: 0 *
Loading metrics...

* Views captured on Cambridge Core between <date>. This data will be updated every 24 hours.

Usage data cannot currently be displayed