Realizability Semantics of Parametric Polymorphism, General References, and Recursive Types

  • Authors:
  • Lars Birkedal;Kristian Støvring;Jacob Thamsborg

  • Affiliations:
  • IT University of Copenhagen, Copenhagen S, Denmark 2300;IT University of Copenhagen, Copenhagen S, Denmark 2300;IT University of Copenhagen, Copenhagen S, Denmark 2300

  • Venue:
  • FOSSACS '09 Proceedings of the 12th International Conference on Foundations of Software Science and Computational Structures: Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2009
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

We present a realizability 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 (as needed for parametricity reasoning) that include general reference types. The interpretation uses a new approach to modeling 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.