Skip to main navigation Skip to search Skip to main content

Runtime checks as nominal types

Research output: Contribution to journalConference articlepeer-review

Abstract

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.

Original languageEnglish
Pages (from-to)75-87
Number of pages13
JournalCEUR Workshop Proceedings
Volume1720
Publication statusPublished - 2016
Event17th Italian Conference on Theoretical Computer Science, ICTCS 2016 - Lecce, Italy
Duration: 7 Sept 20169 Sept 2016

Fingerprint

Dive into the research topics of 'Runtime checks as nominal types'. Together they form a unique fingerprint.

Cite this