TY - JOUR
T1 - Runtime checks as nominal types
AU - Giannini, Paola
AU - Servetto, Marco
AU - Zucca, Elena
N1 - Publisher Copyright:
Copyright © by the paper's authors. Copying permitted for private and academic purposes.
PY - 2016
Y1 - 2016
N2 - We propose a language design where types can be enriched by tags corresponding to predicates written by the programmer. For instance, int&positive; is a type, where positive is a user-defined boolean function on integers. Expressions of type int&positive; are obtained by an explicit check construct, analogous to cast, e.g., (positive) 2. In this way, the fact that the value of an expression is guaranteed to succeed a runtime check is a static property which can be controlled by the type system. We formalize our proposal as an extension of the simply-typed lambda calculus, and prove, besides soundness, the fact that expressions of tagged types reduce to values which satisfy the corresponding predicates.
AB - We propose a language design where types can be enriched by tags corresponding to predicates written by the programmer. For instance, int&positive; is a type, where positive is a user-defined boolean function on integers. Expressions of type int&positive; are obtained by an explicit check construct, analogous to cast, e.g., (positive) 2. In this way, the fact that the value of an expression is guaranteed to succeed a runtime check is a static property which can be controlled by the type system. We formalize our proposal as an extension of the simply-typed lambda calculus, and prove, besides soundness, the fact that expressions of tagged types reduce to values which satisfy the corresponding predicates.
UR - http://www.scopus.com/inward/record.url?scp=85007566019&partnerID=8YFLogxK
M3 - Conference article
AN - SCOPUS:85007566019
SN - 1613-0073
VL - 1720
SP - 75
EP - 87
JO - CEUR Workshop Proceedings
JF - CEUR Workshop Proceedings
T2 - 17th Italian Conference on Theoretical Computer Science, ICTCS 2016
Y2 - 7 September 2016 through 9 September 2016
ER -