Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
article
Free access

Lazy functional state threads

Published: 01 June 1994 Publication History

Abstract

Some algorithms make critical internal use of updatable state, even though their external specification is purely functional. Based on earlier work on monads, we present a way of securely encapsulating stateful computations that manipulate multiple, named, mutable objects, in the context of a non-strict, purely-functional language.
The security of the encapsulation is assured by the type system, using parametricity. Intriguingly, this parametricity requires the provision of a (single) constant with a rank-2 polymorphic type.

References

[1]
E Barendsen L~ JEW Smetsers {Dec 1993}, "Conventional and uniqueness typing in graph rewrite systems," in Proc 13th Conference on the Foundations of Software Technology and Theoretical Computer Science, Springer Verlag LNCS.
[2]
DK Gifford & JM Lucassen {Aug 1986}, "Integrating functional and imperative programming,'" in A CM Conference on Lisp and Functional Programming, MIT, ACM, 28-38.
[3]
J Launchbury{June 1993}, "Lazy imperative programming,' in Proc A CM Sigplan Workshop on State in Programming Languages, Copenhagen (available as YALEU/DCS/RR- 968, Yale University), pp46-56.
[4]
J Launchbury Lc SL Peyton Jones{Feb 1994}, "Lazy functional state threads," Technical report FP- 94-05, Department of Computing Science, University of Glasgow (FTP:ftp. dcs. glasgow, ac. uk: pub/glasgow-fp/tech-report s / FP-94-05: sta~e, ps. Z).
[5]
NJ McCracken {June 1984}, "The typechecking of programs with implicit type structure," in Semantics of data types, Springer Verlag LNCS 173, 301-315.
[6]
JC Mitchell & AR Meyer {1985}, "Second-order logical relations," in Logics of Programs, R Parikh, ed., Springer Verlag LNCS 193.
[7]
Rishiyur Nikhil{March 1988}, "Id Reference Manual," Lab for Computer Sci, MIT.
[8]
M Odersky, D Rabin & P Hudak{Jan 1993}, "Call by name, assignment, and the lambda calculus," in 20th A CM Symposium on Principles of Programming Languages, Charleston, ACM, 43- 56.
[9]
LC Paulson {1991}, ML for the working programmer, Cambridge University Press.
[10]
SL Peyton Jones L~ J Launchbury{Sept 1991}, "Unboxed values as first class citizens," in Functional Programming Languages and Computer Architecture, Boston, Hughes, ed., LNCS 523, Springer Verlag, 636-666.
[11]
SL Peyton Jones & PL Wadler {Jan 1993}, "Imperative functional programming," in 20th A CM Symposium on Principles of Programming Languages, Charleston, ACM, 71-84.
[12]
CG Ponder, PC McOeer & A P-C Ng {June 1988}, "Are applicative languages inefficient?," $iGPLAN Notices 23, 135-139.
[13]
DA Schmidt {Apr 1985}, "Detecting global variables in denotational specifications," TOPLAS 7, 299- 310.
[14]
V Swarup, US Reddy & E Ireland{Sept 1991}, "As~ signments for applicative languages," in Functional Programming Languages and Computer Architecture, Boston, Hughes, ed., LNCS 523, Springer Verlag, 192-214.
[15]
M Tofte{Nov 1990}, "Type inference for polymorphic references," information and Computation 89.

Cited By

View all
  • (2020)Staged selective parser combinatorsProceedings of the ACM on Programming Languages10.1145/34090024:ICFP(1-30)Online publication date: 3-Aug-2020
  • (2020)Proof-Producing Synthesis of CakeML from Monadic HOL FunctionsJournal of Automated Reasoning10.1007/s10817-020-09559-8Online publication date: 6-Jun-2020
  • (2019)CyBy2: a strongly typed, purely functional framework for chemical data managementJournal of Cheminformatics10.1186/s13321-019-0403-211:1Online publication date: 30-Dec-2019
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 29, Issue 6
June 1994
360 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/773473
Issue’s Table of Contents
  • cover image ACM Conferences
    PLDI '94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
    August 1994
    360 pages
    ISBN:089791662X
    DOI:10.1145/178243
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 June 1994
Published in SIGPLAN Volume 29, Issue 6

Check for updates

Qualifiers

  • Article

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)317
  • Downloads (Last 6 weeks)65
Reflects downloads up to 15 Oct 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media