Abstract
We present an extension of System F with call-by-name exceptions. The type system is enriched with two syntactic constructs: a union type \(A {\rlap{{*}}\cup} \{\varepsilon\}\) for programs of type A whose execution may raise the exception ε at top level, and a corruption type A (ε) for programs that may raise the exception ε in any evaluation context (not necessarily at top level). We present the syntax and reduction rules of the system, as well as its typing and subtyping rules. We then study its properties, such as confluence. Finally, we construct a realizability model using orthogonality techniques, from which we deduce that well-typed programs are weakly normalizing and that the ones who have the type of natural numbers really compute a natural number, without raising exceptions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
David, R., Mounier, G.: An intuitionistic λ-calculus with exceptions. Journal of Functional Programming 15(01), 33–52 (2004)
The Coq development team. The Coq Proof Assistant Reference Manual v8.1 (2006)
Girard, J.Y.: Locus Solum: From the rules of logic to the logic of rules. Mathematical Structures in Computer Science 11(03), 301–506 (2001)
Guzman, J., Suarez, A.: An extended type system for exceptions. In: Proceedings of the ACM SIGPLAN Workshop on ML and its Applications, pp. 127–135 (1994)
Mitchell, J.C.: Polymorphic type inference and containment. Information and Computation 76(2-3), 211–249 (1988)
Moggi, E.: Notions of computation and monads. INF. COMPUT. 93(1), 55–92 (1991)
Pessaux, F., Leroy, X.: Type-based analysis of uncaught exceptions. In: Proceedings of the 26th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 276–290 (1999)
Peyton Jones, S., Reid, A., Henderson, F., Hoare, T., Marlow, S.: A semantics for imprecise exceptions. ACM SIGPLAN Notices 34(5), 25–36 (1999)
Spivey, M.: A functional theory of exceptions. Science of Computer Programming 14(1), 25–42 (1990)
Thielecke, H.: Comparing Control Constructs by Double-Barrelled CPS. Higher-Order and Symbolic Computation 15(2), 141–160 (2002)
Vouillon, J., Melliès, P.A.: Semantic types: a fresh look at the ideal model for types. In: Proceedings of the 31st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pp. 52–63 (2004)
Wadler, P.: How to Replace Failure by a List of Successes A method for exception handling, backtracking, and pattern matching. Functional Programming Languages and Computer Architecture (1985)
Wadler, P.: Comprehending monads. In: Proceedings of the 1990 ACM conference on LISP and functional programming, pp. 61–78 (1990)
Wadler, P., Thiemann, P.: The marriage of effects and monads. ACM Transactions on Computational Logic (TOCL) 4(1), 1–32 (2003)
Wells, J.B.: The undecidability of Mitchells subtyping relation. Technical Report 95-019, Boston University, Boston, Massachusetts (1995)
Wells, J.B.: Typability and type checking in System F are equivalent and undecidable. Annals of Pure and Applied Logic 98(1-3), 111–156 (1999)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Lebresne, S. (2008). A System F with Call-by-Name Exceptions. In: Aceto, L., Damgård, I., Goldberg, L.A., Halldórsson, M.M., Ingólfsdóttir, A., Walukiewicz, I. (eds) Automata, Languages and Programming. ICALP 2008. Lecture Notes in Computer Science, vol 5126. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70583-3_27
Download citation
DOI: https://doi.org/10.1007/978-3-540-70583-3_27
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-70582-6
Online ISBN: 978-3-540-70583-3
eBook Packages: Computer ScienceComputer Science (R0)