Categorical models for local names

This paper describes the construction of categorical models for thenu-calculus, a language that combines higher-order functions with dynamically creatednames. Names are created with local scope, they can be compared with each other and passed around through function application, but that is all.The intent behind this language is to examine one aspect of the imperative character of Standard ML: the use of local state by dynamic creation of references. The nu-calculus is equivalent to a certain fragment of ML, omitting side effects, exceptions, datatypes and recursion. Even without all these features, the interaction of name creation with higher-order functions can be complex and subtle; it is particularly difficult to characterise theobservable behaviour of expressions.Categorical monads, in the style of Moggi, are used to build denotational models for the nu-calculus. An intermediate stage is the use of a computational metalanguage, which distinguishes in the type system between values and computations.The general requirements for a categorical model are presented, and two specific examples described in detail. These provide a sound denotational semantics for the nu-calculus, and can be used to reason about observable equivalence in the language. In particular a model using logical relations is fully abstract for first-order expressions.

[1]  Carolyn L. Talcott,et al.  Inferring the Equivalence of Functional Programs That Mutate Data , 1992, Theor. Comput. Sci..

[2]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[3]  A. Kock Monads on symmetric monoidal closed categories , 1970 .

[4]  I. Stark,et al.  On the Observable Properties of Higher Order Functions that Dynamically Create Local Names (Preliminary Report) , 1993 .

[5]  Andrew Donald Gordon,et al.  Functional programming and input/output , 1995 .

[6]  Peter W. O'Hearn,et al.  Relational parametricity and local variables , 1993, POPL '93.

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

[8]  A. Pitts INTRODUCTION TO HIGHER ORDER CATEGORICAL LOGIC (Cambridge Studies in Advanced Mathematics 7) , 1987 .

[9]  A. Kock Bilinearity and Cartesian Closed Monads. , 1971 .

[10]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential State , 1989, Theor. Comput. Sci..

[11]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

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

[13]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

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

[15]  Albert R. Meyer,et al.  Towards a fully abstract semantics for local variables: Preliminary report , 1988 .

[16]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[17]  Hans-Juergen Karl Hermann Boehm A logic for the russell programming language , 1984 .

[18]  . W. O'Hearn Semantics of Local VariablesP , 1992 .

[19]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[20]  Kurt Sieber Full abstraction for the second order subset of an ALGOL-like language (preliminary report) , 1994 .

[21]  Robin Milner,et al.  Definition of standard ML , 1990 .

[22]  R. D. Tennent,et al.  Applications of Categories in Computer Science: Semantics of local variables , 1992 .

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

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

[25]  Peter W. O'Hearn,et al.  Kripke Logical Relations and PCF , 1995, Inf. Comput..

[26]  J. Lambek,et al.  Introduction to higher order categorical logic , 1986 .

[27]  Donald Sannella,et al.  Programming Languages and Systems — ESOP '94 , 1994, Lecture Notes in Computer Science.

[28]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[29]  Ian A. Mason The Semantics of Destructive LISP , 1986 .

[30]  S. Abramsky The lazy lambda calculus , 1990 .

[31]  Peter W. O'Hearn,et al.  Fully Abstract Translations and Parametric Polymorphism , 1994, ESOP.