|
ABSTRACT
The problem of expressing I/O and side effects in functional languages is a well-established one. This paper addresses this problem from a general semantic viewpoint by giving a unified framework for describing shared state, I/O and deterministic concurrency. We develop a modified state transformer which lets us mathematically model the API, then investigate and machine verify some broad conditions under which confluence holds. This semantics is used as the basis for a small deterministic Haskell language extension called CURIO, which enforces determinism using runtime checks.Our confluence condition is first shown to hold for a variety of small components, such as individual shared variables, 1-to-1 communication channels, and I-structures. We then show how models of substantial APIs (like a modification of Haskell's file I/O API which permits inter-process communication) may be constructed from these smaller components using "combinators" in such a way that determinism is always preserved. We describe combinators for product, name-indexing and dynamic allocation, the last of which requires some small extensions to cater for process locality.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
Peter Achten and Rinus Plasmeijer. The Ins and Outs of Clean I/O. Journal of Functional Programming, 5(1):81--110, January 1995.
|
 |
2
|
|
| |
3
|
Erik Barendsen and Sjaak Smetsers. Uniqueness Typing for Functional Languages with Graph Rewriting Semantics. Mathematical Structures in Computer Science, 6(6):579--612, 1996.
|
| |
4
|
John Boyland. Checking Interference with Fractional Permissions. In Radhia Cousot, editor, SAS, volume LNCS2694, pages 55--72. Springer, 2003.
|
| |
5
|
|
 |
6
|
Karl Crary , David Walker , Greg Morrisett, Typed memory management in a calculus of capabilities, Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.262-275, January 20-22, 1999, San Antonio, Texas, United States
[doi> 10.1145/292540.292564]
|
| |
7
|
|
 |
8
|
|
| |
9
|
Malcolm Dowse. A Semantic Framework for Deterministic Functional Input/Output. PhD thesis, Department of Computer Science, University of Dublin, 2006.
|
| |
10
|
Malcolm Dowse, Andrew Butterfield, and Marko van Eekelen. Reasoning about Deterministic Concurrent Functional I/O. In Clemens Grelck and Frank Huch, editors, Proceedings of IFL 2004, volume LNCS3474, pages 177--194. Springer-Verlag, 2005.
|
| |
11
|
Malcolm Dowse, Glenn Strong, and Andrew Butterfield. Proving "make" Correct - I/O Proofs in Haskell and Clean. In Ricardo Peña and Thomas Arts, editors, Proceedings of IFL 2002, volume LNCS2670, pages 68--83, 2002.
|
| |
12
|
|
| |
13
|
Andrew Gordon. Bisimilarity as a Theory of Functional Programming: Mini-course. Notes Series BRICS-NS-95-3, BRICS, Department of Computer Science, University of Aarhus, July 1995.
|
| |
14
|
Cordelia Hall and Kevin Hammond. A Dynamic Semantics for Haskell (draft), May 20 1993.
|
 |
15
|
|
 |
16
|
Tim Harris , Simon Marlow , Simon Peyton-Jones , Maurice Herlihy, Composable memory transactions, Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, June 15-17, 2005, Chicago, IL, USA
[doi> 10.1145/1065944.1065952]
|
| |
17
|
|
| |
18
|
Mark Jones and Paul Hudak. Implicit and Explicit Parallel Programming in Haskell. Technical Report YALEU/DCS/RR-982, Department of Computer Science, Yale University, August 1993.
|
 |
19
|
|
| |
20
|
|
| |
21
|
|
| |
22
|
Simon Peyton Jones. Wearing the Hair Shirt: A retrospective on Haskell. Invited talk at POPL 2003.
|
| |
23
|
Simon Peyton Jones. Tackling the Awkward Squad - monadic input/output, concurrency, exceptions, and foreign language calls in Haskell. In CAR Hoare, M Broy, and R Stein-brueggen, editors, Engineering theories of software construction, Marktoberdorf Summer School 2000, pages 47--96. IOS Press, 2001.
|
 |
24
|
Simon Peyton Jones , Andrew Gordon , Sigbjorn Finne, Concurrent Haskell, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.295-308, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237794]
|
 |
25
|
|
| |
26
|
|
| |
27
|
|
| |
28
|
Eleni Spiliopoulou. Concurrent and Distributed Functional Systems. PhD thesis, University of Bristol, Department of Computing Science, August 1999.
|
 |
29
|
|
| |
30
|
Simon Thompson. Interactive Functional Programs: a method and a formal semantics. Technical Report 48*, Computing Laboratory, University of Kent,, November 1987.
|
| |
31
|
|
 |
32
|
|
 |
33
|
|
|