-
Notifications
You must be signed in to change notification settings - Fork 25
DocsDevelopment
Synoptic is written in Java and is primarily developed using Eclipse.
For a description of the GWT-based front-end to Synoptic, see this page.
For a detail description of our development practices, see DocsDevelopmentPractices.
We use Mercurial (Hg) for our code repository. For details on how to check-out our googlecode repository consult this page. To push your changes to the repository you'll need to authenticate with an auto-generated googlecode.com password.
For more information about how to use Hg consult the following resources: 1, 2.
You might also consider using MercurialEclipse which integrates Hg with Eclipse (for more Eclipse plugin advice see below).
The command line Mercurial command (hg
) can be extended in numerous ways. You can use the following .hgrc
file template as a starting point.
We'll assume here that you have used Hg to clone the project into synoptic/.
You can build in one of two ways. Either build from within Eclipse or build from the command line:
-
Eclipse:
- Import a new project and point it to synoptic/synoptic/
- Under Project Properties go to Java Build Path -> Libraries. Click on Add Variable to add a SYNOPTIC_LIB variable. Set its value to be the absolute path of synoptic/lib'
-
Command line:
$ cd synoptic/synoptic/ && ant
To run Synoptic from Eclipse create a new run configuration and point it to use main.Main for its Main class.
To run Synoptic using the command line use the following command from within the synoptic/ dir:
$ java -ea -cp ./lib/*:./synoptic/bin/ synoptic.main.SynopticMain
You can also run synoptic.sh
script located in synoptic/ which runs the above command line for you (and passes any additional arguments to Main). You can pass in the -h or the -H options to see a usage screen.
To run all the tests pass the --runAllTests
option to Synoptic.
The synoptic source has a number of dependencies on external libraries. These libraries are included in the repository. Here we document the status of each dependency and what the library is used for.
Library | Version required | Status of dependency | What its used for | Notes |
---|---|---|---|---|
dk.brics.grammar | 2.0-4 | Essential | Used extensively by InvariMint | |
Raphaël | Essential | Used in the GWT interface for model/invariants visualizations | ||
Dracula, on github | Essential | Used in the GWT interface for model visualization | Synoptic uses a modified version of this library. | |
plume | Essential | Used for command line argument processing | ||
jung | Optional | Used for interactive graph output | ||
protobuf-java | Optional | Used for parsing files in protobuf message format | ||
daikon | Unused | Plans to use for mining structural trace invariants | ||
stixar | Unused | Potentially useful collection of graph algorithms |
We prefer to maintain code documentation as close to the code as possible. This means that you should strive to maintain code documentation in the code, not on the wiki.
We have found the following plugins to be useful during development, so we recommend that you install and use them.
- Google Eclipse plugin : includes GWT support
- MercurialEclipse : integrates Hg with Eclipse
- EclEmma : provides code coverage feedback
- FindBugs : finds common bugs
- JDepend : tracks class dependencies in a project
- CheckStyle : checks code style and alerts you of problems
- Emacs+ : in-depth integration of emacs with Eclipse
We also use Crystal, a tool for proactive detection of conflict in Hg. Follow the user manual to set up Crystal.