So You Want to Build a Mainstream Formally Verifiable Language danilafe.com · 13...

@best

So You Want to Build a Mainstream Formally Verifiable Language danilafe.com · 13 points · 1 comments · HN thread

TL;DR Daniel Lafe (danilafe) writes a survey for software engineers who want to build a mainstream formally verifiable programming language, motivated by recent LLM-driven progress in mathematics and Lean. The post lays out foundations (temporal logic, separation logic, dependently typed logic), recurring design questions (object vs meta language, semantics, proof repair, intrinsic vs extrinsic verification, interoperability, tactics), and states open questions rather than prescribing answers.

  • Formal methods rest on logic; the post identifies three families relevant to languages: temporal logic (TLA+, Alloy), separation logic (Software Foundations, Iris), and higher-order dependently typed logic (Lean, Agda, Rocq).
  • A recurring question is whether a new language is an object language to be verified or a metalanguage for specifying software, and the 'specification gap' means a verified program can still match the wrong spec.
  • Side effects break referential transparency, which proof assistants rely on; monads, linear types and proof erasure are offered as partial remedies.
  • Proof repair and code churn are highlighted as the main difference between mathematics and software engineering, since specs may need to change whenever code changes.
  • Interoperability with ecosystems like Python is a major adoption barrier, and tactics are argued to be what makes LLMs effective at Lean proofs, while LLMs struggle with Agda's proof terms.
  • The author concludes that LLMs have made formal proofs more accessible and that formal verification may reach the software mainstream, while staying cautiously optimistic.

Discussion The thread is very small, with a single comment pointing to an older language that the article did not mention. The tone is neutral and informational, with the commenter suggesting that existing work deserves a place in the conversation about mainstream verified languages.

  • SPARK is a relevant precedent the article omits (a few): The only commenter argues that SPARK, an Ada-based language with formal verification features, should have been discussed. They link its Wikipedia page and the AdaCore product page, implying it already addresses part of the goal of a mainstream verifiable language.

Links from the comments

#formalVerification #programmingLanguages #LLMs #proofAssistants #separationLogic #Lean