GDP Festschrift
ENTCS,
to appear
Syntactic Logical Relations for Polymorphic
and Recursive Types
Karl Crary
1
Robert Harper
2
Computer Science Department
Carnegie Mellon University
Pittsburgh, PA 15213
Abstract
The method of logical relations assigns a relational interpretation to types that expresses operational in
variants satisfied by all terms of a type. The method is widely used in the study of typed languages, for
example to establish contextual equivalences of terms.
The chief difficulty in using logical relations is to
establish the existence of a suitable relational interpretation.
We extend work of Pitts and Birkedal and
Harper on constructing relational interpretations of types to polymorphism and recursive types, and apply
it to establish parametricity and representation independence properties in a purely operational setting.
We argue that, once the existence of a relational interpretation has been established, it is straightforward
to use it to establish properties of interest.
Keywords:
Operational semantics, type structure, logics of programs, lambda calculus and related
systems, data abstraction, polymorphism.
1
Introduction
It is a pleasure to contribute this paper in honor of Gordon D. Plotkin on the occa
sion of his sixtieth birthday. Plotkin’s research on the mathematical foundations of
programming languages is singularly influential, providing the foundations for much
subsequent work and establishing new approaches to neglected or illunderstood
problems. Several themes have direct bearing on the work described herein.
One important theme is the use of operational semantics for defining and ana
lyzing programming languages. Plotkin’s
structural operational semantics
[
25
,
24
] is
particularly influential. Execution is modelled as a transition system whose states
are programs. The transition relation is inductively defined by a collection of in
ference rules that mirror the structure of the program. The transition rules specify
1
Email:
[email protected]
2
Email:
[email protected]
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
both the individual steps of execution and the order in which these steps are exe
cuted. Properties of the execution behavior of programs, such as type safety, may
be proved by induction over the transition rules.
Another theme in Plotkin’s work is the analysis of
observational equivalence
be
tween program fragments. Applying Leibniz’s Principle of Identity of Indiscernibles,
two program fragments are observationally equivalent iff they engender the same
observable outcomes however they may be used in a complete program. Being the
coarsest consistent congruence, one may use coinduction to prove that two frag
ments are observationally equivalent. But in practice such a direct proof is rarely
effective; a more tractable characterization is needed. Plotkin, in his seminal study
of PCF [
22
], considered denotational methods that turned out to provide sufficient,
but not necessary, conditions for observational equivalence. This requires proving
computational adequacy
This is the end of the preview.
Sign up
to
access the rest of the document.
 Spring '10
 Dr. Thomas
 Computer Science, Logic, The Land, Equivalence relation, Type system, Type theory, Relational Interpretation

Click to edit the document details