Suggestions appear as you type. Use the up and down arrows to choose one and Enter to open it.

Stainless review

Free#33 of 35 in Formal Verification Tools

A focused, self-hosted verifier for Scala 3 contracts, safety properties, and termination.

6.2/10Editor score
Stainless6.2 Visit Stainless

Reviewed by iTechGuides Editors · Editorial team · Updated Oct 2026

Stainless is an open-source formal verification framework for a supported subset of Scala 3. It targets developers and teams that need deductive verification of higher-order Scala programs, including function contracts, runtime-safety properties, termination, and algebraic data type invariants. The framework runs locally through standalone releases, package managers, source builds, SBT integration, or browser-based GitHub Codespaces. Its free, open-source model suits projects that want to inspect and manage verification tooling within their own development environment.

The main depth is its contract and proof system. Stainless checks preconditions, postconditions, loop invariants, and ADT invariants, and it can verify quantified properties and natural-deduction proofs. For termination, it supports inferred or user-specified measures. When a contract fails, the tool provides concrete counterexamples, which can make invalid specifications easier to investigate. Automated reasoning uses Z3, cvc5, and Princess, while verification reports distinguish valid, invalid, and unknown results. This combination gives Scala developers a broad set of specification constructs without narrowing the workflow to simple assertions.

Its ecosystem fit is strongest for Scala projects already using SBT or requiring adjacent artifacts. Stainless offers SBT plugin integration, Coq program export, and Scala-to-C99 code generation, alongside support for Windows, macOS, Linux, and an API. The trade-off is focus: Stainless is designed for Scala 3 and a supported language subset rather than broad multi-language verification. Teams working primarily in another language, or those seeking a general-purpose formal verification platform, should choose an alternative. Scala developers who want local, contract-focused verification, counterexamples, termination checking, and proof-oriented specifications should consider Stainless.

Stainless pros and cons

  • Where it wins
    • Concrete counterexamples help diagnose invalid contracts.
    • Uses Z3, cvc5, and Princess for automated reasoning.
    • Supports Scala-to-C99 generation, Coq export, and SBT integration.
  • Where it doesn't
    • Focused on a supported subset of Scala 3.
    • Self-hosted deployment requires local environment management.
    • Verification results can be valid, invalid, or unknown.

Stainless fact sheet, pricing and score →

Advertiser disclosure: iTechGuides is reader-supported. Vendors can pay for top positions in our rankings and for a place on other products' pages, and we may earn a commission when you click some links. Bought places stand at the number bought; this page and our disclosure say so. Paying vendors may get a fuller, more detailed review from our editors, and that review can change their score. How we rank.

Last updated · How we research and update