So You Want to Build a Mainstream Formally Verifiable Language
Danila Fedorin published an architectural analysis evaluating the logic families and semantic challenges required to build mainstream verifiable languages.
By Dillip Chowdary • Nov 29, 2026 • Source: danilafe.com

At a glance
- Author
- Danila Fedorin
- Publication date
- November 28, 2026
- Domain
- Formal verification languages
- Logic families
- Temporal, separation, dependently typed
- Verified tools
- TLA+, Alloy, Lean, Agda, Iris
In this post
Danila Fedorin published an architectural analysis outlining the theoretical foundations and design trade-offs required to construct a mainstream formally verifiable programming language, according to danilafe.com's report. The analysis arrives as artificial intelligence models from OpenAI and Anthropic accelerate automated mathematical discoveries, prompting software researchers to evaluate whether program synthesis and formal software verification can achieve similar automation breakthroughs. Fedorin synthesizes years of practical experience with formal systems into a structural guide aimed at software engineers seeking to introduce mathematical rigor into everyday application development.
This guide examines the core logical systems, semantic boundaries, and architectural stratifications necessary to design languages whose execution guarantees can be mechanically verified. It targets systems architects, compiler engineers, and programming language theorists who need to bridge the gap between traditional imperative engineering and rigorous proof assistants.
01Foundations across three logic families
Formal methods require an unambiguous mathematical foundation to translate informal software processes into mechanically checkable theorems. Three primary families of logic serve as candidates for language designers attempting to balance expressiveness with verification overhead. Each family frames program correctness around a different conceptual model of state and execution.
| Logic family | Primary tools | Core domain |
|---|---|---|
| Temporal logic | TLA+, Alloy | State machines, distributed invariants |
| Separation logic | Software Foundations, Iris Project | Imperative heaps, pointer aliasing, concurrency |
| Higher-order dependently typed logic | Lean, Agda | Functional theorem proving, constructive mathematics |
Temporal logic excels at reasoning about state transitions and execution orders across complex asynchronous architectures. Separation logic provides the machinery needed to track mutable memory references and resource ownership without full-system aliasing proofs. Higher-order dependently typed logic collapses the boundary between programs and mathematical proofs, allowing types to depend directly on values.
02Fidelity gaps between specifications and programs
Software formal verification proves strictly that a given program satisfies a formal mathematical specification. It cannot prove that the specification itself accurately captures the external requirements or intent of human users. If an engineer writes a specification with missing constraints or invalid assumptions, a verified program will still exhibit undesired behavior in practice.
The gap between intent and formal specification mirrors the validation challenges seen in recent machine-assisted mathematical proofs, where reviewers must evaluate whether an enormous proof verifies the intended claim. In software engineering, specification fidelity is rooted in interactions with the messy physical world, external networks, and human interfaces. This fundamental reliance on external reality prevents the specification fidelity problem from being resolved purely through programming language design.
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
03Stratification of metalanguages and object languages
Engineers building verifiable toolchains must explicitly decide whether to construct an object language, a metalanguage, or a unified environment that merges both layers. An object language is the target language being analyzed or executed, such as C or another imperative codebase. In contrast, a metalanguage is the analytical formal system used to describe, model, and prove properties about the object language.
Tools like TLA+ and Alloy serve strictly as metalanguages, modeling operational behavior through external logical descriptions without executing as production software runtimes. Languages such as C operate purely as object languages, possessing imperative semantics like short-circuiting and bitwise operations that remain poorly suited for direct mathematical reasoning. Dependently typed proof environments such as Lean demonstrate an alternative approach by unifying the metalanguage and object language into a single system, removing the need for a separate modeling layer.
04Undefined behavior and ill-defined semantics
Mainstream imperative languages present significant barriers to verification due to complex, expanding, or mathematically undefined operational semantics. In C and C++, compilers exploit undefined behavior to optimize execution paths, which can alter program meaning or elide non-terminating loops. For instance, an unproven loop calculating the Collatz conjecture can be omitted entirely by optimizing C++ compilers to return an arbitrary constant.
Mainstream specifications like the ISO C++ standard expand with every revision while remaining informal natural-language documents rather than rigorous mathematical specifications. Dynamic scripting environments such as Python, Ruby, JavaScript, and TypeScript introduce varying type-coercion rules, while complex systems like Rust rely on intricate borrow-checker semantics that resist simple formalization. A formally verifiable language must eliminate semantic ambiguity at the compiler level to ensure that every valid syntactic construct yields a deterministic, mathematically provable execution model.
Note: Formal verification toolchains cannot bridge errors in human intent or environmental assumptions, as mathematical proofs verify only adherence to written specifications rather than real-world fitness.
05Architectural choices for verification platforms
Language creators must establish whether their new system will compile directly to machine code, output intermediate representations, or function as an interactive theorem prover. When a language attempts to balance production utility with formal proofs, its authors must formalize its evaluation rules down to the smallest primitive operations. Imperative features like mutable pointers and raw memory layout require separation logic frameworks like Iris to prove memory safety.
Interactive proof platforms like Lean and Agda illustrate that unification of code and proof simplifies reasoning, yet requires developers to embrace constructive type theory. Balancing these trade-offs dictates whether a system gains adoption among enterprise software developers or remains confined to academic research. The success of future verifiable languages depends on minimizing specification verbosity while retaining complete semantic determinism across hardware platforms.
Frequently asked questions
What are the three main logic families used in formal language verification?
The three families are temporal logic (used in TLA+ and Alloy), separation logic (used in Iris and Software Foundations), and higher-order dependently typed logic (used in Lean and Agda).
What is the specification gap in formally verified software?
The specification gap occurs because formal verification only proves that code matches its written specification, not that the specification accurately reflects real-world human requirements or intent.
How does undefined behavior in languages like C complicate formal verification?
Undefined and unspecified behaviors leave execution semantics ambiguous, allowing optimizing compilers to alter program behavior or elide unproven loops like the Collatz conjecture.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement