# Observable properties of higher order functions that dynamically create local names, or: What's new?

## Abstract

The research reported in this paper is concerned with the problem of reasoning about properties of higher order functions involving state. It is motivated by the desire to identify what, if any, are the difficulties created purely by *locality* of state, independent of other properties such as side-effects, exceptional termination and non-termination due to recursion. We consider a simple language (equivalent to a fragment of Standard ML) of typed, higher order functions that can dynamically create fresh *names*; names are created with local scope, can be tested for equality and can be passed around via function application, but that is all. Despite the extreme simplicity of the language and its operational semantics, the observable properties of such functions are shown to be very subtle. A notion of ‘logical relation’ is introduced which incorporates a version of *representation independence* for local names. We show how to use it to establish observational equivalences. The method is shown to be complete (and decidable) for expressions of first order types, but incomplete at higher types.

## Keywords

Operational Semantic Logical Relation Order Type Denotational Semantic Ground Type## Preview

Unable to display preview. Download preview PDF.

## References

- 1.S. Abramsky. The Lazy Lambda Calculus. In D. Turner (ed.),
*Research Topics in Functional Programming*(Addison-Wesley, 1990), pp 65–116.Google Scholar - 2.H.-J. Boehm. Side-effects and aliasing can have simple axiomatic descriptions,
*ACM Trans. Prog. Lang. Syst.*7(1985) 637–655.Google Scholar - 3.M. Felleisen and D. P. Friedman. A Syntactic Theory of Sequential State,
*Theoretical Computer Science*69(1989) 243–287.Google Scholar - 4.F. Honsell, I. A. Mason, S. Smith and C. Talcott. A Variable Typed Logic of Effects. In
*Proc. Computer Science Logic 1992*, Lecture Notes in Computer Science (Springer-Verlag, Berlin, 1993),*to appear*.Google Scholar - 5.D. J. Howe. Equality in Lazy Computation Systems. In
*Proc. 4th Annual Symp. on Logic in Computer Science*, Asilomar, 1989 (IEEE Computer Society Press, Washington, 1989) pp 198–203.Google Scholar - 6.I. A. Mason and C. Talcott. References, local variables and operational reasoning. In
*Proc. 7th Annual Symp. on Logic in Computer Science*, Santa Cruz, 1992 (IEEE Computer Society Press, Washington, 1992) pp 186–197.Google Scholar - 7.A. Meyer and K. Sieber. Towards fully abstract semantics for local variables: preliminary report. In
*Conf. Record 15th Symp. on Principles of Programming Languages*, San Diego, 1988 (ACM, New York, 1988) pp 191–203.Google Scholar - 8.R. Milner. Fully abstract models of typed λ-calculi.
*Theoretical Computer Science*4(1977) 1–22.Google Scholar - 9.R. Milner, M. Tofte and R. Harper.
*The Definition of Standard ML*(MIT Press, 1990).Google Scholar - 10.E. Moggi. Notions of Computation and Monads,
*Information and Computation*93(1991) 55–92.Google Scholar - 11.P. W. O'Hearn. A Model for Syntactic Control of Interference,
*Mathematical Structures in Computer Science*, to appear.Google Scholar - 12.P. W. O'Hearn and R. D. Tennent. Semantics of Local Variables. In M. P. Fourman, P. T. Johnstone and A. M. Pitts (eds),
*Applications of Categories in Computer Science*, L.M.S. Lecture Note Series 177 (Cambridge University Press, 1992), pp 217–238.Google Scholar - 13.P. W. O'Hearn and R. D. Tennent. Relational Parametricity and Local Variables. In
*Conf. Record 20th Symp. on Principles of Programming Languages*, Charleston, 1993 (ACM, New York, 1993) pp 171–184.Google Scholar - 14.A. M. Pitts and I. D. B. Stark. On the Observational Properties of Higher Order Functions that Dynamically Create Local Names (preliminary report). In
*Proceedings of the ACM SIGPLAN Workshop on State in Programming Languages*, Copenhagen, 1993, Yale Univ. Dept. Computer Science Tech. Report.Google Scholar - 15.G. D. Plotkin. Call-by-name, call-by-value and the lambda calculus.
*Theoretical computer Science*1(1975) 125–159.Google Scholar - 16.G. D. Plotkin and M. Abadi. A Logic for Parametric Polymorphism. In
*Proceedings of the Conference on Typed Lambda Calculus and its Applications*, Utrecht, 1993, Lecture Notes in Computer Science Vol. 664 (Springer-Verlag, Berlin, 1993) pp 361–375.Google Scholar - 17.J. C. Reynolds. Syntactic Control of Interference. In
*Conf. Record 5th Symp. on Principles of Programming Languages*, Tucson, 1978 (ACM, New York, 1978) pp 39–46.Google Scholar - 18.R. D. Tennent. Semantic Analysis of Specification Logic,
*Information and Computation*85(1990) 135–162.Google Scholar