Set-Theoretic Types for Erlang: Theory, Implementation, and Evaluation

Read full text
Authors: A Schimpf, Stefan Wehr, Annette Bieniusa
Cited by: 2

Abstract

Erlang's dynamic typing discipline can lead to runtime errors that persist even after process restarts. Some of these runtime errors could be prevented through static type checking. While Erlang provides a type specification language, the compiler does not enforce these types, thereby limiting their role to documentation purposes. Type checking Erlang code is challenging due to language features such as dynamic type tests, subtyping, equi-recursive types, polymorphism, intersection types in signatures, and untagged union types. This work presents a set-theoretic type system for Erlang which captures the core features of Erlang's existing type language. The formal type system guarantees type soundness, and ensures that type checking remains decidable. Additionally, an implementation of a type checker is provided, supporting all features of the Erlang type language and most term-level language constructs. A case study with modules from Erlang's standard library, an external project, and the type checker itself demonstrates its effectiveness in verifying real-world Erlang code.

Fields of Study & Subjects

Logic programming and type systems Software Testing and Debugging Techniques Model-Driven Software Engineering Techniques

Publication details

Journal / source
arXiv (Cornell University)
Publication date
23 March 2026
Document type
Preprint