Dafny

Dafny是一种支持验证的编程语言。(Dafny is a verification-aware programming language.)

Github星跟踪图

Build Status Gitter

Dafny

Dafny is a programming language with a program verifier. As you type in your program, the verifier constantly looks over your shoulders and flags any errors. Dafny is currently spread across 3 sites:

Community

You can ask questions about Dafny on Stack Overflow or participate in general discussion on Dafny's Gitter.

Try Dafny

The easiest way to get started with Dafny is to use rise4fun, where you can write and verify Dafny programs without having install anything. On rise4fun, you will also find the online Dafny tutorial.
It is also easy to install Dafny on your own machine in VS Code, which gives you a much better user experience than in the web browser.

Setup

See installation instructions on the wiki
and instructions for installing the Dafny mode for Emacs.

Read more

Here are some ways to get started with Dafny:

The language itself draws pieces of influence from:

  • Euclid (from the mindset of a designing a language whose programs are to be verified),
  • Eiffel (like the built-in contract features),
  • CLU (like its iterators, and inspiration for the out-parameter syntax),
  • Java, C#, and Scala (like the classes and traits, and syntax for functions),
  • ML (like the module system, and its functions and inductive datatypes), and
  • Coq and VeriFast (like the ability to include co-inductive datatypes and being able to write inductive and co-inductive proofs).

External contributions

Contributors

To enforce some basic style conventions, we've adopted pre-commit. We're
using their default hooks. When you clone
Dafny, install pre-commit as per the instructions.
For example, on OSX you do

$ brew install pre-commit

Then run

$ pre-commit install

This will install pre-commit hooks in your .git/hooks directory.

Code of Conduct

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

License

Dafny itself is licensed under the MIT license. (See LICENSE.txt in the root directory for details.) The subdirectory third_party contains third party material; see NOTICES.txt for more details.

主要指标

概览
名称与所有者dafny-lang/dafny
主编程语言C#
编程语言C# (语言数: 17)
平台BSD, Linux, Mac, Windows
许可证Other
所有者活动
创建于2016-04-16 20:05:38
推送于2025-06-29 19:10:12
最后一次提交2025-06-24 16:41:07
发布数56
最新版本名称nightly (发布于 )
第一版名称v1.9.7 (发布于 )
用户参与
星数3.1k
关注者数80
派生数280
提交数6.9k
已启用问题?
问题数2909
打开的问题数1121
拉请求数2767
打开的拉请求数179
关闭的拉请求数317
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?