Translation Style Semantics and Type System of Control Capturing

Many programming languages provides non-local exit. In C language, it is implemented by setjump and longjump functions in its standard library. In Java, a try-catch-finally statement is equipped as non-local exit with control capturing. The try-catch-finally mechanism can be categorized into two parts: global jump and control capturing. The non-local jump has been studied well for a long time by many researchers. On the other hand, control capturing has not yet been researched well enough. In this paper, we propose a lambda calculus with non-local jump and control capturing and its operational semantics based on small-step transition. We provide continuation-passing style translation of the calculus into the usual lambda calculus. The continuation-passing style translation is known as a translation style semantics of a control structure such as a non-local jump or first-class continuation. We extend the continuation passing style translation in order to formalize the control capturing in the framework of a functional programming language paradigm. We develop a type system for the calculus with control capturing and show conformity of the typed version of the CPS translation with the type system of the calculus.

[1]  Guy L. Steele,et al.  Common LISP: the language, 2nd Edition , 1990 .

[2]  Jr. Guy L. Steele,et al.  Common LISP: the language (2nd ed.) , 1990 .

[3]  David K. Gifford,et al.  Polymorphic effect systems , 1988, POPL '88.

[4]  Harold Abelson,et al.  Revised5 report on the algorithmic language scheme , 1998, SIGP.

[5]  Shin-ya Nishizaki,et al.  A Parallel Abstract Machine for the RPC Calculus , 2011 .

[6]  Matthias Felleisen,et al.  A Syntactic Theory of Sequential Control , 1987, Theor. Comput. Sci..

[7]  Shin-ya Nishizaki Programs with Continuations and Linear Logic , 1991, TACS.

[8]  Pierre Jouvelot,et al.  Reasoning about continuations with control effects , 1989, PLDI '89.

[9]  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.

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

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

[12]  Gordon D. Plotkin,et al.  Call-by-Name, Call-by-Value and the lambda-Calculus , 1975, Theor. Comput. Sci..

[13]  Shin-ya Nishizaki,et al.  A simple abstract machine for functional first-class continuations , 2010, 2010 10th International Symposium on Communications and Information Technologies.

[14]  R. Kent Dybvig,et al.  Revised6 Report on the Algorithmic Language Scheme , 2009 .