A New Formulation of the Catch/Throw Mechanism

The catch/throw mechanism in Common Lisp gives a simple control structure for non-local exits. Nakano[7, 9] and Sato[13] proposed intuitionistic calculi with inference rules which give logical interpretations of the catch/throw-constructs. Although the calculi are theoretically well-founded, we cannot use the catch/throw mechanism for handling run-time errors in a meaningful way, because of the side-condition of the implication-introduction rule (the formulation rule of the -abstract). This de ciency is critical if we use higher-order functions with the catch/throw mechanism. In this paper, we propose a new formulation of catch/throw calculi, which has no side-condition on the implication-introduction rule. By restricting the types of thrown terms to data types (non-functional types) instead, we obtain a strongly normalizing calculus for the catch/throw mechanism where we can write higher-order functions which handles run-time errors.

[1]  Chetan R. Murthy An evaluation semantics for classical proofs , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[2]  Hiroshi Nakano A Constructive Logic Behind the Catch and Throw Mechanism , 1994, Ann. Pure Appl. Log..

[3]  Hiroshi Nakano A constructive formalization of the catch and throw mechanism , 1992, [1992] Proceedings of the Seventh Annual IEEE Symposium on Logic in Computer Science.

[4]  Michel Parigot,et al.  Lambda-Mu-Calculus: An Algorithmic Interpretation of Classical Natural Deduction , 1992, LPAR.

[5]  J. Girard,et al.  Proofs and types , 1989 .

[6]  Philippe de Groote,et al.  A Simple Calculus of Exception Handling , 1995, TLCA.

[7]  Hiroshi Nakano The Non-deterministic Catch and Throw Mechanism and Its Subject Reduction Property , 1994, Logic, Language and Computation.

[8]  Timothy G. Griffin,et al.  A formulae-as-type notion of control , 1989, POPL '90.