Saved in:
Bibliographic Details
Main Authors: Schimpf, Albert, Wehr, Stefan, Bieniusa, Annette
Format: Preprint
Published: 2023
Subjects:
Online Access:https://arxiv.org/abs/2302.12783
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866909714461229056
author Schimpf, Albert
Wehr, Stefan
Bieniusa, Annette
author_facet Schimpf, Albert
Wehr, Stefan
Bieniusa, Annette
contents Erlang is a functional programming language with dynamic typing. The language offers great flexibility for destructing values through pattern matching and dynamic type tests. Erlang also comes with a type language supporting parametric polymorphism, equi-recursive types, as well as union and a limited form of intersection types. However, type signatures only serve as documentation, there is no check that a function body conforms to its signature. Set-theoretic types and semantic subtyping fit Erlang's feature set very well. They allow expressing nearly all constructs of its type language and provide means for statically checking type signatures. This article brings set-theoretic types to Erlang and demonstrates how existing Erlang code can be statically typechecked without or with only minor modifications to the code. Further, the article formalizes the main ingredients of the type system in a small core calculus, reports on an implementation of the system, and compares it with other static typecheckers for Erlang.
format Preprint
id arxiv_https___arxiv_org_abs_2302_12783
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Set-theoretic Types for Erlang
Schimpf, Albert
Wehr, Stefan
Bieniusa, Annette
Programming Languages
Erlang is a functional programming language with dynamic typing. The language offers great flexibility for destructing values through pattern matching and dynamic type tests. Erlang also comes with a type language supporting parametric polymorphism, equi-recursive types, as well as union and a limited form of intersection types. However, type signatures only serve as documentation, there is no check that a function body conforms to its signature. Set-theoretic types and semantic subtyping fit Erlang's feature set very well. They allow expressing nearly all constructs of its type language and provide means for statically checking type signatures. This article brings set-theoretic types to Erlang and demonstrates how existing Erlang code can be statically typechecked without or with only minor modifications to the code. Further, the article formalizes the main ingredients of the type system in a small core calculus, reports on an implementation of the system, and compares it with other static typecheckers for Erlang.
title Set-theoretic Types for Erlang
topic Programming Languages
url https://arxiv.org/abs/2302.12783