Main Developer
Niklas Broberg
Contributors
David Sands
Bart van Delft
Yannick Zakowski
Javed Nazir
Filippo Del Tedesco
Paragon is written in Haskell and is available in HackageDB. Installation should therefore be as simple as running the command:
cabal install paragon
To compile a file MyClass.para written in Paragon execute the command in the folder containing the file:
parac MyClass.para
If the file is compiled correctly nothing is printed to the screen and the files MyClass.pi MyClass.java are created in the same folder. The .pi file is a Paragon Interface file and preserves the original annotations. This file is used when using MyClass in other files. The .java file can be compiled using the standard javac compiler, provided that the Paragon runtime library is in the path (see below).
The paragon compiler can be called with the following flags
Usage: parac [OPTIONS...] files...
-V
--version
Show the version number
-p <path>
--pipath=<path>
Under Unix : and under windows ; separated list of paths to
directories containing requried Paragon interface (.pi) files (default is .)
-h
--help
Show this help
-v[n]
--verbose[=n]
Control verbosity (n is 0--4, normal verbosity level is 1,
-v alone is equivalent to -v3)
In order to support the dynamic features of Paragon (dynamic policies and lock queries) the generated .java files need to be compiled against the Paragon runtime library. This library also needs to be present during execution of the generated .class files.
Download the Paragon runtime jar here.
Assuming that the paragonRT.jar file is in the same directory as your code, you can run the command
javac -cp .;paragonRT.jar MyClass.java
to compile the .java generated by the Paragon compiler.