Reasoning about local variables with operationally-based logical relations

A parametric logical relation between the phrases of an Algol-like language is presented. Its definition involves the structural operational semantics of the language, but was inspired by recent denotationally-based work of O'Hearn and Reynolds on translating Algol into a predicatively polymorphic linear lambda calculus. The logical relation yields an applicative characterisation of contextual equivalence for the language and provides a useful (and complete) method for proving equivalences. Its utility is illustrated by giving simple and direct proofs of some contextual equivalences, including an interesting equivalence due to O'Hearn which hinges upon the undefinability of 'snapback' operations (and which goes beyond the standard suite of 'Meyer-Sieber' examples). Whilst some of the mathematical intricacies of denotational semantics are avoided, the hard work in this operational approach lies in establishing the 'fundamental property' for the logical relation-the proof of which makes use of a compactness property of fixpoint recursion with respect to evaluation of phrases. But once this property has been established, the logical relation provides a verification method with an attractively low mathematical overhead.

[1]  Kurt Sieber Full Abstraction for the Second Order Subset of an Algol-Like Language , 1996, Theor. Comput. Sci..

[2]  Albert R. Meyer,et al.  Towards fully abstract semantics for local variables , 1988, POPL '88.

[3]  Peter W. O'Hearn,et al.  Objects, interference and the Yoneda embedding , 1995, MFPS.

[4]  Scott F. Smith From Operational to Denotational Semantics , 1991, MFPS.

[5]  Carolyn L. Talcott,et al.  From Operational Semantics to Domain Theory , 1996, Inf. Comput..

[6]  Douglas J. Howe Equality in lazy computation systems , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[7]  John C. Mitchell,et al.  Type Systems for Programming Languages , 1991, Handbook of Theoretical Computer Science, Volume B: Formal Models and Sematics.

[8]  Kurt Sieber,et al.  Full Abstraction for the Second Order Subset of an Algol-Like Language , 1996, Theor. Comput. Sci..

[9]  John C. Reynolds,et al.  The essence of ALGOL , 1997 .

[10]  Andrew Pitts,et al.  Semantics and Logics of Computation: Operationally-Based Theories of Program Equivalence , 1997 .

[11]  Frank J. Oles,et al.  Type Algebras, Functor Categories, and Block Structure , 1986 .

[12]  Andrew M. Pitts,et al.  Observable Properties of Higher Order Functions that Dynamically Create Local Names, or What's new? , 1993, MFCS.

[13]  Peter W. O'Hearn,et al.  Parametricity and local variables , 1995, JACM.

[14]  Ian David Bede Stark,et al.  Names and higher-order functions , 1994 .

[15]  Carolyn L. Talcott,et al.  A Variable Typed Logic of Effects , 1995, Inf. Comput..

[16]  Douglas J. Howe Proving Congruence of Bisimulation in Functional Programming Languages , 1996, Inf. Comput..

[17]  Philip Wadler,et al.  A Syntax for Linear Logic , 1993, MFPS.

[18]  Robin Milner,et al.  Fully Abstract Models of Typed lambda-Calculi , 1977, Theor. Comput. Sci..

[19]  Dana S. Scott,et al.  A Type-Theoretical Alternative to ISWIM, CUCH, OWHY , 1993, Theor. Comput. Sci..

[20]  Uday S. Reddy,et al.  Global state considered unnecessary: An introduction to object-based semantics , 1996, LISP Symb. Comput..

[21]  Andrew M. Pitts,et al.  Relational Properties of Domains , 1996, Inf. Comput..

[22]  Andrew M. Pitts,et al.  A Fully Abstract Translation between a Lambda-Calculus with Reference Types and Standard ML , 1995, TLCA.