Towards Exact Semantic Equivalence of Erlang BEAM Constructs: Lessons from Advanced Emulation and DecompilationRemote
Erlang offers three practically relevant ways to run code: evaluating abstract syntax trees with erl_eval, interpreting compiled BEAM instructions with an emulator written in Erlang, and executing compiled BEAM on the BEAM VM itself. For most programs these execution modes agree, but exact equivalence breaks down at a few places that matter directly to decompilers, symbolic evaluators, refactoring tools, and alternative runtime implementations.
We study four such places in detail: binary pattern matching, fun values, selective receive, and exception metadata such as stack traces and line numbers. Our aim is not merely to catalogue awkward corner cases, but to separate what can already be reproduced exactly in plain Erlang from what still depends on BEAM-specific support or modest language/runtime extensions. Along the way we recover direct Erlang equivalents for non-trivial binary encodings, explain the evaluator's closure-adaptation problem at the arity limit, analyze why selective receive remains the most BEAM-specific construct, and identify the state that must be preserved if an Erlang-level emulator is to present compiled-BEAM behavior faithfully. The result is a more comprehensive boundary map of emulation completeness for Erlang.
| Slides (beamequiv_ew2026.pdf) | 292KiB |
Fri 28 AugDisplayed time zone: Eastern Time (US & Canada) change
11:00 - 12:30 | |||
11:00 30mTalk | A Mechanised Semantics of Erlang’s ReferencesRemote Erlang Dániel Lukács Eötvös Loránd University, Péter Bereczky Eötvös Loránd University, Dániel Horpácsi Eötvös Loránd University Link to publication DOI File Attached | ||
11:30 30mTalk | Set-Theoretic Type Checking of Beginner Erlang Code: A Retrospective StudyRemote Erlang Albert Schimpf University of Kaiserslautern-Landau, Stefan Wehr Offenburg University of Applied Sciences, Annette Bieniusa RPTU Kaiserslautern-Landau DOI | ||
12:00 30mTalk | Towards Exact Semantic Equivalence of Erlang BEAM Constructs: Lessons from Advanced Emulation and DecompilationRemote Erlang Link to publication DOI File Attached | ||