Installing and Running Dafny
Follow the instructions below to install Dafny, and run it from the command line.
Windows
- Download and unzip Dafny from the Dafny project repository releases.
- While in the Dafny directory, check whether Dafny is working by creating a test file, e.g. call it
test.dfy , and then executing:
Dafny.exe /compile:0 test.dfy
or
Dafny.exe test.dfy
Linux and Mac OS
- Download and unzip Dafny from the Dafny project repository releases. Check on the .zip files name to get the appropiate version for your operating system.
- Install Mono. It is recommended to install
the version 4 or higher.
- While in the Dafny directory, check whether Dafny is working by creating a test file, e.g. call it
test.dfy , and then executing:
mono Dafny.exe /compile:0 test.dfy
or
mono Dafny.exe test.dfy
Note that you may have to give execution permits to the file Dafny.exe .
Build from source Another possiblity is to build Dafny from
its sources. You can check how to this on
the Dafny's
repository instructions . Either way, you have install mono.
Emacs mode As an alternative to mono, you can use Dafny
interactively within Emacs, after installing
this dedicated
mode.
|