| 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. If you already have the VSL dependencies library, you may
|
|---|
| 13 | skip this step. Otherwise, download the archive of VSL
|
|---|
| 14 | dependencies from http://vsl.cis.udel.edu/tools/vsl_depend,
|
|---|
| 15 | choosing the version for your OS type (32-bit linux,
|
|---|
| 16 | 64-bit linux, or 64-bit OS X). Unzip and untar the
|
|---|
| 17 | downloaded .tgz file and you will have a folder named "vsl".
|
|---|
| 18 | If you do not already have a directory /opt, create one with
|
|---|
| 19 | "mkdir /opt". Move vsl into /opt. Use sudo as needed.
|
|---|
| 20 |
|
|---|
| 21 | 3. Download the approrpriate CIVL distribution from
|
|---|
| 22 | http://vsl.cis.udel.edu/civl.
|
|---|
| 23 |
|
|---|
| 24 | 4. Unzip and untar the downloaded file if this does not happen
|
|---|
| 25 | automatically. This should result in a folder named
|
|---|
| 26 | CIVL-TAG, where TAG is some version id string. This folder
|
|---|
| 27 | contains the following:
|
|---|
| 28 |
|
|---|
| 29 | - README : this file
|
|---|
| 30 | - bin : containing one executable sh script called "civl"
|
|---|
| 31 | - lib : containing civl-TAG.jar
|
|---|
| 32 | - doc : containing some documentation about CIVL
|
|---|
| 33 | - licenses : licenses for CIVL and included libraries
|
|---|
| 34 | - examples : some example CIVL programs
|
|---|
| 35 |
|
|---|
| 36 | 5. Move CIVL-TAG into /opt.
|
|---|
| 37 |
|
|---|
| 38 | 6. Put the civl script in your path however you like to put things
|
|---|
| 39 | in your path. Either move it to a directory in your path,
|
|---|
| 40 | or create a symlink to it, or edit your .profile or equivalent
|
|---|
| 41 | to put it in your path.
|
|---|
| 42 |
|
|---|
| 43 | Now you should be able to run CIVL from the command line by
|
|---|
| 44 | typing "civl <filename>". Type just "civl" for usage information.
|
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
|
|---|
| 48 | ------------------------- Source Installation -------------------------
|
|---|
| 49 |
|
|---|
| 50 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 51 |
|
|---|
| 52 | 1. Install prerequisite projects ABC, SARL and GMC.
|
|---|
| 53 | Make sure that the three projects are put in the workspace
|
|---|
| 54 | directory where CIVL will be put.
|
|---|
| 55 |
|
|---|
| 56 | a. Install the C front-end ABC, http://vsl.cis.udel.edu/abc,
|
|---|
| 57 | following the instructions in its INSTALL file for Eclipse
|
|---|
| 58 | installation. This should result in a project named ABC
|
|---|
| 59 | in your Eclipse workspace. Build the abc.jar from within
|
|---|
| 60 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 61 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 62 |
|
|---|
| 63 | b. Install the symbolic algebra and reasoning library SARL,
|
|---|
| 64 | http://vsl.cis.udel.edu/sarl, following the instructions in
|
|---|
| 65 | its INSTALL file for Eclipse installation. This should
|
|---|
| 66 | result in a project named SARL in your Eclipse workspace.
|
|---|
| 67 | Build the sarl.jar from within Eclipse by right-clicking (or
|
|---|
| 68 | ctrl-clicking) on the build.xml file and selecting
|
|---|
| 69 | Run As->Ant Build.
|
|---|
| 70 |
|
|---|
| 71 | c. Install the generic model checking utilities package GMC,
|
|---|
| 72 | http://vsl.cis.udel.edu/gmc in Eclipse. This one is pure
|
|---|
| 73 | Java, so is easy. This should result in a project named GMC
|
|---|
| 74 | in your Eclipse workspace. Build the gmc.jar from within Eclipse
|
|---|
| 75 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 76 | selecting Run As->Ant Build.
|
|---|
| 77 |
|
|---|
| 78 | 2. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 79 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 80 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 81 | the Eclipse project.)
|
|---|
| 82 |
|
|---|
| 83 | 3. Check out the trunk, and create the project using the New Java
|
|---|
| 84 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| 85 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 86 | a bunch of work.
|
|---|
| 87 |
|
|---|
| 88 | 4. Download the tgz archive of VSL dependencies from
|
|---|
| 89 | http://vsl.cis.udel.edu/tools/vsl_depend,
|
|---|
| 90 | choosing the right .tgz according to your platform:
|
|---|
| 91 |
|
|---|
| 92 | vsl_linux32-1.0.tgz - 32-bit linux
|
|---|
| 93 | vsl_linux64-1.0.tgz - 64-bit linux
|
|---|
| 94 | vsl_osx64-1.0.tgz - 64-bit osx
|
|---|
| 95 |
|
|---|
| 96 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| 97 | Move vsl to /opt (you might need to use sudo for this.
|
|---|
| 98 | Also, if you don't already have a directory called /opt,
|
|---|
| 99 | you will have to create it with mkdir /opt).
|
|---|
| 100 |
|
|---|
| 101 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| 102 | unzipped it automatically to a .tar file) in the directory $Download.
|
|---|
| 103 | You can use the following commands:
|
|---|
| 104 |
|
|---|
| 105 | $ cd $Download
|
|---|
| 106 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 107 | $ sudo mv vsl /opt
|
|---|
| 108 |
|
|---|
| 109 | Now you can type "ls /opt/vsl", and the output should be
|
|---|
| 110 |
|
|---|
| 111 | README.txt lib licenses src
|
|---|
| 112 |
|
|---|
| 113 | 5. Create a file build.properties in the directory where build.xml is in.
|
|---|
| 114 | Copy and paste the content from properties/build.properties.osx or
|
|---|
| 115 | properties/build.properties.linux depending on your platform.
|
|---|
| 116 | If your workspace directory is the default setting of Eclipse,
|
|---|
| 117 | i.e., HOME/Documents/workspace for osx or HOME/workspace for linux,
|
|---|
| 118 | then you dont have to anything.
|
|---|
| 119 | Otherwise, you need to edit the entry "workspace" to point to the
|
|---|
| 120 | corresponding directory where you put the projects ABC, SARL and GMC.
|
|---|
| 121 |
|
|---|
| 122 | 6. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| 123 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| 124 | and specify its value to be /opt/vsl. Navigate to Preferences -> Run/Debug
|
|---|
| 125 | -> String Substitution -> New, and then define an entry vsl_lib and
|
|---|
| 126 | set its value to be /opt/vsl/lib.
|
|---|
| 127 |
|
|---|
| 128 | 7. Do a clean build. Everything should compile. Generate the civl.jar
|
|---|
| 129 | by right-clicking (or ctrl-click on OS X) the build.xml file and
|
|---|
| 130 | Run As->Ant Build.
|
|---|
| 131 |
|
|---|
| 132 | 8. Go to Run->Run Configurations.... Create a new JUnit configuration.
|
|---|
| 133 | Name it CIVL Tests. Select "Run all tests in the selected project..."
|
|---|
| 134 | and navigate to the folder "test" in the CIVL project.
|
|---|
| 135 | The Test runner should be JUnit 4. Under the Arguments tab, type
|
|---|
| 136 | "-ea" (without the quotes) in the VM arguments area (to enable assertion
|
|---|
| 137 | checking). Under the Environment tab, create an entry
|
|---|
| 138 | DYLD_LIBRARY_PATH (OS X) or LD_LIBRARY_PATH (linux),
|
|---|
| 139 | specify its value by clicking Variables and choose vsl_lib from the list,
|
|---|
| 140 | or you may type ${vsl_lib} in the value entry.
|
|---|
| 141 |
|
|---|
| 142 | 9. 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".
|
|---|