SyncGen

Note:

SyncGen is available for downloading, but you need to go to the SAnToS Laboratory Projects website to create a new account (click on the "new account" link in the upper-right corner) if you do not have one. Then you can download SyncGen.


Installation

SyncGen is distributed in zip format. It should be unpacked by unzip command in Unix or Winzip in Windows. In Unix, use command: unzip syncgen.zip. A directory named syncgen will be generated under working directory and installation is complete.

Running SyncGen

Requirements

The SyncGen tool is written in pure Java. It requires Sun Java 1.4 to run/recompile. For generated code:

  • Java: Java 1.2 will be sufficient to compile and run;
  • C : POSIX threads (pthreads) library is needed.

Usages

Assume that current directory is the syncgen installation dir. The command is java -jar syncgen.jar options where the options are:

  • -?, --help print this help and exit
  • -b, --bounded output bounded counter coarse grain solution
  • -c, --coarse < filename > the input coarse grain solution file name
  • -f, --function < filename > the input functional code file name
  • -l, --language < c/java > the target language (C/Java)
  • -o, --outputdir < dir > output directory, default is the working directory
  • -s, --specification < filename > the input synchronization specification file name

Usage examples

Assume the current directory is the syncgen installation dir and OS is in *nix.

  1. java -jar syncgen.jar -l java -s examples/readerwriter/rw.spec -o ~/workingdir/readerwriter/ will take the synchronization specification of the reader writer problem rw.spec and generate coarse grain solution rw.coarse and fine grain Java code and put them in ~/workingdir/readerwriter directory.
  2. java -jar syncgen.jar -l java -c ~/workingdir/readerwriter/rw.coarse -o ~/workingdir/readerwriter/ will take the coarse grain solution of the reader writer problem generated by previous command and generates fine grain Java code and put it in ~/workingdir/readerwriter directory.
  3. java -jar syncgen.jar -l java -s examples/readerwriter/rw.spec -f example/readerwriter/RW$fine.java -o ~/workingdir/readerwriter/ will do all the thing that 1 does. Furthermore, it will weave the functional code RW$fine.java and generate ~/workingdir/readerwriter/RW$fine.java.