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