Exception Handling and Classical Logic

被引:1
作者
van Bakel, Steffen [1 ]
机构
[1] Imperial Coll London, Dept Comp, London, England
来源
PROCEEDINGS OF THE 21ST INTERNATIONAL SYMPOSIUM ON PRINCIPLES AND PRACTICE OF DECLARATIVE PROGRAMMING (PPDP 2019) | 2019年
关键词
exception handling; abort; classical logic; lambda calculus;
D O I
10.1145/3354166.3354186
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present lambda(try), an extension of the lambda-calculus with named exception handling, via try, throw and catch, and present a basic notion of type assignment expressing recoverable exception handling and show that it is sound. We define an interpretation for lambda(try) to Parigot's lambda mu-calculus, and show that reduction (both lazy and call by value) is preserved by the interpretation. We will show that also types assignable in the basic system are preserved by the interpretation. We will then add a notion of total failure through halt that escapes applicative contexts without being caught by a handler, and show that we can interpret this in lambda mu when adding top as destination. We will argue that introducing handlers for halt will break the relation with lambda mu. We will conclude the paper by showing that it is possible to add handlers for program failure by introducing panic and dedicated handlers to lambda(try). We will need to extend the language with a conditional construct that is typed in a non-traditional way, that cannot be expressed in lambda mu or logic. This will allow both recoverable exceptions and total failure, dealt with by handlers; we will show a non-standard soundness result for this system.
引用
收藏
页数:14
相关论文
共 20 条
[1]   A proof-theoretic foundation of abortive continuations [J].
University of Oregon, Eugene, United States ;
不详 ;
不详 .
High Order Symbol Comput, 2007, 4 (403-429)
[2]  
Barendregt H.P., 1984, The Lambda Calculus - Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics, V103
[3]  
Bierman G.M., 1998, TECHNICAL REPORT
[4]  
Bierman GM, 1998, LECT NOTES COMPUT SC, V1450, P336, DOI 10.1007/BFb0055783
[5]  
CROLARD T, 1999, J FUNCTIONAL PROGRAM, V9, P625
[6]   Functionality in combinatory logic [J].
Curry, HB .
PROCEEDINGS OF THE NATIONAL ACADEMY OF SCIENCES OF THE UNITED STATES OF AMERICA, 1934, 20 :584-590
[7]  
de Groote P., 1995, Typed Lambda Calculi and Applications. Second International Conference on Typed Lambda Calculi and Applications, TLCA '95. Proceedings, P201, DOI 10.1007/BFb0014054
[8]  
de Groote P., 1994, LECT NOTES COMPUTER, V822, P31, DOI DOI 10.1007/3-540-58216-9_27
[9]  
Drossopoulou S., 2000, JAVA EXCEPTIONS THRO
[10]   THE REVISED REPORT ON THE SYNTACTIC THEORIES OF SEQUENTIAL CONTROL AND STATE [J].
FELLEISEN, M ;
HIEB, R .
THEORETICAL COMPUTER SCIENCE, 1992, 103 (02) :235-271