Alpha. Vary is under active development and not ready for production use. Syntax, APIs, performance, and behaviour may change between releases.

Other verification tools

The closest relatives

Vary copies the established automatic, contract-based recipe: you write contracts and a few annotations, and an SMT solver does the rest.

ToolWhat it isHow it relates to Vary
DafnyA language designed for verification, with requires, ensures, loop invariants, decreases, ghost code and lemmas. Verifies through Boogie and Z3 and compiles to several targetsThe main model for the design and the annotation vocabulary. In Dafny verification is the point of the language and a failed proof is a compile error. In Vary it is optional
SPARK (Ada)A verifiable subset of Ada. GNATprove generates conditions through Why3 and uses several SMT solvers. Used in avionics, rail and security-critical systemsThe industrial proof that this approach scales. Like Vary, it proves contracts that also exist as run-time checks. It has far more history, tooling and proven fragment
Why3A platform and intermediate language (WhyML) for deductive verification with many solver back-ends. SPARK, Frama-C and Creusot build on itVary has its own small pipeline instead of an intermediate verifier. That keeps the back end small and means Vary does not inherit Why3's breadth
Frama-C (WP)Verification of C using ACSL annotations in commentsThe same contract idea applied to an unsafe language. The contracts live outside the language, so they are not run-time checks
Eiffel (AutoProof)The language that popularised Design by Contract, with a static verifierin and out blocks are Design by Contract. Eiffel's contracts were checked at run time first, as Vary's were
Java: JML, OpenJML, KeYContract annotations for Java with static toolsVary targets the same VM. JML lives in comments and is not part of the language

Different approaches

ToolApproachContrast with Vary
Liquid HaskellRefinement types: types carry logical predicates, checked with an SMT solverThe proof lives in the type. Vary keeps ordinary types and puts the logic in contracts
F*A dependently typed language with SMT-assisted proofs and extraction of verified code. Used for verified cryptographyMore expressive and much harder to learn. Vary aims for low-ceremony contracts
Lean, Coq, IsabelleInteractive proof assistants. A person writes every proof step and a small kernel checks itThe strongest guarantees and the highest effort. Vary does not compete here. It exports a goal to Lean when the SMT solver gives up
Rust: Prusti, Creusot, KaniPrusti and Creusot verify annotated Rust deductively. Kani uses bounded model checkingRust's ownership rules give them strong aliasing information. Vary models aliasing itself with a per-field heap and modifies. Kani resembles vary prove --bounded
Python: CrossHair, NaginiCrossHair searches for contract violations by symbolic execution. Nagini verifies a typed Python subsetThe closest in spirit to bounded mode. Vary also offers unbounded proofs
Hypothesis, QuickCheckRandom inputs checked against a propertyCheap and statistical. A good first step, not a substitute
TLA+ and model checkersExplore the states of a design or protocolThey verify designs and concurrency. Vary verifies sequential code and treats spawn and channels as opaque

Where Vary sits

ChoiceWhat it means
Verification is optional and incrementalYou can run Vary for years without proving anything. Contracts are run-time checks first. Dafny and SPARK users usually commit to verification up front
One contract language for run time and proofThe same in, out and invariant blocks are tested, mutation-tested and proven. Many tools use a separate annotation language
Proofs can remove run-time costA function whose contracts are all proven can drop its checks from the compiled program, as an opt-in
A tight link to mutation testingA mutant that a proof refutes is killed without running tests, and a mutant that survives the proof flags a weak contract
Nothing to installThe bundled solver means vary prove works on a clean machine
Content-addressed proof cachingResults are cached per function by hash, consistent with the artifact system
A named escape hatchWhen SMT cannot settle a goal, export it to Lean and import the checked proof back
Counterexamples are replayedA refuted result is a real failure on the real program, not a solver artifact
JVM-faithful integersInt is a 64-bit wrapping long and overflow is an explicit obligation, instead of being ignored or assumed away

Limits

LimitDetail
MaturityDafny and SPARK have years of industrial use, large libraries of verified code and trained users. The Vary prover is new and has no external production track record yet
Breadth of the proven partSPARK and Dafny cover far more of their languages. Vary reports some types and builtin behaviours as unsupported or models them only by axiom
Solver strength out of the boxThe bundled solver cannot decide products of two variables. Z3 can, as an optional download
Concurrencyspawn, task_group and channels are opaque. Vary does not verify concurrent code
ClassesClasses live in a heap model with aliasing, not as solver datatypes, because they are mutable and compared by reference. data values compare by field
Guarantee strengthLean, Coq and F* give a small trusted kernel. Vary's guarantees rest on its encoder and the solver. Replaying counterexamples and the Lean hand-off reduce that risk but do not remove it

Vary does not try to replace Dafny or Lean. It aims to make most of verification cheap for ordinary application code: add a contract, run vary prove, get either a proof or a concrete bug, and leave everything else as normal Vary.