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

Asynchronous exceptions in Haskell

Published: 01 May 2001 Publication History
  • Get Citation Alerts
  • Abstract

    Asynchronous exceptions, such as timeouts are important for robust, modular programs, but are extremely difficult to program with — so much so that most programming languages either heavily restrict them or ban them altogether. We extend our earlier work, in which we added synchronous exceptions to Haskell, to support asynchronous exceptions too. Our design introduces scoped combinators for blocking and unblocking asynchronous interrupts, along with a somewhat surprising semantics for operations that can suspend. Uniquely, we also give a formal semantics for our system.

    References

    [1]
    J. Armstrong, R. Virding, C. Wikstrom, and M. Williams. Concurrent Programming in Erlang. Prentice Hall Europe, second edition, 1996.]]
    [2]
    K. Arnold and J. Gosling. The Java Programming Language. The Java Series. Addison-Wesley, second edition, 1998.]]
    [3]
    P. Barth, R. S. Nikhil, and Arvind. M-Structures: Extending a parallel, non-strict functional language with state. In R. J. M. Hughes, editor, Proc. FPCA'91, volume 523 of LNCS, pages 538-568. Springer-Verlag, 1991.]]
    [4]
    A. D. Birrell, J. V. Guttag, J. J. Horning, and R. Levin. Thread synchronization: A formal specification. In G. Nelson, editor, Systems Programming with Modula- 3, chapter 5, pages 119-129. Prentice Hall, Englewood Cliffs, NJ, 1991.]]
    [5]
    R. P. Gabriel and J. McCarthy. Queue-based multiprocessing Lisp. In Proc. LFP'84, pages 25-44, Aug. 1984.]]
    [6]
    T. Ito and M. Matsui. A parallel lisp language PaiLisp and its kernel specification. In Parallel Lisp: Languages and Systems, volume 441 of LNCS, pages 58-100, June 1989.]]
    [7]
    X. Leroy, D.Remy, J.Vouillon, and D. Doligez. The Objective Caml system documentation and user's manual (release 2.04). Technical report, INRIA, 1999. At http://caml.inria.fr/ocaml/htmlman/.]]
    [8]
    S. Marlow. Writing high-performance server applications in Haskell, case study: A Haskell web server. In Haskell Workshop, Montreal, Canada, September 2000.]]
    [9]
    R. Milner. The polyadic calculus: A tutorial. In F. L. Hamer, W. Brauer, and H. Schwichtenberg, editors, Logic and Algebra of Specification. Springer- Verlag, 1993.]]
    [10]
    R. Milner, M. Tofte, R. Harper, and D. MacQueen. The Definition of Standard ML(Revised). MIT Press, Cambridge, Massachusetts, 1997.]]
    [11]
    A. K. Moran, S. B. Lassen, and S. L. Peyton Jones. Imprecise exceptions, co-inductively. InProc. HOOTS'99, volume 26 of Electronic Notes in Theoretical Computer Science, Paris, Sept. 1999.]]
    [12]
    S. Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptio ns, and foreignlanguage calls in Haskell. In R. Steinbrueggen, editor, Engineering theories of software construction, Marktoberdorf Summer School 2000, NATO ASI Series. IOS Press, 2001.]]
    [13]
    S. Peyton Jones, R. Hughes, L. Augustsson, D. Barton, B. Boutel, W. Burton, J. Fasel, K. Hammond, R. Hinze, P. Hudak, T. Johnsson, M. Jones, J. Launchbury, E. Meijer, J. Peterson, A. Reid, C. Runciman, and P. Wadler. Report on the programming language Haskell 98. Technical report, Feb. 1998.]]
    [14]
    S. L. Peyton Jones, A. Gordon, and S. Finne. Concurrent Haskell. In Proc. POPL'96, pages 295-308, St. Petersburg, Florida, Jan. 1996. ACM Press.]]
    [15]
    S. L. Peyton Jones, A. Reid, T. Hoare, S. Marlow, and F. Henderson. A semantics for imprecise exceptions. In Proc. PLDI'99, volume 34(5) of ACM SIGPLAN Notices, pages 25-36. ACM Press, May 1999.]]
    [16]
    A. Reid. Handling exceptions in Haskell. Research Report YALEU/DCS/RR-1175, Yale University, Aug. 1998.]]
    [17]
    A. Reid. Putting the spine back in the Spineless Tagless G-Machine: An implementation of resumable blackholes. In Proc. IFL'98 (selected papers), volume 1595 of LNCS, pages 186-199. Springer-Verlag, 1999.]]
    [18]
    J. H. Reppy. Asynchronous signals in Standard ML. Technical Report TR90-1144, Cornell University, Computer Science Department, Aug. 1990.]]
    [19]
    J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, Oct. 1999.]]
    [20]
    Why are Thread.stop, Thread.suspend, Thread.resume, and Runtime.runFinalizers On Exit deprecated? In the Java 2 SDK Standard Edition Documentation. At http://java.sun.com/products/jdk/1.3/docs/guide/ misc/threadPrimitiveDeprecation.html.]]
    [21]
    K. Yi. Compile-time detection of uncaught exceptions in Standard ML programs. In Proc. SAS'94, volume 864 of LNCS, pages 238-254, Sept. 1994.]]

    Cited By

    View all
    • (2024)A framework for higher-order effects & handlersScience of Computer Programming10.1016/j.scico.2024.103086234:COnline publication date: 1-May-2024
    • (2022)Semantics of RxJSProceedings of the 9th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3563837.3568340(37-49)Online publication date: 29-Nov-2022
    • (2021)A concurrency model for JavaScript with cooperative cancellationProceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3486608.3486911(55-67)Online publication date: 17-Oct-2021
    • Show More Cited By

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 36, Issue 5
    May 2001
    330 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/381694
    Issue’s Table of Contents
    • cover image ACM Conferences
      PLDI '01: Proceedings of the ACM SIGPLAN 2001 conference on Programming language design and implementation
      June 2001
      331 pages
      ISBN:1581134142
      DOI:10.1145/378795
    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 May 2001
    Published in SIGPLAN Volume 36, Issue 5

    Check for updates

    Qualifiers

    • Article

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)3
    • Downloads (Last 6 weeks)1
    Reflects downloads up to 11 Aug 2024

    Other Metrics

    Citations

    Cited By

    View all
    • (2024)A framework for higher-order effects & handlersScience of Computer Programming10.1016/j.scico.2024.103086234:COnline publication date: 1-May-2024
    • (2022)Semantics of RxJSProceedings of the 9th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems10.1145/3563837.3568340(37-49)Online publication date: 29-Nov-2022
    • (2021)A concurrency model for JavaScript with cooperative cancellationProceedings of the 14th ACM SIGPLAN International Conference on Software Language Engineering10.1145/3486608.3486911(55-67)Online publication date: 17-Oct-2021
    • (2016)A Reflection on TypesA List of Successes That Can Change the World10.1007/978-3-319-30936-1_16(292-317)Online publication date: 25-Mar-2016
    • (2012)Who is Accountable for Asynchronous Exceptions?Proceedings of the 2012 19th Asia-Pacific Software Engineering Conference - Volume 0110.1109/APSEC.2012.48(462-471)Online publication date: 4-Dec-2012
    • (2011)Parallel and concurrent programming in HaskellProceedings of the 4th Summer School conference on Central European Functional Programming School10.1007/978-3-642-32096-5_7(339-401)Online publication date: 14-Jun-2011
    • (2010)Bulk synchronous parallel ML with exceptionsFuture Generation Computer Systems10.1016/j.future.2009.05.02126:3(486-490)Online publication date: 1-Mar-2010
    • (2009)Implementation of an Orchestration Language as a Haskell Domain Specific LanguageElectronic Notes in Theoretical Computer Science (ENTCS)10.1016/j.entcs.2009.10.024255(45-64)Online publication date: 1-Nov-2009
    • (2002)Semantics of value recursion for Monadic Input/OutputRAIRO - Theoretical Informatics and Applications10.1051/ita:200200836:2(155-180)Online publication date: 15-Dec-2002
    • (2023)An Exceptional Actor System (Functional Pearl)Proceedings of the 16th ACM SIGPLAN International Haskell Symposium10.1145/3609026.3609728(32-43)Online publication date: 30-Aug-2023
    • 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