A New Statement for Selection and Exception Handling in Imperative Languages

Diverse selection statements -- if-then-else, switch and try-catch -- are commonly used in modern programming languages. To make things simple, we propose a unifying statement for selection. This statement is of the form seqor(G_1,...,G_n) where each $G_i$ is a statement. It has a a simple semantics: sequentially choose the first successful statement $G_i$ and then proceeds with executing $G_i$. Examples will be provided for this statement.

[1]  Gopalan Nadathur,et al.  Programming with Higher-Order Logic , 2012 .

[2]  Keehang Kwon,et al.  Improving Robustness via Disjunctive Statements in Imperative Programming , 2013, IEICE Trans. Inf. Syst..

[3]  Gilles Kahn,et al.  Natural Semantics , 1987, STACS.

[4]  Dale Miller,et al.  Logic programming in a fragment of intuitionistic linear logic , 1991, [1991] Proceedings Sixth Annual IEEE Symposium on Logic in Computer Science.

[5]  Gopalan Nadathur,et al.  Uniform Proofs as a Foundation for Logic Programming , 1991, Ann. Pure Appl. Log..

[6]  Giorgi Japaridze,et al.  Introduction to computability logic , 2003, Ann. Pure Appl. Log..

[7]  Giorgi Japaridze,et al.  Sequential operators in computability logic , 2007, Inf. Comput..