ICFP/SPLASH 2025 (series) / Erlang 2025 (series) / Erlang 2025 /
Deriving an Erlang Interpreter from a Mechanised Formal Semantics of Core Erlang
We present an interpreter for Erlang in Haskell, derived from a formal semantics for Core Erlang mechanised in Coq. The interpreter function is derived from the Coq inductive definitions that make up the semantics by extracting Haskell code from Gallina functions provably equivalent to the inductive definitions, and optimising the result. The semantics is inherently non-deterministic, and it is made deterministic by introducing a scheduler function; we also present a computation graph that shows all the non-deterministic choices that arise during computation. The paper concludes with an evaluation of the work, including preliminary performance data.