The Fixpoint No Test Suite Can Check
Code: Megapixel99/lambda-language lm is a small low-level language with four independent backends: C, WebAssembly, ARM64, and bytecode for a VM. Its test suite is built around the fact that there are four of them. Every program runs through all four and the outputs are compared byte for byte against each other and against a recorded expectation, so a backend that gets something subtly wrong…
The fixpoint test suite for the LM language, which supports C, WebAssembly, ARM64, and bytecode VM backends, consists of 94 tests that compare outputs byte for byte across all backends. It can detect subtle backend differences but cannot catch a compiler that quietly disagrees with its own output. The most notable issue is that the compiler written in LM does not compile itself correctly, passing all tests while producing incorrect results.
Other tests include ARM64 losing a register in memmove and the compiler driver truncating large output. The fixpoint test goes beyond a regular test suite by checking if a compiler, when run on its own source, produces identical output. This self-hosting approach proves the compiler's consistency but does not guarantee its correctness.
The fixpoint test reveals limitations in the language, such as a bug where a growable arena and stored address mix, causing incorrect storage behavior.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.