Single-Source Models for Compile-Time Verification
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Pierre describes single-source models, a pattern in which a Nim macro keeps the formal specification (TLA+ for concurrency, Herbie FPCore for floating point) and the production code in one declaration, and runs TLC, TLAPS, GenMC and Herbie during compilation. Applied to the Weave parallel runtime, he reports six concurrency bugs, one in Nim's atomics, ten math-library errors, and runtime performance competitive with oneTBB and OpenMP. The figures are self-reported from one author's workstation and benchmarks, and not independently checked. The approach needs strong compile-time metaprogramming.