Skip to content
Snippets Groups Projects
Forked from LARA / Stainless verifier
256 commits behind the upstream repository.

Stainless Release Nightly Build Status Build Status Gitter chat Apache 2.0 License

Verification framework for a subset of the Scala programming language. Supports contract-driven verification as well as termination checking of higher-order functional programs with local imperative features (see Pure Scala and Imperative for more details about the supported fragment).

Documentation

To get started, see videos:

Tutorials such as one from FMCAD 2021, from ASPLOS 2022 or local documentation chapters, such as:

Build and Use

To build the project, run sbt universal:stage. If all goes well, scripts are generated for Scala 3 and Scala 2 versions of the front end:

  • frontends/scalac/target/universal/stage/bin/stainless-scalac
  • frontends/dotty/target/universal/stage/bin/stainless-dotty

Use one of these scripts as you would use scalac to compile Scala files. The default behavior of Stainless is to formally verify files, instead of generating JVM class files. See frontends/benchmarks/verification/valid/ and related directories for some benchmarks and bolts repository for a larger collection. More information is available in the documentation links.

License

Stainless is released under the Apache 2.0 license. See the LICENSE file for more information.


Relation to Inox

Stainless relies on Inox to solve the various queries stemming from program verification. Inox supports model-complete queries in a feature-rich fragment that lets Stainless focus on program transformations and soundness of both contract and termination checking and uses its own reasoning steps, as well as invocations to solvers (theorem provers) z3, CVC4, and Princess.