Lambda Language Uses Four Backends to Cross-Check Program Correctness
A project called 'lm' (lambda-language) compiles code through four independent backends — C, WebAssembly, ARM64, and a bytecode VM — using the same typed AST as input. Its correctness model relies on all four backends producing identical output, with the VM's different internal machinery serving as especially strong corroborating evidence. However, the project explicitly documents four known divergence points where backend agreement is not guaranteed: division by zero, out-of-range float-to-integer casts, out-of-bounds memory access, and edge-case floating-point printing. These divergences stem from each backend deferring to its target platform's native instruction behavior rather than enforcing a unified specification. The divergence list is treated as a design document, keeping the four-way comparison meaningful by ensuring known exceptions are small, well-defined, and confined to the edges of the language's guarantees.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in