Dafny
Dafny is an open-source verification-aware programming language with native specification constructs and a static program verifier. It combines automated reasoning with familiar programming idioms so developers can write code whose correctness is checked against specifications, then compile it into mainstream languages.
At a Glance
- Universities and instructors
- Academic and formal-methods researchers
- Software engineers building security- or correctness-critical systems
- Industrial teams using verified code, including Amazon/AWS-related projects
- +1 more
AI Tools by Dafny
(1)Dafny
Verification Aware Programming Language
Discussions
No discussions yet
Be the first to start a discussion about Dafny
Latest News
Parser Combinators in Dafny: a new standard-library parser-combinator framework with termination and no-runtime-exception guarantees, demonstrated with an interactive S-expression formatter.
A Verified Statistics Library for Dafny: introduction of the formally verified Std.Statistics module, including mean, variance, median, mode, range and related helpers.
Teaching Programming Languages and Security Through Verification: a report on using Dafny to teach type systems, formal semantics, type safety and non-interference.
Formal Verification of EVM Bytecode in Dafny: a Dafny-based formal and executable semantics for Ethereum Virtual Machine bytecode and its verification applications.
Products & Services
A statically verified imperative/functional language with native specifications, automated verification, types, classes, traits, datatypes, quantifiers, lemmas, pre/postconditions, termination conditions and loop invariants.
Compiles verified Dafny programs to C#, Java, JavaScript, Go and Python for integration with existing workflows.
Visual Studio Code extension backed by a Language Server Protocol implementation, plus a command-line/IDE code formatter and live verification feedback.
The project distributes standard libraries such as parser combinators and termination utilities; the 4.11.0 release made parser combinators available through the standard-library option.
Market Position
Dafny positions itself as a verification-aware language that integrates specifications, implementation and automated static verification in one developer-oriented workflow, while compiling to mainstream target languages. Relative to interactive theorem provers such as Coq, its SMT-assisted auto-active approach aims to reduce the amount of proof guidance developers must write; its ecosystem also builds on Boogie and Z3.
Leadership
Founders
K. Rustan M. Leino
Creator of Dafny and a Microsoft Research researcher in programming languages and formal verification; Microsoft Research identifies him as the author of the foundational Dafny work and the creator of the Program Proofs book.
Founding Story
Microsoft Research records the Dafny project as established on December 23, 2008. It was conceived as a programming language designed around static verification: specifications such as preconditions, postconditions, framing and termination metrics are written with the program, and the verifier runs as part of the compiler. The initial vision was to make rigorous functional-correctness verification feel like ordinary programming and static type checking.
Business Model
Revenue Model
Dafny is distributed as an open-source project under the MIT license, with source code, documentation and binary downloads available publicly; no commercial subscription or paid license model is described in the reviewed sources.
Target Markets
- Universities and instructors
- Academic and formal-methods researchers
- Software engineers building security- or correctness-critical systems
- Industrial teams using verified code, including Amazon/AWS-related projects
- Smart-contract and blockchain verification researchers
- Writing provably correct application and systems software
- Formal verification and functional-correctness proofs
- Teaching programming languages, type systems, security and program verification
- Research in automated reasoning and verified software
- Industrial security-sensitive software and cryptographic implementations
- Formal semantics and verification of Ethereum Virtual Machine bytecode
- Amazon teams, including the AWS Encryption SDK for Dafny
- ConsenSys Trustworthy Smart Contracts team, which developed a formal and executable EVM semantics in Dafny