Pia
Pia is a programming language whose compiler proves your code correct before it runs. Every integer overflow, array index and contract is a proof obligation, discharged at compile time. When a proof fails, you get the inputs that break your code. When every proof succeeds, the checks are gone from the machine code.
It is open source under the Apache License 2.0, built in the open by one person, and still early and experimental.
01
Z3 and interval analysis
Most goals are settled automatically, by interval analysis and the Z3 solver, with a counterexample when a proof fails. No proof writing for overflow, bounds and contracts.
02
Lean for the hard facts
When Z3 can't decide a fact, such as an inductive lemma or a piece of mathematics, you can prove it in Lean 4 instead. Lean checks the proof, and the compiler's certificate records that it did.
03
A verified REPL, for people and agents
pia repl proves each cell before it runs. pia mcp gives the same session to an agent such as Claude, one proved cell at a time.
Sponsor Pia
Sponsorship is the most useful way to help. It pays for the time that goes into the compiler, the proofs, the standard library and the documentation, and it keeps all of it open.
You can also read the documentation, look through the source, or send a contribution. Contributions are welcome, including ones written with AI tools.
Project work and consulting
If your team could use verified code, I take on a limited number of engagements around Pia alongside my full-time role:
- Proving something that matters: working out what a critical piece of your code should guarantee, and proving it.
- Evaluating Pia: whether it fits a problem you have, and what it would take to adopt it.
- Features and support: work on Pia itself that your team needs, kept in the open source project.
Tell me what you're working on using the form below. If we're a good fit, we'll agree the scope, and I'll set you up as a client and invoice you directly.