README.md
February 13, 2021 · View on GitHub
Setup
Prerequisites
- MSBuild
- sbt (Scala build tool)
Installation
- Create a new directory wherever you would like to store DafnyDoc and its dependencies, e.g.
mkdir dfy. - Navigate to the directory you have just created, e.g.
cd dfy. - Clone this fork of the Dafny compiler using the following command:
git clone git@github.com:nhweston/dfy.git ./cmp --recurse-submodules. - Navigate to the directory containing the Dafny compiler and run
msbuild Source/Dafny.sln. - Clone this repository.
- Navigate to the directory containing this repository and run
sbt assembly. - Optionally, add the
bindirectory to yourPATHso you can rundafnydocfrom anywhere.
Usage
Generate documentation for program.dfy (and all its includes) in directory doc:
dafnydoc -g program.dfy doc
Print documentation for a.dfy (just the single file):
dafnydoc -p a.dfy
Print the documentation tree for program.dfy:
dafnydoc -p a.dfy -t
…alternatively in JSON format:
dafnydoc -p a.dfy -j
Pass -v (verbose mode) to print output from the Dafny server.