This is the documentation for the Peggy equality saturation engine and compiler. Below you will find some answers to simple questions about how to install and use Peggy.
All the Peggy files are contained in the zip-file peggy_1.0.zip. This includes the main Peggy jarfile, the source code, some scripts to help run Peggy, the axiom input files we most often use, and the external library jarfiles that are needed to compile and run Peggy.
No installation is necessary. If you have the peggy_1.0.jar file, then you have a working copy of Peggy and all of the libraries it depends upon (from the lib/ folder).
If you wish to compile Peggy from source, you will find all the source code in the src/ folder. We use the Eclipse 3.1+ IDE to build Peggy. In Eclipse, you will need to create a new Java Project, and then add the code in the src/ folder to the project. You can do this either by copying it into the src/ folder that Eclipse creates for your new project, or by telling it to add the existing src/ folder to your project's source path. Once you have built a project and added the Peggy source code, you must add all the jars in the lib/ folder to the project's build path. Then you can refresh the project and it should compile correctly.
The only setup required for Peggy is specifying the paths to a few external tools that it relies on. The optimizers need to know the path to the Pueblo, Minisat or GLPK solver program, depending on which you want to use. You can specify this on the command line with the -minisatPath, -puebloPath, or -glpkPath options. If no path is specified explicitly, the path is assumed to be $COLLIDER_ROOT/scripts/minisat/Minisat (for minisat), $COLLIDER_ROOT/scripts/pueblo/Pueblo (for Pueblo), or /usr/bin/glpsol (for GLPK).
The optimizers also generate some temporary files, and you may specify which folder these files are created in with the option -tmpFolder <folder>. The default is /tmp/.
We have provided bash scripts to run the appropriate command-line class for each optimizer/translation validator for Java/LLVM. For any one of these scripts, you may call it without parameters to see a description of the command-line parameters it accepts.
Here's a basic example of how to optimize a Java class with Peggy. Suppose we want to optimize a class Foo.class, which is in the current folder.
If you have any questions/comments, please direct them to email@example.com.