Skip to main content

A sound metalogical semantics for input/output effects

  • Conference paper
  • First Online:
Computer Science Logic (CSL 1994)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 933))

Included in the following conference series:

Abstract

We study the longstanding problem of semantics for input/output (I/O) expressed using side-effects. Our vehicle is a small higher-order imperative language, with operations for interactive character I/O and based on ML syntax. Unlike previous theories, we present both operational and denotational semantics for I/O effects. We use a novel labelled transition system that uniformly expresses both applicative and imperative computation. We make a standard definition of bisimilarity and prove it is a congruence using Howe's method.

Next, we define a metalogical type theory M in which we may give a denotational semantics to O.M generalises Crole and Pitts' FIX-logic by adding in a parameterised recursive datatype, which is used to model I/O. M comes equipped both with judgements of equality of expressions, and an operational semantics; M itself is given a domain-theoretic semantics in the category CPPO of cppos (bottom-pointed posets with joins of ω-chains) and Scott continuous functions. We use the CPPO semantics to prove that the equational theory is computationally adequate for the operational semantics using formal approximation relations. The existence of such relations uses key ideas from Pitts' recent work.

A monadic-style textual translation into M induces a denotational semantics on O. Our final result justifies metalogical reasoning: if the denotations of two O programs are equal in M then the O programs are in fact operationally equivalent.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Samson Abramsky and Luke Ong. Full abstraction in the lazy lambda calculus. Information and Computation 105:159–267, 1993.

    Article  Google Scholar 

  2. Dave Berry, Robin Milner, and David N. Turner. A semantics for ML concurrency primitives. In 19th POPL, pages 119–129, 1992.

    Google Scholar 

  3. Gérard Boudol. Towards a lambda-calculus for concurrent and communicating systems. In TAPSOFT'89, Springer LNCS 351, 1989.

    Google Scholar 

  4. Roy. L. Crole. Categories for Types. CUP, 1993.

    Google Scholar 

  5. Roy. L. Crole and A. M. Pitts. New foundations for fixpoint computations: FIX hyperdoctrines and the FIX-logic. Information and Computation, 98:171–210, 1992.

    Article  Google Scholar 

  6. Roy L. Crole. Programming Metalogics with a Fixpoint Type. PhD thesis, University of Cambridge, 1992.

    Google Scholar 

  7. Roy L. Crole and Andrew D. Gordon. Factoring an adequacy proof (preliminary report). In Functional Programming, Glasgow 1993, Springer 1994.

    Google Scholar 

  8. Marcello P. Fiore and Gordon D. Plotkin. An Axiomatisation of Computationally Adequate Domain Theoretic Models of FPC. In 9th LICS, 1994.

    Google Scholar 

  9. P. Freyd. Algebraically complete categories. In 1990 Como Category Theory Conference, Springer Lecture Notes in Mathematics, 1991.

    Google Scholar 

  10. Andrew D. Gordon. Functional Programming and Input/Output. CUP, 1994.

    Google Scholar 

  11. Andrew D. Gordon. An operational semantics for I/O in a lazy functional language. In FPCA'93, pages 136–145. 1993.

    Google Scholar 

  12. Andrew D. Gordon. A tutorial on co-induction and functional programming. In Functional Programming, Glasgow 1994. Springer Workshops in Computing.

    Google Scholar 

  13. Sören Holmström. PFL: A functional language for parallel programming. Report 7, Chalmers PMG. 1983.

    Google Scholar 

  14. Douglas J. Howe. Equality in lazy computation systems. In 4th LICS, 1989.

    Google Scholar 

  15. John McCarthy et al. LISP 1.5 Programmer's Manual. MIT Press, 1962.

    Google Scholar 

  16. Robin Milner. Communication and Concurrency. Prentice-Hall, 1989.

    Google Scholar 

  17. R. Milner, M. Tofte and R. Harper. The Definition of SML. MIT Press, 1990.

    Google Scholar 

  18. Peter D. Mosses. Denotational semantics. In Jan Van Leeuven, editor, Handbook of Theoretical Computer Science, pages 575–631. Elsevier 1990.

    Google Scholar 

  19. Eugenio Moggi. Notions of computations and monads. TCS, 93:55–92, 1989.

    Google Scholar 

  20. Andrew M. Pitts. Evaluation logic. In IVth Higher Order Workshop, Banff 1990, pages 162–189. Springer 1991.

    Google Scholar 

  21. Andrew M. Pitts. Relational properties of domains. Tech. Report 321, University of Cambridge Computer Laboratory, December 1993.

    Google Scholar 

  22. Andrew M. Pitts. Computational adequacy via ‘mixed’ inductive definitions. In MFPS IX, New Orleans 1993, pages 72–82, Springer LNCS 802, 1994.

    Google Scholar 

  23. Gordon D. Plotkin. Pisa notes on domains, June 1978.

    Google Scholar 

  24. Gordon D. Plotkin. Denotational semantics with partial functions. Stanford CSLI 1985.

    Google Scholar 

  25. Jonathan Rees and William Clinger. Revised3 report on the algorithmic language scheme. ACM SIGPLAN Notices, 21(12):37–79, December 1986.

    Article  Google Scholar 

  26. Philip Wadler. The essence of functional programming. In 19th POPL, 1992.

    Google Scholar 

  27. John H. Williams and Edward L. Wimmers. Sacrificing simplicity for convenience: Where do you draw the line? In 15th POPL, 1988.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Leszek Pacholski Jerzy Tiuryn

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Crole, R.L., Gordon, A.D. (1995). A sound metalogical semantics for input/output effects. In: Pacholski, L., Tiuryn, J. (eds) Computer Science Logic. CSL 1994. Lecture Notes in Computer Science, vol 933. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0022267

Download citation

  • DOI: https://doi.org/10.1007/BFb0022267

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-60017-6

  • Online ISBN: 978-3-540-49404-1

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics