← Fri, Nov 27 digest

The need for a formally verifiable mainstream programming language

read article ↗ hn thread ↗

Blaine Hansen argues that the rise of LLM-generated code makes mainstream formal verification essential, and proposes Magmide, a pragmatic verifiable language compiling to Wasm GC.

summary is enough The post offers a thought-provoking take on programming language design for the LLM era, though the core thesis and language pivot can be grasped quickly.

summary

Blaine Hansen argues that the rush of AI-generated code demands a cultural shift toward mainstream formal verification. Existing formal methods tools suffer from steep usability hurdles and low industry adoption, leaving a gap for languages that meet engineers where they are. To bridge this, he redesigns his project, Magmide, to target WebAssembly GC, employ liquid types and flow effects, and eventually integrate Lean as a proof layer. Commenters debate the practicality of formal verification and highlight similar efforts like Ada SPARK and Zena.

key points

  1. LLM code generation accelerates sloppy software practices, making universal formal verification a long-term necessity for civilizational stability.
  2. Magmide targets mainstream adoption by dropping complex assembly-level bases and custom proof assistants in favor of Wasm GC, SMT-powered liquid types, and flow effects.
  3. Commenters point out parallel real-world efforts in verifiable tooling, such as Ada SPARK, Verus, and community projects like Zena.

who should read it

Software engineers and language designers interested in formal verification, correctness, and the impact of LLMs on code quality.

discussion positive

consensus

Commenters generally agree that formal verification is becoming increasingly relevant due to LLM code volume, but debate whether a new language is needed or if tooling should be adapted to existing languages.

pushback

Some commenters argue that formal verification is fundamentally impractical or impossible for complex, real-world systems due to infinite state spaces and specification bottlenecks.

best comment by thomasahle ↗

Rather than migrating all code to some new program language, I've been building ProgLib: https://github.com/thomasnormal/proglib which is like "MathLib for Programming".

It allows you to import code from any programming language (So far, Python, C++, Rust, and SystemVerilog are partially supported,) and prove stuff about it in Lean.

You don't need a "verifiable programming language". All you need is formalized semantics for the programming language you are already using.

It offers a pragmatic alternative to building new verifiable languages by instead creating formalized semantics to prove existing multi-language code inside Lean.

Generated by an LLM from the article and thread. Check the sources before relying on it.