TY - GEN
T1 - Linearity, control effects, and behavioral types
AU - Caires, Luís
AU - Pérez, Jorge A.
N1 - Thanks to the anonymous reviewers for useful remarks and suggestions. This work has been partially sponsored by FCT PEst/UID/CEC/04516/2013; by FCT CLAY PTDC/EEI-CTP/4293/2014; by EU COST Actions IC1201 (BETTY), IC1402 (ARVI), and IC1405 (Reversible Computation); and by CNRS PICS project 07313 (SuCCeSS).
PY - 2017
Y1 - 2017
N2 - Mainstream programming idioms intensively rely on state mutation, sharing, and concurrency. Designing type systems for handling and disciplining such idioms is challenging, due to long known conflicts between internal non-determinism, linearity, and control effects such as exceptions. In this paper, we present the first type system that accommodates non-deterministic and abortable behaviors in the setting of sessionbased concurrent programs. Remarkably, our type system builds on a Curry-Howard correspondence with (classical) linear logic conservatively extended with two dual modalities capturing an additive (co)monad, and provides a first example of a Curry-Howard interpretation of a realistic programming language with built-in internal non-determinism. Thanks to its deep logical foundations, our system elegantly addresses several well-known tensions between control, linearity, and non-determinism: globally, it enforces progress and fidelity; locally, it allows the specification of non-deterministic and abortable computations. The expressivity of our system is illustrated by several examples, including a typed encoding of a higher-order functional language with threads, session channels, non-determinism, and exceptions.
AB - Mainstream programming idioms intensively rely on state mutation, sharing, and concurrency. Designing type systems for handling and disciplining such idioms is challenging, due to long known conflicts between internal non-determinism, linearity, and control effects such as exceptions. In this paper, we present the first type system that accommodates non-deterministic and abortable behaviors in the setting of sessionbased concurrent programs. Remarkably, our type system builds on a Curry-Howard correspondence with (classical) linear logic conservatively extended with two dual modalities capturing an additive (co)monad, and provides a first example of a Curry-Howard interpretation of a realistic programming language with built-in internal non-determinism. Thanks to its deep logical foundations, our system elegantly addresses several well-known tensions between control, linearity, and non-determinism: globally, it enforces progress and fidelity; locally, it allows the specification of non-deterministic and abortable computations. The expressivity of our system is illustrated by several examples, including a typed encoding of a higher-order functional language with threads, session channels, non-determinism, and exceptions.
KW - Type System
KW - Linear Logic
KW - Reduction Rule
KW - Typing Rule
KW - Functional Language
UR - http://www.scopus.com/inward/record.url?scp=85018664695&partnerID=8YFLogxK
U2 - 10.1007/978-3-662-54434-1_9
DO - 10.1007/978-3-662-54434-1_9
M3 - Conference contribution
AN - SCOPUS:85018664695
SN - 978-3-662-54433-4
T3 - Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
SP - 229
EP - 259
BT - 26th European Symposium on Programming, ESOP 2017 Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017, Proceedings
A2 - Yang , H.
PB - Springer Verlag
CY - Berlin, Heidelberg
T2 - 26th European Symposium on Programming, ESOP 2017 held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2017
Y2 - 22 April 2017 through 29 April 2017
ER -