This preview shows pages 1–3. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 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. Plotkins 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 ill-understood 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. Plotkins 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@example.com 2 Email: firstname.lastname@example.org 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 Plotkins work is the analysis of observational equivalence be- tween program fragments. Applying Leibnizs 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 provingbut not necessary, conditions for observational equivalence....
View Full Document