dafny-lang/dafny

Public

Dafny is a verification-aware programming language

  • Stars3.7k+14 tuần này
  • Forks342
  • Watchers74
  • Issues1.3k
  • Ngày tạo17/04/2016
  • Cập nhật gần nhất01/12/2026
  • Ngôn ngữC#
  • Giấy phép—
README.md11.9 KBRaw

Dafny

Build and Test Gitter

Dafny is a verification-ready programming language. As you type in your program, Dafny's verifier constantly looks over your shoulder, flags any errors, shows you counterexamples, and congratulates you when your code matches your specifications. When you're done, Dafny can compile your code to C#, Go, Python, Java, or JavaScript (more to come!), so it can integrate with your existing workflow.

vs-code-dafny-2 0 0-demo

Dafny will give you assurance that your code meets the specifications you write, while letting you write both code and specifications in the Dafny programming language itself. Since verification is an integral part of development, it will thus reduce the risk of costly late-stage bugs that are typically missed by testing.

Dafny has support for common programming concepts such as classes and trait inheritance, inductive datatypes that can have methods and are suitable for pattern matching, lazily unbounded datatypes, subset types e.g. for bounded integers, lambdas, and immutable and mutable data structures.

Dafny also offers an extensive toolbox for mathematical proofs, such as unbounded and bounded quantifiers, calculational proofs, pre- and post-conditions, termination conditions, loop invariants, and read/write specifications.

Dafny

This GitHub site contains these materials:

Documentation about the Dafny language and tools is located here. A reference manual is available both online and as pdf. (A LaTeX version can be produced if needed.)

Community

Feel free to report issues here on GitHub or to ask questions on our 💬 Zulip channel.

Try Dafny

The easiest way to try out Dafny is to install Dafny on your own machine in Visual Studio Code and follow along with the Dafny tutorial. You can also download and install the Dafny CLI if you prefer to work from the command line.

Read more

Here are some ways to get started with Dafny:

  • 4-part course on the

Nội dung README thuộc về dafny-lang và cộng đồng đóng góp, giấy phép Không có giấy phép. Nguồn: github.com/dafny-lang/dafny