Freedom251 › Formal Verification Tools
Why3

What Why3 is
Why3 is a platform for deductive program verification. It uses WhyML to express programs and specifications, then relies on external automated or interactive theorem provers to discharge verification conditions. Those provers must be installed and configured separately. In WhyML, users can write preconditions, postconditions, assertions, and loop invariants; its standard library includes logical theories and structures such as arrays, queues, and hash tables. Why3 can be extended with support for additional provers and used as a software library through an OCaml API. WhyML programs can be extracted automatically into correct-by-construction OCaml, and WhyML also serves as an intermediate language for verifying C, Java, Rust, and Ada programs. TryWhy3 provides browser access through a JavaScript version. Installation options include Opam, Docker, source compilation, and packages for Debian, Fedora, and Ubuntu. The graphical interface saves proof attempts and transformations in XML and can replay obsolete attempts. Why3 is free and open source under GNU LGPL 2.1 with a special linking exception. Loop invariant inference is still a work in progress, and many features in that area remain very limited.
Who it suits
Why3 suits developers and researchers working on deductive verification with WhyML and external theorem provers. It may also fit teams verifying C, Java, Rust, or Ada programs through WhyML as an intermediate language.
What it does well
- Free and open source under GNU LGPL 2.1.
- Supports multiple external theorem provers.
- WhyML programs can be extracted to OCaml.
- Browser version available through TryWhy3.
- Proof attempts can be saved and replayed.
What to know first
- External theorem provers require separate installation and configuration.
- Loop invariant inference remains a work in progress.
- Many loop-invariant features are still very limited.
Plans
| Plan | Billed and limits | Price |
|---|---|---|
| Why3 | GNU Lesser General Public License version 2.1 with a special linking exception | Free |
As why3.org lists them, read 10 Oct 2026. The maker's own page has the final word.
Getting started
- Open the Why3 website or TryWhy3 in a browser.
- For a local installation, choose Opam, Docker, source compilation, or a listed Debian, Fedora, or Ubuntu package.
- Install the external theorem provers you plan to use.
- Run `why3 config --detect` after installing a new prover.
- Use the included Emacs or Vim configuration files if you want editor integration.
Verdict
Why3 offers a verification workflow centered on WhyML, with extensibility and several installation routes. Account for the separate prover setup and the stated limits around loop invariant inference.
Questions
Is Why3 free?
Yes. The listed Why3 plan costs nothing, and the project is open source under GNU LGPL 2.1 with a special linking exception.
Which platforms can I use it on?
The listed platforms are API, Linux, self-hosted, web, and Windows. TryWhy3 is the browser-based JavaScript version.
Which languages does Why3 support?
The listed input languages are WhyML, micro-C, micro-Python, MLCFG, and Coma. WhyML is also used as an intermediate language for verifying C, Java, Rust, and Ada programs.
Do I need to install theorem provers separately?
Yes. External provers must be installed separately and configured for use. After installing a new prover, run `why3 config --detect`.
Who develops Why3?
Why3 is developed by the Inria Toccata team, a joint research team of Inria Saclay-Île-de-France, Université Paris-Saclay, and CNRS.
Does Why3 support counterexamples?
Yes. Counterexamples are listed as supported.
Facts from Why3's own pages
- Browser access
- TryWhy3 is a JavaScript version of the Why3 Verification Platform that runs in a browser. · why3.org, 9 Oct 2026
- Browser version
- TryWhy3 is a JavaScript-based version of the Why3 Verification Platform that can be used in a browser. · why3.org, 10 Oct 2026
- Code extraction
- WhyML programs can be automatically extracted into correct-by-construction OCaml programs. · why3.org, 9 Oct 2026
- Development
- Why3 is developed by the Inria Toccata team, a joint research team of Inria Saclay-Île-de-France, Université Paris-Saclay, and CNRS. · why3.org, 10 Oct 2026
- Downloads
- The site lists Debian, Fedora, and Ubuntu packages and links to source release 1.8.2. · why3.org, 10 Oct 2026
- Editor integrations
- Why3 distributions include configuration files for Emacs and Vim, plus shell completion files for bash and zsh. · why3.org, 9 Oct 2026
- Extensibility
- Why3 can be extended with support for new external provers and used as a software library through its API. · why3.org, 9 Oct 2026
- Extensibility and API
- Why3 can be extended with support for new theorem provers and used as a software library through an OCaml API. · why3.org, 10 Oct 2026
- Installation
- Why3 can be installed via Opam, run from a Docker image, or compiled from source. · why3.org, 9 Oct 2026
- Integrations
- The project lists EasyCrypt, Frama-C, and SPARK 2014 among projects that use Why3. · why3.org, 10 Oct 2026
- Language verification
- WhyML is used as an intermediate language for verification of Rust, OCaml, and Ada programs. · why3.org, 10 Oct 2026
- License
- TryWhy3 is distributed under the GNU Lesser General Public License version 2.1 with a special linking exception. · why3.org, 10 Oct 2026
- Notable limitation
- Loop invariant inference is described as work in progress, with many features still very limited. · why3.org, 9 Oct 2026
- Program extraction
- WhyML programs can be automatically extracted as correct-by-construction OCaml programs. · why3.org, 10 Oct 2026
- Proof sessions
- The graphical interface saves proof attempts and transformations in an XML file and can replay obsolete proof attempts. · why3.org, 9 Oct 2026
- Prover setup
- After installing a new prover, the site says to rerun `why3 config --detect`. · why3.org, 10 Oct 2026
- Prover support
- Why3 supports automated and interactive external provers, including Alt-Ergo, Z3, Rocq, PVS, and Isabelle/HOL. · why3.org, 10 Oct 2026
- Purpose
- Why3 is a platform for deductive program verification that uses WhyML and external theorem provers to discharge verification conditions. · why3.org, 10 Oct 2026
- Standard library
- Why3 includes logical theories and programming data structures such as arrays, queues, and hash tables. · why3.org, 10 Oct 2026
- Support
- The project provides a user mailing list, a Zulip chat, and a bug tracking system. · why3.org, 10 Oct 2026
- WhyML
- WhyML supports specifications and programs with preconditions, postconditions, assertions, and loop invariants. · why3.org, 9 Oct 2026
Where Why3 stands on Freedom251
- Formal Verification Tools#25 of 34