MEP-46 research notes
These twelve notes are the deep research that fed MEP 46 (Mochi-to-Erlang/BEAM transpiler). They are informative; the MEP body, once landed, will be normative. Each note is self-contained and can be read independently. Cross-references use [[note-slug]] markers.
| # | Title | Topic |
|---|---|---|
| 01 | Language surface | Mochi features mapped onto BEAM lowering obligations |
| 02 | Design philosophy | Why BEAM, why Core Erlang, why OTP wholesale |
| 03 | Prior-art transpilers | Elixir, Gleam, LFE, Hamler, Alpaca, Clojerl, AtomVM, OTP internals |
| 04 | Runtime building blocks | gen_server, supervisor, pg, ETS, gun, json, telemetry |
| 05 | Codegen design | Core Erlang via cerl, compile:forms/2 with from_core |
| 06 | Type-system lowering | Type-by-type mapping to BEAM terms |
| 07 | Erlang target and portability | OTP 27/28 matrix, arch matrix, AtomVM profile |
| 08 | Dataset pipeline lowering | Query DSL to comprehensions/foldl, Datalog to ETS + semi-naive |
| 09 | Agents and streams on OTP | agents to gen_server, streams to pg, async to monitored spawn |
| 10 | Build system | rebar3, mix, escript, OTP release, AtomVM packaging |
| 11 | Testing and CI gates | Per-phase gates, Dialyzer cleanliness, OTP version matrix |
| 12 | Risks and alternatives | Risk register, alternatives rejected |