Abstract
This paper contributes to the methodology of using metalogics for reasoning about programming languages. As a concrete example we consider a fragment of ML corresponding to call-by-value PCF and translate it into a metalogic which contains (amongst other types) computation types and a fixpoint type. The main result is a soundness property (*): if the denotations of two programs are provably equal in the metalogic, they have the same operationally observable behaviour. As usual, this follows from a computational adequacy result. In early notes, Plotkin showed how such proofs could be factored into two stages, the first non-trivial and the second (essentially) routine; our contribution is to rework his suggestion within a new framework. We define a metalogic, which incorporates computation and fixpoint types, and specify a modular translation of the ML fragment. Our proof of (*) factors into two parts. First, the term language of the metalogic is equipped with an operational semantics and a (generic) computational adequacy result obtained. Second, a simple syntactic argument establishes a correspondence between the operational behaviour of an object program and of its denotation. The first part is not routine but is proved once and for all. The second is a detailed but essentially trivial calculation that is easily adaptable to other object languages. Such a factored proof is important because it promises to scale up more easily than a monolithic one. We show that it may be adapted to an object language with call-by-name functions and one with a simple exception mechanism.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Peter Nicholas Benton. Strictness Analysis of Lazy Functional Programs. PhD thesis, University of Cambridge Computer Laboratory, August 1993. Available as Technical Report 309.
R. L. Crole. Computational adequacy for the FIX-Logic. Theoretical Computer Science. Accepted. (To appear in 1994.).
R. L. Crole and A. M. Pitts. New foundations for fixpoint computations: FIX hyperdoctrines and the FIX-logic. Information and Control, 98:171–210, 1992. Earlier version in LICS’90.
Roy L. Crole. Programming Metalogics with a Fixpoint Type. PhD thesis, University of Cambridge Computer Laboratory, February 1992. Available as Technical Report 247.
Andrew D. Gordon. Functional Programming and Input/Output. PhD thesis, University of Cambridge, August 1992. To appear in Cambridge University Press’ series Distinguished Dissertations in Computer Science.
Carl A. Gunter. Semantics of Programming Languages: Structures and Techniques. MIT Press, Cambridge, Mass., 1992.
Claire Jones. Probabilistic Non-determinism. PhD thesis, University of Edinburgh, 1990. Available as Technical Report CST-63-90, Computer Science Department, University of Edinburgh.
Albert R. Meyer and Stavros S. Cosmadakis. Semantical paradigms: Notes for an invited lecture. In Proceedings of the 3rd IEEE Symposium on Logic in Computer Science, pages 236–253, July 1988.
Eugenio Moggi. The Partial Lambda-Calculus. PhD thesis, Department of Computer Science, University of Edinburgh, August 1988. Available as Technical report CST-53-88.
Eugenio Moggi. Computational lambda calculus and monads. In Proceedings of the 4th IEEE Symposium on Logic in Computer Science, June 1989.
Eugenio Moggi. Notions of computation and monads. Theoretical Computer Science, 93:55–92, 1989.
Bengt Nordstrom, Kent Petersson, and Jan M. Smith. Programming in Martin-Löf’s Type Theory, volume 7 of The International Series of Monographs in Computer Science. Clarendon Press, Oxford, 1990.
Simon L. Peyton Jones and Philip Wadler. Imperative functional programming. In Proceedings 20th ACM Symposium on Principles of Programming Languages, Charleston, South Carolina, January 1993. ACM Press, 1993.
Andrew M. Pitts. Notes on the call-by-value and call-by-name translation of the simply typed lambda-calculus into the computational lambda-calculus. Manuscript, October 1990.
Andrew M. Pitts. Evaluation logic. In G. Birtwistle, editor, IVth Higher Order Workshop, Banff 1990, Workshops in Computing, pages 162–189. Springer-Verlag, 1991. Available as University of Cambridge Computer Laboratory Technical Report 198, August 1990.
Andrew M. Pitts. Computational adequacy via ‘mixed’ inductive definitions. In MFPS IX, New Orleans, 1993.
Gordon D. Plotkin. Denotational semantics with partial functions. Unpublished lecture notes, CSLI, Stanford University, July 1985.
Jon G. Riecke. Fully abstract translations between functional languages. To appear in Mathematical Structures in Computer Science, December 1992.
Philip Wadler. Comprehending monads. Mathematical Structures in Computer Science, 2:461–493, 1992.
Philip Wadler. The essence of functional programming. In Proceedings of the Nineteenth ACM Symposium on Principles of Programming Languages, 1992.
Glynn Winskel. The Formal Semantics of Programming Languages. MIT Press, Cambridge, Mass., 1993.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 1994 British Computer Society
About this chapter
Cite this chapter
Crole, R.L., Gordon, A.D. (1994). Factoring an Adequacy Proof (Preliminary Report). In: O’Donnell, J.T., Hammond, K. (eds) Functional Programming, Glasgow 1993. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3236-3_2
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3236-3_2
Publisher Name: Springer, London
Print ISBN: 978-3-540-19879-6
Online ISBN: 978-1-4471-3236-3
eBook Packages: Springer Book Archive