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