| [c7a0783] | 1 | CIVL: The Concurrency Intermediate Verification Language
|
|---|
| [f98a017] | 2 | v1.15.1
|
|---|
| [c7a0783] | 3 |
|
|---|
| 4 | ------------------------------ Overview -------------------------------
|
|---|
| 5 |
|
|---|
| [3783023] | 6 | CIVL is a framework encompassing...
|
|---|
| [c7a0783] | 7 |
|
|---|
| 8 | * a programming language, CIVL-C, which adds to C a number of
|
|---|
| [9e3a674] | 9 | concurrency primitives, as well as the ability to define
|
|---|
| 10 | functions in any scope. Together, these features make for
|
|---|
| 11 | a very expressive concurrent language that can faithfully
|
|---|
| 12 | represent programs using various APIs and parallel languages,
|
|---|
| [dcde04a] | 13 | such as MPI, OpenMP, Pthread, CUDA, and Chapel. CIVL-C also
|
|---|
| 14 | provides a number of primitives supporting verification.
|
|---|
| [9e3a674] | 15 | * a model checker which uses symbolic execution to verify a
|
|---|
| 16 | number of safety properties of CIVL-C programs. The model
|
|---|
| 17 | checker can also be used to verify that two CIVL-C programs
|
|---|
| 18 | are functionally equivalent.
|
|---|
| [c7a0783] | 19 | * a number of translators from various commonly-used languages
|
|---|
| 20 | and APIs to CIVL-C. (This part is still a work in progress.)
|
|---|
| 21 |
|
|---|
| 22 | CIVL is developed by the Verified Software Laboratory at the
|
|---|
| 23 | University of Delaware Department of Computer Science.
|
|---|
| 24 | For more information, visit http://vsl.cis.udel.edu/civl
|
|---|
| 25 |
|
|---|
| [c7cef4b] | 26 | Active Developers:
|
|---|
| [5af87592] | 27 | Matthew B. Dwyer
|
|---|
| [9381b33] | 28 | Mitchell Gerrard
|
|---|
| [5af87592] | 29 | Ziqing Luo
|
|---|
| [c7a0783] | 30 | Stephen F. Siegel
|
|---|
| [c7cef4b] | 31 | Wenhao Wu
|
|---|
| 32 | Yihao Yan
|
|---|
| 33 |
|
|---|
| 34 | Inactive Developers:
|
|---|
| 35 | John Edenhofner
|
|---|
| 36 | Andre Marianiello
|
|---|
| 37 | Michael Rogers
|
|---|
| [5af87592] | 38 | Timothy K. Zirkel
|
|---|
| [8a2a9d2] | 39 | Si Li
|
|---|
| 40 | Manchun Zheng
|
|---|
| [c7a0783] | 41 |
|
|---|
| [8d0a007] | 42 | ------------------------------- License -------------------------------
|
|---|
| 43 |
|
|---|
| 44 | CIVL is open source software distributed under the GNU
|
|---|
| 45 | General Public License. However, the libraries used by CIVL
|
|---|
| 46 | (and incorporated into the complete distribution) use various
|
|---|
| 47 | licenses. See directory licenses for the license of each component.
|
|---|
| 48 |
|
|---|
| [d5bcd36] | 49 |
|
|---|
| [f98a017] | 50 | -------------------------- Updates from v1.15 -------------------------
|
|---|
| 51 | -- fixed an important bug related to cache of scope values
|
|---|
| 52 | -- fixed bugs related to math functions in Fortran programs
|
|---|
| [26bb514] | 53 |
|
|---|
| [ae48dce] | 54 |
|
|---|
| [8d0a007] | 55 | ------------------------- Binary Installation -------------------------
|
|---|
| [c7a0783] | 56 |
|
|---|
| [be6d877] | 57 | For most users, this will be the easiest way to install and
|
|---|
| 58 | use CIVL. Developers should instead follow the instructions for
|
|---|
| [bb733f2] | 59 | "Source Installation" below.
|
|---|
| [583119f] | 60 |
|
|---|
| [be6d877] | 61 | 1. Install at least one of the theorem provers below.
|
|---|
| [536af01] | 62 | The more provers you install, the more precise CIVL analysis will
|
|---|
| [be6d877] | 63 | be. Note that CIVL only requires the binary executable
|
|---|
| 64 | version of each prover; you can ignore the libraries, various
|
|---|
| 65 | API bindings, etc. You just need to ensure that
|
|---|
| 66 | each binary executable is in your PATH when you run
|
|---|
| 67 | "civl config". The currently supported provers are:
|
|---|
| [bb733f2] | 68 |
|
|---|
| [be6d877] | 69 | - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
|
|---|
| 70 | download the latest, optimized build with static library
|
|---|
| 71 | and executable for your OS. Place the executable file
|
|---|
| 72 | "cvc3" in your PATH. You can discard everything else.
|
|---|
| 73 | Alternatively, on some linux systems, CVC3 can be installed
|
|---|
| 74 | using the package manager via "sudo apt-get install cvc3".
|
|---|
| 75 | This will place cvc3 in /usr/bin.
|
|---|
| 76 |
|
|---|
| 77 | - CVC4, http://cvc4.cs.nyu.edu/downloads/
|
|---|
| 78 |
|
|---|
| 79 | - Z3, http://z3.codeplex.com/SourceControl/latest
|
|---|
| [bb733f2] | 80 |
|
|---|
| [20b16d5] | 81 | 2. Install a Java 8 SDK if you have not already. Go to
|
|---|
| [bb733f2] | 82 |
|
|---|
| 83 | http://www.oracle.com/technetwork/java/javase/downloads/
|
|---|
| 84 |
|
|---|
| 85 | for the latest from Oracle. On linux, you can instead use
|
|---|
| 86 | the package manager:
|
|---|
| 87 |
|
|---|
| [20b16d5] | 88 | sudo apt-get install openjdk-8-jdk
|
|---|
| [bb733f2] | 89 |
|
|---|
| [be6d877] | 90 | 3. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
|
|---|
| [bb733f2] | 91 |
|
|---|
| [be6d877] | 92 | 4. Unzip and untar the CIVL distribution file if this
|
|---|
| 93 | does not happen automatically. This should result in a
|
|---|
| 94 | folder named CIVL-TAG, where TAG is some version ID string.
|
|---|
| 95 | This folder contains the following:
|
|---|
| [c7a0783] | 96 |
|
|---|
| [6f2b49d] | 97 | - README : this file
|
|---|
| 98 | - bin : containing one executable sh script called "civl"
|
|---|
| 99 | - lib : containing civl-TAG.jar
|
|---|
| 100 | - doc : containing the manual and the tutorial of CIVL
|
|---|
| [bb733f2] | 101 | - emacs : CIVL-C emacs mode and its installation instructions
|
|---|
| [c7a0783] | 102 | - licenses : licenses for CIVL and included libraries
|
|---|
| 103 | - examples : some example CIVL programs
|
|---|
| 104 |
|
|---|
| [536af01] | 105 | 5. You can move the CIVL folder wherever you want.
|
|---|
| 106 | The JAR file in the lib directory is all you need to run CIVL.
|
|---|
| 107 | You may also move this jar file wherever you want. You
|
|---|
| 108 | run CIVL by typing a command that begins
|
|---|
| 109 | "java -jar /path/to/civl-TAG.jar ...". For convenience
|
|---|
| 110 | you may instead use the shell script "civl" in bin,
|
|---|
| 111 | which allows you to replace "java -jar /path/to/civl-TAG.jar"
|
|---|
| 112 | with just "civl" on the command line. Simply edit the civl script
|
|---|
| 113 | to reflect the path to civl-TAG.jar and place the script
|
|---|
| 114 | somewhere in your PATH. Alternatively, you can just define
|
|---|
| 115 | an alias in your .profile, .bash_profile, or equivalent, such as
|
|---|
| [583119f] | 116 |
|
|---|
| [536af01] | 117 | alias civl='java -jar /path/to/civl-TAG.jar'
|
|---|
| [583119f] | 118 |
|
|---|
| [536af01] | 119 | In the following, we will assume that you have defined
|
|---|
| 120 | a command "civl" in one these ways.
|
|---|
| 121 |
|
|---|
| 122 | 6. Type "civl config". This should report that it found
|
|---|
| [be6d877] | 123 | the theorem provers you installed (and are in your PATH).
|
|---|
| 124 | It should create a file called ".sarl" in your home directory
|
|---|
| 125 | which you can also edit by hand.
|
|---|
| [bb733f2] | 126 |
|
|---|
| 127 |
|
|---|
| [8d0a007] | 128 | ------------------------- Source Installation -------------------------
|
|---|
| 129 |
|
|---|
| 130 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 131 |
|
|---|
| [be6d877] | 132 | 0. Install theorem provers following the directions above.
|
|---|
| [bb733f2] | 133 | Install Eclipse IDE for Java/EE developers if you have not already
|
|---|
| 134 | done so.
|
|---|
| 135 |
|
|---|
| [83c054c] | 136 | 1. Install an SVN plugin in Eclipse (such as Subversive) if you have
|
|---|
| 137 | not already.
|
|---|
| 138 |
|
|---|
| 139 | 2. Install prerequisite projects ABC, SARL and GMC.
|
|---|
| [8d0a007] | 140 | Make sure that the three projects are put in the workspace
|
|---|
| [536af01] | 141 | directory where CIVL will be created. Specifically:
|
|---|
| [8d0a007] | 142 |
|
|---|
| [ae48dce] | 143 | a. Install the symbolic algebra and reasoning library SARL.
|
|---|
| 144 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 145 | svn://vsl.cis.udel.edu/sarl. After entering that, open it
|
|---|
| 146 | up and select the "trunk". After checking out trunk, name
|
|---|
| 147 | the project "SARL". Then follow the instructions in the INSTALL
|
|---|
| 148 | file for Eclipse installation. Build the sarl.jar from within
|
|---|
| 149 | Eclipse by right-clicking (or ctrl-clicking) on the build.xml
|
|---|
| 150 | file and selecting Run As->Ant Build.
|
|---|
| 151 |
|
|---|
| 152 | b. Install the C front-end ABC. In Eclipse,
|
|---|
| [8d0a007] | 153 | select New Project...from SVN, use the archive
|
|---|
| 154 | svn://vsl.cis.udel.edu/abc. After entering that, open it
|
|---|
| 155 | up and select the "trunk". After checking out trunk, name
|
|---|
| 156 | the project "ABC". Then follow the instructions in the INSTALL
|
|---|
| 157 | file for Eclipse installation. Build the abc.jar from within
|
|---|
| 158 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 159 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 160 |
|
|---|
| [ae48dce] | 161 | c. Install the generic model checking utilities package GMC.
|
|---|
| [8d0a007] | 162 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 163 | svn://vsl.cis.udel.edu/gmc. After entering that, open it
|
|---|
| 164 | up and select the "trunk". After checking out trunk, name
|
|---|
| 165 | the project "GMC". Build the gmc.jar from within Eclipse
|
|---|
| 166 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 167 | selecting Run As->Ant Build.
|
|---|
| 168 |
|
|---|
| [83c054c] | 169 | 3. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| [148cbce] | 170 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 171 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 172 | the Eclipse project.)
|
|---|
| [8d0a007] | 173 |
|
|---|
| [83c054c] | 174 | 4. Check out the trunk, and create the project using the New Java
|
|---|
| [148cbce] | 175 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| [be6d877] | 176 | and other Eclipse meta-data are already in the SVN archive,
|
|---|
| 177 | saving you a bunch of work.
|
|---|
| [8d0a007] | 178 |
|
|---|
| [83c054c] | 179 | 5. If you already have the VSL dependencies library, you may
|
|---|
| [be6d877] | 180 | skip this step. Otherwise, download the tgz archive of VSL
|
|---|
| [003a8b3] | 181 | dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
|
|---|
| [8d0a007] | 182 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| [536af01] | 183 | Move vsl to /opt.
|
|---|
| 184 | Note: you probably will need to use sudo for this.
|
|---|
| [8d0a007] | 185 | Also, if you don't already have a directory called /opt,
|
|---|
| [536af01] | 186 | you will have to create it with "mkdir /opt". Also, if you
|
|---|
| 187 | don't want to use /opt for some reason, you can use any
|
|---|
| 188 | directory you want; just modify the instructions below
|
|---|
| 189 | accordingly.
|
|---|
| [8d0a007] | 190 |
|
|---|
| 191 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| [85b7e48] | 192 | unzipped it automatically to a .tar file) in the directory DOWNLOAD.
|
|---|
| [8d0a007] | 193 | You can use the following commands:
|
|---|
| 194 |
|
|---|
| [85b7e48] | 195 | $ cd DOWNLOAD
|
|---|
| [8d0a007] | 196 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 197 | $ sudo mv vsl /opt
|
|---|
| 198 |
|
|---|
| [be6d877] | 199 | (Leave out the "x" in the tar command if the file was already
|
|---|
| 200 | unzipped.) Now you can type "ls /opt/vsl", and the output
|
|---|
| 201 | should be
|
|---|
| [8d0a007] | 202 |
|
|---|
| 203 | README.txt lib licenses src
|
|---|
| 204 |
|
|---|
| [83c054c] | 205 | 6. If default_build.properties matches the configuration of your system,
|
|---|
| [c1c00b6] | 206 | then you can skip this step. Otherwise, you may need to create a file
|
|---|
| [be6d877] | 207 | build.properties in the directory containing build.xml.
|
|---|
| [c1c00b6] | 208 | Copy and paste the content from any file under properties, edit each
|
|---|
| 209 | entry with the path configured in your system. The newly created file
|
|---|
| [536af01] | 210 | build.properties will automatically be used by ant to to build the
|
|---|
| 211 | .jar file.
|
|---|
| [8d0a007] | 212 |
|
|---|
| [83c054c] | 213 | 7. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| [8d0a007] | 214 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| [be6d877] | 215 | and specify its value to be /opt/vsl.
|
|---|
| [8d0a007] | 216 |
|
|---|
| [83c054c] | 217 | 8. Do a clean build. Everything should compile. Generate the civl.jar
|
|---|
| [8d0a007] | 218 | by right-clicking (or ctrl-click on OS X) the build.xml file and
|
|---|
| [be6d877] | 219 | Run As->Ant Build.
|
|---|
| 220 |
|
|---|
| [e8576bf] | 221 | 9. Shortcuts for running CIVL
|
|---|
| 222 |
|
|---|
| 223 | Somewhere on your system, create a plain text file containing
|
|---|
| [be6d877] | 224 | exactly the following two lines:
|
|---|
| 225 |
|
|---|
| 226 | #!/bin/sh
|
|---|
| 227 | java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
|
|---|
| 228 |
|
|---|
| 229 | where "/Path/To/Your/workspace" is replaced with the path
|
|---|
| 230 | to your Eclipse workspace directory. Name this file "civl",
|
|---|
| 231 | put it in your PATH, and make it executable (chmod ugo+x civl).
|
|---|
| 232 |
|
|---|
| 233 | 10. From a terminal window, execute "civl config". This should
|
|---|
| 234 | find the theorem provers in your PATH and create a file
|
|---|
| 235 | .sarl in your home directory.
|
|---|
| 236 |
|
|---|
| 237 | 11. In Eclipse, navigate to "Run->Run Configurations... Create a new
|
|---|
| 238 | JUnit configuration."
|
|---|
| 239 | Name it "CIVL Regression Tests". Select "Run all tests in the
|
|---|
| 240 | selected project..." and navigate to the folder "test/regress"
|
|---|
| 241 | in the CIVL project. The Test runner should be JUnit 4. Under the
|
|---|
| 242 | Arguments tab, type "-ea" (without the quotes) in the VM arguments
|
|---|
| 243 | area (to enable assertion checking).
|
|---|
| 244 |
|
|---|
| 245 | 12. An example of how to set up a single test from within Eclipse:
|
|---|
| [8d0a007] | 246 | create a new Run Configuration via the Run->Run
|
|---|
| 247 | Configurations... menu. Create a new "Java Application"
|
|---|
| 248 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 249 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| [be6d877] | 250 | set the Program arguments to
|
|---|
| 251 |
|
|---|
| 252 | verify examples/concurrency/barrier2.cvl
|
|---|
| 253 |
|
|---|
| 254 | Modify the VM arguments as in the step above. You should now be
|
|---|
| 255 | able to run the test by clicking "Run".
|
|---|
| [536af01] | 256 |
|
|---|
| [a6d2043] | 257 |
|
|---|
| 258 | |
|---|