Development version
This page contains links to Dafny documentation.
Project site for releases, issues, installation instructions, and source code

Dafny is a verification-aware programming language that has native support for recording specifications and is equipped with a static program verifier. By blending sophisticated automated reasoning with familiar programming idioms and tools, Dafny empowers developers to write provably correct code (w.r.t. specifications). It also compiles Dafny code to familiar development environments such as C#, Java, JavaScript and Go (with more in progress, such as Python) so Dafny can integrate with your existing workflow. Dafny makes rigorous verification an integral part of development, thus reducing costly late-stage bugs that may be missed by testing.
In addition to a verification engine to check implementation against specifications, the Dafny ecosystem includes several compilers, plugins for common software development IDEs, a LSP-based Language Server, a code formatter, a reference manual, tutorials, power user tips, books, the experiences of professors teaching Dafny, and the accumulating expertise of industrial projects using Dafny.
Dafny has support for common programming concepts such as
mathematical and bounded integers and reals, bit-vectors, classes, iterators, arrays, tuples, generic types, refinement and inheritance,
inductive datatypes that can have methods and are suitable for pattern matching,
subset types, such as for bounded integers,
lambda expressions and functional programming idioms,
Dafny also offers an extensive toolbox for mathematical proofs about software, including
calculational proofs and the ability to use and prove lemmas,
pre- and post-conditions, termination conditions, loop invariants, and read/write specifications.