Building from source requires the java version to be >= 25. The java version can be verified by running java --version.
To build the .jar file, run the following:
git clone https://github.com/WatForm/dashplus
cd ./dashplus
./gradlew releaseJar
The generated .jar file is located at dashplus/app/build/libs/watform-dashplus.jar
The build process uses gradle version 9.1.0. However, installing this globally is unnecessary, since it is downloaded as part of the build process.
The build process is the same for Linux, MacOS and Windows powershell. On Windows cmd, ./gradlew releaseJar is replaced by gradlew releaseJar.
Run with the desired entry point:
- Execute command in Dash/Alloy file:
java -jar app/build/libs/watform-dashplus.jar <args> - TLA Translation:
java -cp app/build/libs/watform-dashplus.jar ca.uwaterloo.watform.dashtotla.Main <args> - Predicate Abstraction:
java -cp app/build/libs/watform-dashplus.jar ca.uwaterloo.watform.predabstraction.Main <args>
For systems with the nix package manager, there is an alternate set-up that automates the installation of external dependencies, like java, gradle and alloy. This process assumes that one has nix with flakes enabled on one's system (nix-darwin on Mac, nix on generic linux systems).
- Clone this repository and navigate to the root:
git clone https://github.com/WatForm/dashplus
cd ./dashplus
- Start a nix shell from the provided flake:
nix develop ./nix
This opens a bash shell with all the dependencies installed just within that shell, along with a few convenient aliases and useful tools. There is no need to install java or gradle globally, or switch java verisons - nix handles everything. Upon exiting the shell, the system goes back to its initial state.
-
If an IDE is used, please ensure that IDE-generated files are not present in any of the commits. This can be done by including such files in the .gitignore
-
See Coding Standards
./gradlew testfor unit testing./gradlew spotlessApplyto format code with google-java-format./gradlew buildwill check for formatting issues as a dependent gradle task
- For testing using a JAR, the main entry point is:
app/src/main/java/ca/uwaterloo/watform/test/Main.javaNote: If the
Dash.g4grammar is changed, you must test it with the catalyst-corpus. See the instructions inapp/src/main/java/ca/uwaterloo/watform/test/README.md.