Why3
why3.org
- Free plan
- Windows
- Linux
- Web
- API
- Self-hosted
What Why3 is
Why3 is a free, open-source platform for deductive program verification. It uses WhyML to describe programs and specifications, then works with external automated or interactive theorem provers to discharge verification conditions. WhyML supports preconditions, postconditions, assertions, and loop invariants, and comes with logical theories and data structures such as arrays, queues, and hash tables. External provers need to be installed and configured separately. Why3 can be extended to support other provers and used as a software library through its OCaml API. WhyML programs can be extracted automatically into correct-by-construction OCaml programs, and the language serves as an intermediate language for verifying C, Java, Rust, and Ada programs. TryWhy3 provides a JavaScript version that runs in a browser. The graphical interface saves proof attempts and transformations in an XML file and can replay obsolete proof attempts. Why3 is available under GNU LGPL 2.1 with a special linking exception. Loop invariant inference is still a work in progress, with many features described as very limited.
Who it suits
It suits developers and verification practitioners who work with WhyML or use it to verify C, Java, Rust, or Ada programs. Users should be prepared to install and configure their chosen external theorem provers.
Good to know, and what to watch
- Supports contracts, assertions, and loop invariants.
- Can extract WhyML programs into OCaml.
- Browser version is available through TryWhy3.
- Proof attempts can be saved and replayed.
- External provers must be installed and configured separately.
- Loop invariant inference remains a work in progress.
- Many loop invariant features are still very limited.
Plans
Every plan and priceWhy3
Open source
Getting started
- Open the Why3 website or TryWhy3 in a browser
- Install Why3 through Opam, Docker, source compilation, or a listed Linux package
- Install the external theorem provers you plan to use
- Run `why3 config --detect` after installing a new prover
- Use the graphical interface or editor integrations for proof work
Limits to check
Loop invariant inference is described as work in progress, with many features still very limited. External theorem provers must be installed and configured separately.
The Club's review
Why3 is a deductive verification platform built around WhyML and external theorem provers. It is best suited to developers and verification teams comfortable working with formal specifications and managing proof tools. Its flexible prover workflow is a strong foundation, but limited loop-invariant inference makes it a poor fit for anyone expecting verification to run largely on autopilot.
Overview
Why3 turns program specifications into verification conditions that external automated or interactive theorem provers can attempt to discharge. WhyML expresses requirements with preconditions, postconditions, assertions, and loop invariants, while a standard library of logical theories and structures such as arrays, queues, and hash tables provides building blocks for modeling programs.
The separation between Why3 and its provers gives teams room to choose or extend their proof backends. It also adds operational work: provers must be installed separately and configured, and after installing one, users rerun why3 config --detect. This suits teams able to maintain a verification environment, less so developers looking for a ready-to-go single package.
WhyML can act as an intermediate language for verifying C, Java, Rust, and Ada programs. Programs written in WhyML can also be extracted automatically into correct-by-construction OCaml, a useful path when verified output is part of the development workflow.
Key features
Proof sessions and extensibility
Why3's graphical interface saves proof attempts and transformations in XML and can replay attempts that have become obsolete. That helps preserve proof work through changes, though it does not remove the need to revisit proofs when a program or specification changes. Teams can add support for new provers or use Why3 as a library through its OCaml API, making it adaptable to research and custom verification pipelines.
Browser access and installation
TryWhy3 brings a JavaScript version of the platform to a browser, offering a way to access Why3 without first installing the desktop tool. The project also provides installation through Opam, Docker, or source compilation, with packages for Debian, Fedora, and Ubuntu. Emacs and Vim configuration files and bash and zsh shell completion support developers who prefer those environments.
Loop invariant inference remains a significant weakness: it is still a work in progress, and many of its features are very limited. Users should expect to supply or refine invariants rather than count on Why3 to infer them reliably.
Pricing
Why3 is free and open source under the GNU LGPL 2.1, with a special linking exception. The Why3 plan costs free. There are no paid tiers or seat and usage caps in the stated plan, but users still need to account for the time and maintenance involved in configuring external provers.
Platforms
Why3 is available for Linux and Windows, can be self-hosted, and offers API and browser access. Its deployment options span both cloud and self-hosted use. The project is developed by the Inria Toccata team, a joint research team of Inria Saclay-Île-de-France, Université Paris-Saclay, and CNRS. EasyCrypt, Frama-C, and SPARK 2014 are among the projects that use Why3.
Who it's for
Why3 is a good fit for developers, researchers, and verification teams who need deductive verification across different source languages and value the freedom to connect their own provers. It is also relevant to OCaml projects that can benefit from code extraction or to teams building custom tools around the API. It is a weaker choice for teams that need strong automatic loop-invariant inference or want a verification workflow without separate prover setup. Users can discuss the platform on its Zulip forum or public mailing list and report bugs through its bug tracker or Zulip.
Pros and cons
- Multiple prover backends: Support for external automated and interactive provers lets teams tailor their proof workflow, and new prover support can be added.
- Useful verification bridge: WhyML supports verification work involving C, Java, Rust, and Ada, and WhyML programs can be extracted to correct-by-construction OCaml.
- Durable proof sessions: XML session records and replay of obsolete proof attempts help teams retain and revisit proof work.
- Setup burden: External provers require separate installation and configuration, adding work to adoption and environment maintenance.
- Limited invariant inference: The feature's work-in-progress state means users should not rely on Why3 to infer loop invariants for them.
Alternatives
For other options, browse Formal Verification Tools.
- PVS is a free option for Linux, macOS, and Windows; its noncommercial plan is free, while commercial users face custom pricing.
- Boogie is a free MIT-licensed alternative for users who can meet its .NET and supported SMT solver requirements.
- Lean is a free alternative available on Linux, macOS, Windows, and the web.
- Rocq is a free interactive theorem prover and dependently typed programming language for users who want that style of tool.
- UPPAAL offers a free academic license for eligible non-commercial academic use; choose it if that license fits your work.
- Alloy Analyzer is a free, self-contained executable for teams seeking a standalone option.
- cvc5 is a free open-source solver with API and web support; it may suit users seeking a solver rather than Why3's broader verification platform.
- HOL4 is a free option under the Modified (3-clause) BSD licence.
Verdict
Choose Why3 if your team needs a flexible deductive verification layer, values prover choice, or wants to build around an OCaml API and WhyML-to-OCaml extraction. Look elsewhere if you need loop invariants inferred with little intervention or want to avoid installing and configuring external provers.
The verdict
Why3 offers a flexible deductive verification workflow with multiple prover options, an API, and browser access. Its fit depends on configuring external provers, and loop invariant support remains limited.
Questions people ask
Is Why3 free?
Yes. The Why3 plan is free, and the project is open source under GNU LGPL 2.1 with a special linking exception.
Which platforms does Why3 support?
Its listed platforms and deployments include API, Linux, self-hosted, web, and Windows.
Which languages can Why3 handle?
Its listed input languages are WhyML, micro-C, micro-Python, MLCFG, and Coma. WhyML is also used as an intermediate language for C, Java, Rust, and Ada verification.
Does Why3 include theorem provers?
Why3 supports external automated and interactive theorem provers, but those provers must be installed and configured separately.
Can Why3 run in a browser?
Yes. TryWhy3 is a JavaScript version of the Why3 Verification Platform that runs in a browser.
What the maker publishes
- Browser access
- TryWhy3 is a JavaScript version of the Why3 Verification Platform that runs in a browser. source
- Browser version
- TryWhy3 is a JavaScript-based version of the Why3 Verification Platform that can be used in a browser. source
- Code extraction
- WhyML programs can be automatically extracted into correct-by-construction OCaml programs. source
- Development
- Why3 is developed by the Inria Toccata team, which is a common research team of Inria Saclay-Île-de-France, Université Paris-Saclay, and CNRS. source
- Development
- Why3 is developed by the Inria Toccata team, a joint research team of Inria Saclay-Île-de-France, Université Paris-Saclay, and CNRS. source
- Downloads
- The site lists Debian, Fedora, and Ubuntu packages and links to source release 1.8.2. source
- Editor integrations
- Why3 distributions include configuration files for Emacs and Vim, plus shell completion files for bash and zsh. source
- Extensibility
- Why3 can be extended with support for new external provers and used as a software library through its API. source
- Extensibility and API
- Why3 can be extended with support for new theorem provers and used as a software library through an OCaml API. source
- Installation
- Why3 can be installed via Opam, run from a Docker image, or compiled from source. source
- Integrations
- The project lists EasyCrypt, Frama-C, and SPARK 2014 among projects that use Why3. source
- Language verification
- WhyML is used as an intermediate language for verification of C, Java, Rust, and Ada programs. source
- Language verification
- WhyML is used as an intermediate language for verification of Rust, OCaml, and Ada programs. source
- License
- Why3 is open source and freely available under the GNU LGPL 2.1. source
- License
- TryWhy3 is distributed under the GNU Lesser General Public License version 2.1 with a special linking exception. source
- Notable limitation
- Loop invariant inference is described as work in progress, with many features still very limited. source
- Program extraction
- WhyML programs can be automatically extracted as correct-by-construction OCaml programs. source
- Proof sessions
- The graphical interface saves proof attempts and transformations in an XML file and can replay obsolete proof attempts. source
- Prover setup
- After installing a new prover, the site says to rerun `why3 config --detect`. source
- Prover support
- Why3 supports a range of external theorem provers, which must be installed separately and configured for use. source
- Prover support
- Why3 supports automated and interactive external provers, including Alt-Ergo, Z3, Rocq, PVS, and Isabelle/HOL. source
- Purpose
- Why3 is a platform for deductive program verification that uses WhyML and external automated or interactive theorem provers to discharge verification conditions. source
- Purpose
- Why3 is a platform for deductive program verification that uses WhyML and external theorem provers to discharge verification conditions. source
- Standard library
- Why3 includes logical theories and programming data structures such as arrays, queues, and hash tables. source
Checked against the maker's pages on 10 Oct 2026.