Aviva Directory » Computers & Internet » Programming » Dafny

Available under an MIT License, Dafny is a verification-ready programming language that can compile to C#, Go, Java, or JavaScript.

Designed by K. Rustan M. Leino, and originally developed by Microsoft in 2009, Dafny makes it easy to write correct code.

The language relies on high-level annotations to reason about and prove the correctness of the code, so that there are no runtime errors and the compiled code does what the programmer wants it to do. The effect of a piece of code can be given abstractly through the use of a natural, high-level expression of the desired behavior, which is easy and reliable. Dafny then generates proof that the code matches the annotations, if they are correct.

Dafny is an imperative and functional compiled language that supports formal specifications through preconditions, postconditions, loop invariants, and loop variants. Combining concepts from the functional and. imperative paradigms, the language included limited support for object-oriented programming.

Used widely in teaching, Dafny builds on the Boogie intermediate language, which uses the Z3 automated theorem prover for discharging proof obligations.

The Dafny programming language is the focal point of this portion of our guide. Online resources dedicated to the programming language are appropriate topics for this category, as are any IDEs or other tools designed to facilitate Dafny programming, along with Dafny user groups, forums, tutorials, or guides.



Recommended Resources

Search for Dafny on Google or Bing