Abstract
Computer programs interact with users, and programmers must describe this interaction when they write programs. Programming languages usually allow programmers to describe this interaction with primitive read and write functions. The situation is not so simple in the realm of lazy functional languages. Because read and write are not referentially transparent, programmers cannot use them in lazy functional languages.
This paper shows that lazy programs can interact with users by generating I/O Trees—structures that describe possible interactions between user and program. I/O trees encode a program's dynamic behavior in static structure. This paper presents the fundamental structure and interpretation of I/O trees, describes extensions to I/O trees, and suggests ways programmers can write programs that generate I/O trees.
Partially supported by NSF grant #CCR 9016905
Preview
Unable to display preview. Download preview PDF.
References
Stephen W. Bailey. Ielp User Guide. University of Chicago, February 1992. Part of the ielp distribution. Available via anonymous ftp from cs.uchicago.edu.
Andrew Dwelly. Synchronizing the I/O behavior of functional programs with feedback. Information Processing Letters, 28:45–51, 1988.
Paul Hudak (editor), Simon Peyton Jones (editor), Phil Wadler (editor), Brian Boutel, Jon Fairbairn, Joseph Fasel, MarĂa M. Guzmán, Kevin Hammond, John Hughes, Thomas Johnsson, Dick Keiburtz, Rishiyur Nikhil, Will Partain, and John Peterson. Report on the programming language Haskell, a non-strict, purely functional language, version 1.2. ACM SIGPLAN Notices, 27(5), May 1992.
Paul Hudak and Raman S. Sundaresh. On the expressiveness of purely functional I/O systems. Technical Report YALEU/DCS/RR665, Yale University, December 1988.
Mark P. Jones. An Introduction to Gofer, 1991. Available via anonymous ftp.
David Notkin. Interactive Structure Oriented Computing. PhD thesis, Carnegie-Mellon University, 1984.
Michael J. O'Donnell. Equational Logic As a Programming Language. The MIT Press, Cambridge, MA, 1985.
Samuel A. Rebelsky. An introduction to Tours, a protocol for demand-driven communication of terms. Technical Report CS91-28, University of Chicago Department of Computer Science, November 1991.
Samuel A. Rebelsky and David J. Sherman. Developing an interactive interface for equational logic programs. Technical Report 90-05, University of Chicago Department of Computer Science, February 1990.
Linda Sellie and David J. Sherman. Preliminary notes on version 4.1 of the equational compiler. Technical Report 90-013, University of Chicago Department of Computer Science, 1990.
David J. Sherman. EM code semantics, analysis, and optimization. Technical Report Rapport 92-04, Greco de Programmation du CNRS, 1992.
Robert I. Strandh. Compiling Equational Programs into Efficient Machine Code. PhD thesis, Johns Hopkins University, Baltimore, Maryland, 1988.
Simon Thompson. Interactive functional programs, a method and a formal semantics. In David A. Turner, editor, Research Topics in Functional Programming. Addison-Wesley, 1990.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1992 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Rebelsky, S.A. (1992). I/O trees and interactive lazy functional programming. In: Bruynooghe, M., Wirsing, M. (eds) Programming Language Implementation and Logic Programming. PLILP 1992. Lecture Notes in Computer Science, vol 631. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-55844-6_154
Download citation
DOI: https://doi.org/10.1007/3-540-55844-6_154
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-55844-6
Online ISBN: 978-3-540-47297-1
eBook Packages: Springer Book Archive