Skip to content
Ivan Beschastnikh edited this page May 4, 2015 · 1 revision

Introduction


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.

Working with the repository


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.

Building and Running Synoptic


We'll assume here that you have used Hg to clone the project into synoptic/.

Building

You can build in one of two ways. Either build from within Eclipse or build from the command line:

  • Eclipse:

    1. Import a new project and point it to synoptic/synoptic/
    2. 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

Running

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.

Running Tests

To run all the tests pass the --runAllTests option to Synoptic.

Library Dependencies


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

Code Documentation


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.

Useful Eclipse Plugins and Other Tools


We have found the following plugins to be useful during development, so we recommend that you install and use them.

We also use Crystal, a tool for proactive detection of conflict in Hg. Follow the user manual to set up Crystal.