Typing the wild in Erlang

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

Developing a static type system suitable for Erlang has been of ongoing interest for almost two decades now. The challenge with retrofitting a static type system onto a dynamically typed language, such as Erlang, is the loss of flexibility in programming offered by the language. In light of this, many attempts to type Erlang trade sound type checking for the ability to retain flexibility. Hence, simple type errors which would be caught by the type checker of a statically typed language are easily missed in these developments. This has us wishing for a way to avoid such errors in Erlang programs. In this paper, we develop a static type system for Erlang which strives to remain sound without being too restrictive. Our type system is based on Hindley-Milner type inference, however it - -unlike contemporary implementations of Hindley-Milner - -is flexible enough to allow overloading of data constructors, branches of different types etc. Further, to allow Erlang's dynamic type behaviour, we employ a program specialization technique called partial evaluation. Partial evaluation simplifies programs prior to type checking, and hence enables the type system to type such behaviour under certain restricted circumstances.
Original languageEnglish
Title of host publicationErlang 2018
Subtitle of host publicationProceedings of the 17th ACM SIGPLAN International Workshop on Erlang
EditorsNatalia Chechina, Adrian Francalanza
PublisherACM
Pages49-60
Number of pages12
ISBN (Electronic)9781450358248
DOIs
Publication statusPublished - 29 Sept 2018
Event17th ACM SIGPLAN International Workshop on Erlang - St. Louis, United States
Duration: 29 Sept 201829 Sept 2018

Workshop

Workshop17th ACM SIGPLAN International Workshop on Erlang
Country/TerritoryUnited States
CitySt. Louis
Period29/09/1829/09/18

Keywords / Materials (for Non-textual outputs)

  • Erlang
  • partial evaluation
  • type inference

Fingerprint

Dive into the research topics of 'Typing the wild in Erlang'. Together they form a unique fingerprint.

Cite this