Technical reports
PFL+: A Kernal Scheme for Functions I/O
Andrew Gordon
February 1989, 26 pages
DOI: 10.48456/tr-160
Abstract
In place of the common separation of functional I/O into continuation and stream based schemes, an alternative division between Data Driven and Strictness Driven mechanisms for I/O is proposed. The data driven mechanism determines I/O actions by the Weak Head Normal Form of programs, while strictness driven I/O is based on suspensions – I/O actions are triggered when demand arises for the value of a suspension during normal order reduction. The data driven and strictness driven I/O mechanisms are exemplified by the output list and input list, respectively, in Landin’s stream based I/O scheme.
PFL+ is a functional I/O scheme, able to express arbitary I/O actions and both data driven and strictness driven constructs in terms of a small kernel of primitives. PFL+ could be added to any functional language. It is based on Holmström’s PFL [5], a parallel functional language with embedded communication and concurrency operators from CCS. PFL+ adds non-strict communication, behaviours with results and primitives to make suspensions.
Examples are given of how PFL+ can dervive from these primitives both stream based I/O and the representation of the file system as a function.
Full text
PDF (1.4 MB)
BibTeX record
@TechReport{UCAM-CL-TR-160, author = {Gordon, Andrew}, title = {{PFL+: A Kernal Scheme for Functions I/O}}, year = 1989, month = feb, url = {https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-160.pdf}, institution = {University of Cambridge, Computer Laboratory}, doi = {10.48456/tr-160}, number = {UCAM-CL-TR-160} }