skip to main content
10.1145/1086365.1086379acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Witnessing side-effects

Published: 12 September 2005 Publication History

Abstract

We present a new approach to the old problem of adding side effects to purely functional languages. Our idea is to extend the language with "witnesses," which is based on an arguably more pragmatic motivation than past approaches. We give a semantic condition for correctness and prove it is sufficient. We also give a static checking algorithm that makes use of a network flow property equivalent to the semantic condition.

References

[1]
P. Achten, J. H. G. van Groningen, and R. Plasmeijer. High level specification of I/O in functional languages. In Proceedings of the 1992 Glasgow Workshop on Functional Programming, pages 1--17. Springer-Verlag, 1993.
[2]
J. Boyland. Checking interference with fractional permissions. In R. Cousot, editor, Static Analysis, Tenth International Symposium, volume 2694 of Lecture Notes in Computer Science, pages 55--72, San Diego, CA, June 2003. Springer-Verlag.
[3]
K. Crary, D. Walker, and G. Morrisett. Typed memory management in a calculus of capabilities. In Proceedings of the 26th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 262--275, San Antonio, Texas, Jan. 1999.
[4]
M. F�hndrich, J. S. Foster, Z. Su, and A. Aiken. Partial online cycle elimination in inclusion constraint graphs. In Proceedings of the 1998 ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 85--96, Montreal, Canada, June 1998.
[5]
D. Grossman, G.Morrisett, T. Jim,M. Hicks, Y.Wang, and J. Cheney. Region-based memory management in Cyclone. In Proceedings of the 2002 ACM SIGPLAN Conference on Programming Language Design and Implementation, Berlin, Germany, June 2002.
[6]
J. C. Guzman and P. Hudak. Single-threaded polymorphic lambda calculus. In Proceedings, Fifth Annual IEEE Symposium on Logic in Computer Science, pages 42--51, Philadelphia, Pennsylvania, June 1990.
[7]
S. L. P. Jones and P. Wadler. Imperative functional programming. In Proceedings of the 20th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 71--84, Charleston, South Carolina, Jan. 1993.
[8]
J. Launchbury. A natural semantics for lazy evaluation. In Proceedings of the 20th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 144--154, Charleston, South Carolina, Jan. 1993.
[9]
J. Launchbury and A. Sabry. Monadic state: Axiomatization of type safety. In Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming, pages 227--238, Amsterdam, The Netherlands, June 1997.
[10]
E. Moggi. Notions of computation and monads. Information and Computation, 93(1):55--92, 1991.
[11]
M. Odersky, D. Rabin, and P. Hudak. Call by name, assignment, and the lambda calculus. In Proceedings of the 20th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 43--56, Charleston, South Carolina, Jan. 1993.
[12]
G. D. Plotkin. Call-by-name, call-by-value and the lambda-calculus. Theoretical Computer Science, 1:125--159, 1975.
[13]
T. Terauchi and A. Aiken. Witnessing side-effects. Technical report, Computer Science Division, EECS Department, University of California, Berkeley.
[14]
M. Tofte and J.-P. Talpin. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Proceedings of the 21st Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 188--201, Portland, Oregon, Jan. 1994.
[15]
P. Wadler. Linear types can change the world! In Proceedings of the third ACM SIGPLAN International Conference on Functional Programming, pages 63--74, Baltimore, Maryland, Sept. 1998.

Cited By

View all
  • (2016)Gentrification gone too far? affordable 2nd-class values for fun and (co-)effectACM SIGPLAN Notices10.1145/3022671.298400951:10(234-251)Online publication date: 19-Oct-2016
  • (2016)Gentrification gone too far? affordable 2nd-class values for fun and (co-)effectProceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2983990.2984009(234-251)Online publication date: 19-Oct-2016
  • (2009)Polymorphic Fractional CapabilitiesProceedings of the 16th International Symposium on Static Analysis10.1007/978-3-642-03237-0_5(36-51)Online publication date: 12-Aug-2009
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '05: Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
September 2005
342 pages
ISBN:1595930647
DOI:10.1145/1086365
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 40, Issue 9
    Proceedings of the tenth ACM SIGPLAN international conference on Functional programming
    September 2005
    330 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1090189
    Issue’s Table of Contents
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 12 September 2005

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. functional languages
  2. side-effects

Qualifiers

  • Article

Conference

ICFP05
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 22 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2016)Gentrification gone too far? affordable 2nd-class values for fun and (co-)effectACM SIGPLAN Notices10.1145/3022671.298400951:10(234-251)Online publication date: 19-Oct-2016
  • (2016)Gentrification gone too far? affordable 2nd-class values for fun and (co-)effectProceedings of the 2016 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications10.1145/2983990.2984009(234-251)Online publication date: 19-Oct-2016
  • (2009)Polymorphic Fractional CapabilitiesProceedings of the 16th International Symposium on Static Analysis10.1007/978-3-642-03237-0_5(36-51)Online publication date: 12-Aug-2009
  • (2008)Inferring channel buffer bounds via linear programmingProceedings of the Theory and practice of software, 17th European conference on Programming languages and systems10.5555/1792878.1792907(284-298)Online publication date: 29-Mar-2008
  • (2008)A capability calculus for concurrency and determinismACM Transactions on Programming Languages and Systems10.1145/1387673.138767630:5(1-30)Online publication date: 4-Sep-2008
  • (2008)Witnessing side effectsACM Transactions on Programming Languages and Systems10.1145/1353445.135344930:3(1-42)Online publication date: 21-May-2008
  • (2007)Type-based verification of correspondence assertions for communication protocolsProceedings of the 5th Asian conference on Programming languages and systems10.5555/1784774.1784793(191-205)Online publication date: 29-Nov-2007
  • (2006)Modelling deterministic concurrent I/OACM SIGPLAN Notices10.1145/1160074.115982341:9(148-159)Online publication date: 16-Sep-2006
  • (2006)Modelling deterministic concurrent I/OProceedings of the eleventh ACM SIGPLAN international conference on Functional programming10.1145/1159803.1159823(148-159)Online publication date: 17-Sep-2006
  • (2006)A capability calculus for concurrency and determinismProceedings of the 17th international conference on Concurrency Theory10.1007/11817949_15(218-232)Online publication date: 27-Aug-2006
  • Show More Cited By

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media