Developing Walnut - Walnut-Theorem-Prover/Walnut GitHub Wiki
Build process
Walnut is currently built with the Gradle build system, and supports:
- Unit testing via JUnit
- Unit tests are stored in
src/test/ - Integration testing is done via the unit testing process, to show code coverage
- To rebuild integration test files, uncomment the
@Testattribute beforecreateTestCases()in IntegrationTests.java
- Unit tests are stored in
- Code coverage reports via JaCoCo
- Code coverage is somewhere around 95%.
- Static analysis via SpotBugs
- Disabled by default, since it flags a few issues which fail the build. Uncomment the SpotBugs code in the
build.gradlefile to enable.
- Disabled by default, since it flags a few issues which fail the build. Uncomment the SpotBugs code in the
To build Walnut, run build.sh. (Note additional comments in the file.)
To test Walnut (unit and integration tests), run build.sh -t.
To run Walnut, run walnut.sh. (Note additional comments in the file.)
Generated files
build.sh will create a build/ directory.
There are many files there, but in particular:
- build/libs contains the "thin" and "fat" JAR files. The fat JAR (Walnut-all.jar) packages up dependent libraries which are necessary for execution.
- build/reports/tests/test/index.html shows output of unit tests.
- build/jacocoHtml/index.html shows code coverage results.
- build/reports/spotbugs/main.html shows SpotBugs output (if enabled).
Libraries
Walnut uses the following libraries:
- AutomataLib - DFA/NFA implementation, BA format
- dk.brics.automaton - Regex implementation
- fastutil: memory-efficient collections library for Java
- OTF - On-The-Fly determinization algorithms, sometimes useful for (drastically) faster determinization
IDEs
Gradle is supported by several IDEs including Eclipse and IntelliJ. In particular, in IntelliJ you can simply open the Gradle file to create a project.