| 1 | CIVL Installation Instructions
|
|---|
| 2 |
|
|---|
| 3 | ------------------------- Binary Distribution -------------------------
|
|---|
| 4 |
|
|---|
| 5 | For most users, this will be the easiest way to install and use CIVL.
|
|---|
| 6 |
|
|---|
| 7 | 1. Install a Java 7 SDK if you have not already. Go to
|
|---|
| 8 | http://www.oracle.com/technetwork/java/javase/downloads/ for the
|
|---|
| 9 | latest from Oracle. On linux, you can optionally sudo apt-get install
|
|---|
| 10 | openjdk-7-jdk.
|
|---|
| 11 |
|
|---|
| 12 | 2. Download the approrpriate complete binary distribution from
|
|---|
| 13 | http://vsl.cis.udel.edu/civl.
|
|---|
| 14 |
|
|---|
| 15 | 3. Unzip and untar the downloaded file if this does not happen
|
|---|
| 16 | automatically. This should result in a folder named
|
|---|
| 17 | CIVL-TAG, where TAG is some version id string. This folder
|
|---|
| 18 | contains the following:
|
|---|
| 19 |
|
|---|
| 20 | - README : this file
|
|---|
| 21 | - bin : containing one executable sh script called "civl"
|
|---|
| 22 | - lib : containing civl-TAG.jar and native libraries
|
|---|
| 23 | used by CIVL
|
|---|
| 24 | - doc : containing some documentation about CIVL
|
|---|
| 25 | - licenses : licenses for CIVL and included libraries
|
|---|
| 26 | - examples : some example CIVL programs
|
|---|
| 27 |
|
|---|
| 28 | 4. For OS X, move the CIVL-TAG folder into /Applications. For
|
|---|
| 29 | linux, move it into /usr/local.
|
|---|
| 30 |
|
|---|
| 31 | 5. Put the civl script in your path however you like to put things
|
|---|
| 32 | in your path. Either move it to a directory in your path,
|
|---|
| 33 | or create a symlink to it, or edit your .profile or equivalent
|
|---|
| 34 | to put it in your path.
|
|---|
| 35 |
|
|---|
| 36 | Now you should be able to run CIVL from the command line by
|
|---|
| 37 | typing "civl <filename>". Type just "civl" for usage information.
|
|---|
| 38 |
|
|---|
| 39 | ------------------------- Source Installation -------------------------
|
|---|
| 40 |
|
|---|
| 41 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 42 |
|
|---|
| 43 | 1. Install the C front-end ABC, http://vsl.cis.udel.edu/abc,
|
|---|
| 44 | following the instructions in its INSTALL file for Eclipse
|
|---|
| 45 | installation. This should result in a project named ABC
|
|---|
| 46 | in your Eclipse workspace. Build the abc.jar from within
|
|---|
| 47 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 48 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 49 |
|
|---|
| 50 | 2. Install the symbolic algebra and reasoning library SARL,
|
|---|
| 51 | http://vsl.cis.udel.edu/sarl, following the instructions in
|
|---|
| 52 | its INSTALL file for Eclipse installation. This should
|
|---|
| 53 | result in a project named SARL in your Eclipse workspace.
|
|---|
| 54 | Build the sarl.jar from within Eclipse by right-clicking (or
|
|---|
| 55 | ctrl-clicking) on the build.xml file and selecting
|
|---|
| 56 | Run As->Ant Build.
|
|---|
| 57 |
|
|---|
| 58 | 3. Install the generic model checking utilities package GMC,
|
|---|
| 59 | http://vsl.cis.udel.edu/gmc in Eclipse. This one is pure
|
|---|
| 60 | Java, so is easy. This should result in a project named GMC
|
|---|
| 61 | in your Eclipse workspace. Build the gmc.jar from within Eclipse
|
|---|
| 62 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 63 | selecting Run As->Ant Build.
|
|---|
| 64 |
|
|---|
| 65 | 4. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 66 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 67 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 68 | the Eclipse project.)
|
|---|
| 69 |
|
|---|
| 70 | 5. Check out the trunk, and create the project using the New Java
|
|---|
| 71 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| 72 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 73 | a bunch of work.
|
|---|
| 74 |
|
|---|
| 75 | 6. Create a build.properties file as above. This is not needed
|
|---|
| 76 | by Eclipse, but you will want to use Ant to build the jar
|
|---|
| 77 | and other things.
|
|---|
| 78 |
|
|---|
| 79 | 7. The platform-specific information are handled in Eclipse by
|
|---|
| 80 | defining Classpath variables. Since you already followed the
|
|---|
| 81 | installation directions for ABC and SARL, you should have defined
|
|---|
| 82 | variables ANTLR, ANTLR_SOURCE (optional), CVC3, PCOLLECTIONS,
|
|---|
| 83 | PCOLLECTIONS_SOURCE (optional), and CLD-DS. Now define new variables
|
|---|
| 84 | ABC, SARL, and GMC to point to the jar files in the respective project
|
|---|
| 85 | directories.
|
|---|
| 86 |
|
|---|
| 87 | 8. Do a clean build by selecting "Clean...".
|
|---|
| 88 |
|
|---|
| 89 | 9. Run the JUnit test suite from within Eclipse: Go to Run->Run
|
|---|
| 90 | Configurations.... Create a new JUnit configuration. Name it CIVL
|
|---|
| 91 | Tests. Select "Run all tests in the selected project..." and
|
|---|
| 92 | navigate to the folder "test" in the CIVL project. The Test runner
|
|---|
| 93 | should be JUnit 4. Under the Arguments tab, type "-ea" (without the
|
|---|
| 94 | quotes) in the VM arguments area (to enable assertion checking).
|
|---|
| 95 | Under the Environment tab, add an entry for DYLD_LIBRARY_PATH (OS X)
|
|---|
| 96 | or LD_LIBRARY_PATH (linux). The value for this variable should be a
|
|---|
| 97 | colon-separated list of directories containing the CVC3 and libgmp
|
|---|
| 98 | shared libraries. You might want to put those shared libraries in one
|
|---|
| 99 | directory in a permanent place to simplify things. You can also
|
|---|
| 100 | define another Eclipse variable containing this colon-separated list
|
|---|
| 101 | and use the variable name for the value. You should now be able to
|
|---|
| 102 | run the tests by clicking "Run".
|
|---|
| 103 |
|
|---|
| 104 | 10. An example of how to set up a single test from within Eclipse:
|
|---|
| 105 | create a new Run Configuration via the Run->Run
|
|---|
| 106 | Configurations... menu. Create a new "Java Application"
|
|---|
| 107 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 108 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| 109 | set the Program arguments to "examples/barrier2.cvl" (without the
|
|---|
| 110 | quotes). Modify the VM arguments and the Environment as in the step
|
|---|
| 111 | above. You should now be able to run the test by clicking "Run".
|
|---|