| 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 prerequisite projects ABC, SARL and GMC.
|
|---|
| 44 | Make sure that the three projects are put in the same
|
|---|
| 45 | directory "workspace" (you can use any other name).
|
|---|
| 46 |
|
|---|
| 47 | a. Install the C front-end ABC, http://vsl.cis.udel.edu/abc,
|
|---|
| 48 | following the instructions in its INSTALL file for Eclipse
|
|---|
| 49 | installation. This should result in a project named ABC
|
|---|
| 50 | in your Eclipse workspace. Build the abc.jar from within
|
|---|
| 51 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 52 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 53 |
|
|---|
| 54 | b. Install the symbolic algebra and reasoning library SARL,
|
|---|
| 55 | http://vsl.cis.udel.edu/sarl, following the instructions in
|
|---|
| 56 | its INSTALL file for Eclipse installation. This should
|
|---|
| 57 | result in a project named SARL in your Eclipse workspace.
|
|---|
| 58 | Build the sarl.jar from within Eclipse by right-clicking (or
|
|---|
| 59 | ctrl-clicking) on the build.xml file and selecting
|
|---|
| 60 | Run As->Ant Build.
|
|---|
| 61 |
|
|---|
| 62 | c. Install the generic model checking utilities package GMC,
|
|---|
| 63 | http://vsl.cis.udel.edu/gmc in Eclipse. This one is pure
|
|---|
| 64 | Java, so is easy. This should result in a project named GMC
|
|---|
| 65 | in your Eclipse workspace. Build the gmc.jar from within Eclipse
|
|---|
| 66 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 67 | selecting Run As->Ant Build.
|
|---|
| 68 |
|
|---|
| 69 | 2. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 70 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 71 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 72 | the Eclipse project.)
|
|---|
| 73 |
|
|---|
| 74 | 3. Check out the trunk, and create the project using the New Java
|
|---|
| 75 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| 76 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 77 | a bunch of work.
|
|---|
| 78 |
|
|---|
| 79 | 4. Link prerequisite projects (ABC, SARL, GMC) to CIVL project.
|
|---|
| 80 | Select the project CIVL, right click, and select "Properties".
|
|---|
| 81 | In the Properties window, click Java Build Path on the left,
|
|---|
| 82 | and go to the tab “Projects”. Click Add…, and choose the projects
|
|---|
| 83 | “ABC”, “GMC” and “SARL”, then click OK.
|
|---|
| 84 |
|
|---|
| 85 | 5. Download and prepare dependent packages.
|
|---|
| 86 |
|
|---|
| 87 | a. If you are using 64-bit mac os, 64-bit linux or 32-bit linux,
|
|---|
| 88 | download the tgz archives from
|
|---|
| 89 | http://vsl.cis.udel.edu/tools/vsl_depend
|
|---|
| 90 | and unzip it some where on your system.
|
|---|
| 91 |
|
|---|
| 92 | b. Otherwise, point your web browser to http://vsl.cis.udel.edu/tools
|
|---|
| 93 | and download the following:
|
|---|
| 94 | hamcrest-core-1.3.jar
|
|---|
| 95 | jacoco.tgz
|
|---|
| 96 | junit-4.11.jar
|
|---|
| 97 | Put these files somewhere on your system and untar the Jacoco archive
|
|---|
| 98 |
|
|---|
| 99 | 6. Create a file named build.properties in the directory where build.xml is in.
|
|---|
| 100 | This is not needed by Eclipse, but you will want to use Ant to build the jar
|
|---|
| 101 | and other things.
|
|---|
| 102 |
|
|---|
| 103 | a. If you are using 64-bit mac os, 64-bit linux or 32-bit linux,
|
|---|
| 104 | copy and paste the content from
|
|---|
| 105 | properties/build.properties.osx. Edit the entry "root" to point to the
|
|---|
| 106 | corresponding directory that you download at step 6.a.
|
|---|
| 107 |
|
|---|
| 108 | b. Otherwise, copy and edit one of the examples in the properties directory.
|
|---|
| 109 | Edit each entry to point to the corresponding items you downloaded in step 6.b.
|
|---|
| 110 |
|
|---|
| 111 | 7. The platform-specific information are handled in Eclipse by defining Classpath variables.
|
|---|
| 112 |
|
|---|
| 113 | a. If you have put all dependent packages in one directory
|
|---|
| 114 | (http://vsl.cis.udel.edu/tools/vsl_depend_osx.tgz), there is
|
|---|
| 115 | only one class path variable that needs to be modified.
|
|---|
| 116 | Go to Preferences -> Java -> Build Path -> Classpath Variables,
|
|---|
| 117 | and edit the entry “VSL_DEPEND” to point to the directory
|
|---|
| 118 | where you put the dependent packages.
|
|---|
| 119 |
|
|---|
| 120 | b. Otherwise, since you already followed the installation directions
|
|---|
| 121 | for ABC and SARL, you should have defined variables ANTLR,
|
|---|
| 122 | ANTLR_SOURCE (optional), CVC3, PCOLLECTIONS, PCOLLECTIONS_SOURCE (optional),
|
|---|
| 123 | and CLD-DS.
|
|---|
| 124 |
|
|---|
| 125 | 8. Do a clean build by selecting "Clean...".
|
|---|
| 126 |
|
|---|
| 127 | 9. Run the JUnit test suite from within Eclipse: Go to Run->Run
|
|---|
| 128 | Configurations.... Create a new JUnit configuration. Name it CIVL
|
|---|
| 129 | Tests. Select "Run all tests in the selected project..." and
|
|---|
| 130 | navigate to the folder "test" in the CIVL project. The Test runner
|
|---|
| 131 | should be JUnit 4. Under the Arguments tab, type "-ea" (without the
|
|---|
| 132 | quotes) in the VM arguments area (to enable assertion checking).
|
|---|
| 133 | Under the Environment tab, add an entry for DYLD_LIBRARY_PATH (OS X)
|
|---|
| 134 | or LD_LIBRARY_PATH (linux). The value for this variable should be a
|
|---|
| 135 | colon-separated list of directories containing the CVC3 and libgmp
|
|---|
| 136 | shared libraries. You might want to put those shared libraries in one
|
|---|
| 137 | directory in a permanent place to simplify things. You can also
|
|---|
| 138 | define another Eclipse variable containing this colon-separated list
|
|---|
| 139 | and use the variable name for the value. You should now be able to
|
|---|
| 140 | run the tests by clicking "Run".
|
|---|
| 141 |
|
|---|
| 142 | 10. An example of how to set up a single test from within Eclipse:
|
|---|
| 143 | create a new Run Configuration via the Run->Run
|
|---|
| 144 | Configurations... menu. Create a new "Java Application"
|
|---|
| 145 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 146 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| 147 | set the Program arguments to "examples/barrier2.cvl" (without the
|
|---|
| 148 | quotes). Modify the VM arguments and the Environment as in the step
|
|---|
| 149 | above. You should now be able to run the test by clicking "Run".
|
|---|