Set-theoretic Types for Erlang
Albert Schimpf, Stefan Wehr, Annette Bieniusa

TL;DR
This paper introduces set-theoretic types for Erlang, enabling static type checking in a language with dynamic typing and complex type features, through formalization and implementation.
Contribution
It adapts set-theoretic types to Erlang, allowing static verification of type signatures and demonstrating practical applicability with minimal code modifications.
Findings
Erlang code can be statically typechecked using set-theoretic types.
The proposed system formalizes core type constructs and compares favorably with existing typecheckers.
Implementation shows practical feasibility with minor code changes.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Model-Driven Software Engineering Techniques · Advanced Database Systems and Queries
