Asynchronous Exceptions as an Effect

  • William L. Harrison
  • Gerard Allwein
  • Andy Gill
  • Adam Procter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5133)


Asynchronous interrupts abound in computing systems, yet they remain a thorny concept for both programming and verification practice. The ubiquity of interrupts underscores the importance of developing programming models to aid the development and verification of interrupt-driven programs. The research reported here recognizes asynchronous interrupts as a computational effect and encapsulates them as a building block in modular monadic semantics. The resulting modular semantic model can serve as both a guide for functional programming with interrupts and as a formal basis for reasoning about interrupt-driven computation as well.


Functional Programming Natural Semantic Interrupt Service Routine Left Unit Asynchronous Behavior 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    de Bakker, J.W.: Mathematical Theory of Program Correctness. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1980)zbMATHGoogle Scholar
  2. 2.
    Chatterjee, K., Ma, D., Majumdar, R., Zhao, T., Henzinger, T.A., Palsberg, J.: Stack size analysis for interrupt-driven programs. Inf. Comput. 194(2), 144–174 (2004)zbMATHCrossRefMathSciNetGoogle Scholar
  3. 3.
    Claessen, K., Hughes, J.: QuickCheck: A lightweight tool for random testing of Haskell programs. In: Proc. of International Conference on Functional Programming (ICFP), ACM SIGPLAN (2000)Google Scholar
  4. 4.
    Dijkstra, E.W.: My recollections of operating system design. SIGOPS Oper. Syst. Rev. 39(2), 4–40 (2005)CrossRefGoogle Scholar
  5. 5.
    Dowse, M., Butterfield, A.: Modelling deterministic concurrent I/O. In: ICFP 2006: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming, pp. 148–159. ACM, New York (2006)CrossRefGoogle Scholar
  6. 6.
    Espinosa, D.: Semantic Lego. PhD thesis, Columbia University (1995)Google Scholar
  7. 7.
    Hallgren, T., Jones, M.P., Leslie, R., Tolmach, A.: A principled approach to operating system construction in Haskell. In: Proceedings of the Tenth ACM SIGPLAN International Conference on Functional Programming (ICFP05), pp. 116–128. ACM Press, New York (2005)CrossRefGoogle Scholar
  8. 8.
    Harrison, W.: The Asynchronous Exceptions As An Effect Codebase,
  9. 9.
    Harrison, W.: The Essence of Multitasking. In: Johnson, M., Vene, V. (eds.) AMAST 2006. LNCS, vol. 4019, pp. 158–172. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Harrison, W., Hook, J.: Achieving information flow security through monadic control of effects. Invited submission to: Journal of Computer Security, 46 (accepted, 2008)Google Scholar
  11. 11.
    Harrison, W., Kamin, S.: Metacomputation-based compiler architecture. In: Backhouse, R., Oliveira, J.N. (eds.) MPC 2000. LNCS, vol. 1837, pp. 213–229. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  12. 12.
    Hughes, J., O’Donnell, J.: Nondeterministic functional programming with sets. In: Proceedings of the 1990 Banf Conference on Higher Order Reasoning (1990)Google Scholar
  13. 13.
    Hutton, G., Wright, J.: What is the Meaning of These Constant Interruptions? Journal of Functional Programming 17(6), 777–792 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  14. 14.
    Li, P., Zdancewic, S.: Combining events and threads for scalable network services implementation and evaluation of monadic, application-level concurrency primitives. In: PLDI 2007: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, pp. 189–199. ACM Press, New York (2007)CrossRefGoogle Scholar
  15. 15.
    Liang, S.: Modular Monadic Semantics and Compilation. PhD thesis, Yale University (1998)Google Scholar
  16. 16.
    Liang, S., Hudak, P., Jones, M.: Monad transformers and modular interpreters. In: Proceedings of the 22nd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 333–343. ACM Press, New York (1995)CrossRefGoogle Scholar
  17. 17.
    Marlow, S., Peyton Jones, S., Moran, A., Reppy, J.: Asynchronous exceptions in Haskell. In: Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), pp. 274–285 (2001)Google Scholar
  18. 18.
    Moggi, E.: An Abstract View of Programming Languages. Technical Report ECS-LFCS-90-113, Department of Computer Science, Edinburgh University (1990)Google Scholar
  19. 19.
    Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991)zbMATHCrossRefMathSciNetGoogle Scholar
  20. 20.
    Morris, J.M., Tyrrell, M.: Terms with unbounded demonic and angelic nondeterminacy. Sci. Comput. Program. 65(2), 159–172 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  21. 21.
    Palsberg, J., Ma, D.: A Typed Interrupt Calculus. In: Damm, W., Olderog, E.-R. (eds.) FTRTFT 2002. LNCS, vol. 2469, pp. 291–310. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  22. 22.
    Papaspyrou, N.S.: A Resumption Monad Transformer and its Applications in the Semantics of Concurrency. In: Proceedings of the 3rd Panhellenic Logic Symposium (2001); Expanded version available as a tech. report from the author by requestGoogle Scholar
  23. 23.
    Peyton Jones, S.: Tackling the Awkward Squad: Monadic Input/Output, Concurrency, Exceptions, and Foreign-language Calls in Haskell. In: Engineering Theories of Software Construction. NATO Science Series, vol. III 180, pp. 47–96. IOS Press, Amsterdam (2000)Google Scholar
  24. 24.
    Peyton Jones, S., Reid, A., Hoare, C.A.R., Marlow, S., Henderson, F.: A semantics for imprecise exceptions. In: Proceedings of the ACM SIGPLAN 1999 Conference on Programming Language Design and Implementation, pp. 25–36 (May 1999)Google Scholar
  25. 25.
    Peyton Jones, S., Wadler, P.: Imperative functional programming. In: Proceedings of the 20th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), pp. 71–84. ACM Press, New York (1993)CrossRefGoogle Scholar
  26. 26.
    Plotkin, G.D.: A Powerdomain Construction. SIAM Journal of Computation 5(3), 452–487 (1976)zbMATHCrossRefMathSciNetGoogle Scholar
  27. 27.
    Schmidt, D.A.: Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, Boston (1986)Google Scholar
  28. 28.
    Smyth, M.B.: Powerdomains. Journal of Computer and System Sciences 16(1), 23–36 (1978)zbMATHCrossRefMathSciNetGoogle Scholar
  29. 29.
    Swierstra, W., Altenkirch, T.: Beauty in the beast. In: Haskell 2007: Proceedings of the ACM SIGPLAN workshop on Haskell workshop, pp. 25–36. ACM, New York (2007)CrossRefGoogle Scholar
  30. 30.
    Tolmach, A., Antoy, S.: A monadic semantics for core curry. In: Proceedings of the 12th International Workshop on Functional and (Constraint) Logic Programming (June 2003)Google Scholar
  31. 31.
    Wadler, P.: The essence of functional programming. In: Proceedings of the 19th Symposium on Principles of Programming Languages (POPL), pp. 1–14. ACM Press, New York (1992)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2008

Authors and Affiliations

  • William L. Harrison
    • 1
  • Gerard Allwein
    • 2
  • Andy Gill
    • 3
  • Adam Procter
    • 1
  1. 1.Dept. of Computer ScienceUniversity of MissouriColumbiaU.S.A
  2. 2.Naval Research LaboratoryWashingtonU.S.A
  3. 3.Galois, Inc.BeavertonU.S.A

Personalised recommendations