| [c7a0783] | 1 | CIVL: The Concurrency Intermediate Verification Language
|
|---|
| [bb733f2] | 2 | v0.15
|
|---|
| [c7a0783] | 3 |
|
|---|
| 4 | ------------------------------ Overview -------------------------------
|
|---|
| 5 |
|
|---|
| 6 | CIVL is a framework encompassing...
|
|---|
| 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,
|
|---|
| 13 | such as MPI, OpenMP, CUDA, and Chapel. CIVL-C also provides
|
|---|
| 14 | a number of primitives supporting verification.
|
|---|
| 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 |
|
|---|
| 26 | Developers:
|
|---|
| 27 |
|
|---|
| [5af87592] | 28 | Matthew B. Dwyer
|
|---|
| 29 | Ziqing Luo
|
|---|
| 30 | Michael Rogers
|
|---|
| [c7a0783] | 31 | Stephen F. Siegel
|
|---|
| [8d0a007] | 32 | Manchun Zheng
|
|---|
| [5af87592] | 33 | Timothy K. Zirkel
|
|---|
| [c7a0783] | 34 |
|
|---|
| [8d0a007] | 35 | ------------------------------- License -------------------------------
|
|---|
| 36 |
|
|---|
| 37 | CIVL is open source software distributed under the GNU
|
|---|
| 38 | General Public License. However, the libraries used by CIVL
|
|---|
| 39 | (and incorporated into the complete distribution) use various
|
|---|
| 40 | licenses. See directory licenses for the license of each component.
|
|---|
| 41 |
|
|---|
| [d534063] | 42 | -------------------------- Updates from v 0.14 -------------------------
|
|---|
| 43 |
|
|---|
| 44 | 1. Fixed the bug that erroneously checking mpi processes statuses inside communicators
|
|---|
| 45 |
|
|---|
| 46 | 2. Fixed the bug that invalid command line inputs crash CIVL.
|
|---|
| 47 |
|
|---|
| 48 | 3. Fixed the bug that CIVL mis-handling float-to-int conversion.
|
|---|
| 49 |
|
|---|
| 50 | 4. Fixed the bug that Translation will ignore unused variable erroneously.
|
|---|
| 51 |
|
|---|
| 52 | 5. Fixed the bug that CIVL implementation misses extents information for literal array assignments.
|
|---|
| 53 |
|
|---|
| 54 | 6. Fixed the bug that CIVL didn't report array out of bound error.
|
|---|
| 55 |
|
|---|
| 56 | 7. Fixed performance bug dealing with MPI/link.
|
|---|
| 57 |
|
|---|
| 58 | 8. Fixed the bug that POR didn't recognize input array.
|
|---|
| 59 |
|
|---|
| 60 | 9. Fixed the bug that ABC can't print $forall.
|
|---|
| 61 |
|
|---|
| 62 | 10. Fixed the bug of linkage with bound variables.
|
|---|
| 63 |
|
|---|
| 64 | 11. Improving CIVL by get rid of unnecessary statements enabled from a nondeterministic statement.
|
|---|
| 65 |
|
|---|
| 66 | 12. Support compound literals for input variables.
|
|---|
| 67 |
|
|---|
| 68 | 13. Improves the performance of SARL which also makes CIVL run faster.
|
|---|
| 69 |
|
|---|
| 70 | 14. Makes sources of inserted texts by transformer more clear.
|
|---|
| 71 |
|
|---|
| 72 | 15. Support time.h
|
|---|
| 73 |
|
|---|
| 74 | 16. Implemented fflush()
|
|---|
| 75 |
|
|---|
| 76 | 17. Extended ABC to handle Cuda-c extensions.
|
|---|
| 77 |
|
|---|
| 78 | 18. Simplify array representation in SARL.
|
|---|
| 79 |
|
|---|
| [ae48dce] | 80 |
|
|---|
| 81 |
|
|---|
| [8d0a007] | 82 | ------------------------- Binary Installation -------------------------
|
|---|
| [c7a0783] | 83 |
|
|---|
| [be6d877] | 84 | For most users, this will be the easiest way to install and
|
|---|
| 85 | use CIVL. Developers should instead follow the instructions for
|
|---|
| [bb733f2] | 86 | "Source Installation" below.
|
|---|
| [583119f] | 87 |
|
|---|
| [be6d877] | 88 | 1. Install at least one of the theorem provers below.
|
|---|
| 89 | The more you install, the more precise CIVL analysis will
|
|---|
| 90 | be. Note that CIVL only requires the binary executable
|
|---|
| 91 | version of each prover; you can ignore the libraries, various
|
|---|
| 92 | API bindings, etc. You just need to ensure that
|
|---|
| 93 | each binary executable is in your PATH when you run
|
|---|
| 94 | "civl config". The currently supported provers are:
|
|---|
| [bb733f2] | 95 |
|
|---|
| [be6d877] | 96 | - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
|
|---|
| 97 | download the latest, optimized build with static library
|
|---|
| 98 | and executable for your OS. Place the executable file
|
|---|
| 99 | "cvc3" in your PATH. You can discard everything else.
|
|---|
| 100 | Alternatively, on some linux systems, CVC3 can be installed
|
|---|
| 101 | using the package manager via "sudo apt-get install cvc3".
|
|---|
| 102 | This will place cvc3 in /usr/bin.
|
|---|
| 103 |
|
|---|
| 104 | - CVC4, http://cvc4.cs.nyu.edu/downloads/
|
|---|
| 105 |
|
|---|
| 106 | - Z3, http://z3.codeplex.com/SourceControl/latest
|
|---|
| [bb733f2] | 107 |
|
|---|
| [be6d877] | 108 | 2. Install a Java 7 SDK if you have not already. Go to
|
|---|
| [bb733f2] | 109 |
|
|---|
| 110 | http://www.oracle.com/technetwork/java/javase/downloads/
|
|---|
| 111 |
|
|---|
| 112 | for the latest from Oracle. On linux, you can instead use
|
|---|
| 113 | the package manager:
|
|---|
| 114 |
|
|---|
| 115 | sudo apt-get install openjdk-7-jdk
|
|---|
| 116 |
|
|---|
| [be6d877] | 117 | 3. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
|
|---|
| [bb733f2] | 118 |
|
|---|
| [be6d877] | 119 | 4. Unzip and untar the CIVL distribution file if this
|
|---|
| 120 | does not happen automatically. This should result in a
|
|---|
| 121 | folder named CIVL-TAG, where TAG is some version ID string.
|
|---|
| 122 | This folder contains the following:
|
|---|
| [c7a0783] | 123 |
|
|---|
| [6f2b49d] | 124 | - README : this file
|
|---|
| 125 | - bin : containing one executable sh script called "civl"
|
|---|
| 126 | - lib : containing civl-TAG.jar
|
|---|
| 127 | - doc : containing the manual and the tutorial of CIVL
|
|---|
| [bb733f2] | 128 | - emacs : CIVL-C emacs mode and its installation instructions
|
|---|
| [c7a0783] | 129 | - licenses : licenses for CIVL and included libraries
|
|---|
| 130 | - examples : some example CIVL programs
|
|---|
| 131 |
|
|---|
| [be6d877] | 132 | 5. Move CIVL-TAG into /opt. Alternatively, if you don't want to
|
|---|
| [bb733f2] | 133 | put it in /opt for some reason, put CIVL-TAG wherever you want
|
|---|
| 134 | and edit the script (bin/civl) to reflect the chosen path.
|
|---|
| [583119f] | 135 |
|
|---|
| [be6d877] | 136 | 6. Put the script bin/civl in your path however you like to
|
|---|
| 137 | put things in your path. Either move it to a directory
|
|---|
| 138 | in your path, or create a symlink to it, or edit your .profile
|
|---|
| 139 | or equivalent to put it in your path.
|
|---|
| [583119f] | 140 |
|
|---|
| [be6d877] | 141 | 7. Type "civl config". This should report that it found
|
|---|
| 142 | the theorem provers you installed (and are in your PATH).
|
|---|
| 143 | It should create a file called ".sarl" in your home directory
|
|---|
| 144 | which you can also edit by hand.
|
|---|
| [bb733f2] | 145 |
|
|---|
| 146 |
|
|---|
| [8d0a007] | 147 | ------------------------- Source Installation -------------------------
|
|---|
| 148 |
|
|---|
| 149 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 150 |
|
|---|
| [be6d877] | 151 | 0. Install theorem provers following the directions above.
|
|---|
| [bb733f2] | 152 | Install Eclipse IDE for Java/EE developers if you have not already
|
|---|
| 153 | done so.
|
|---|
| 154 |
|
|---|
| [83c054c] | 155 | 1. Install an SVN plugin in Eclipse (such as Subversive) if you have
|
|---|
| 156 | not already.
|
|---|
| 157 |
|
|---|
| 158 | 2. Install prerequisite projects ABC, SARL and GMC.
|
|---|
| [8d0a007] | 159 | Make sure that the three projects are put in the workspace
|
|---|
| [bb733f2] | 160 | directory where CIVL will be created.
|
|---|
| [8d0a007] | 161 |
|
|---|
| [ae48dce] | 162 | a. Install the symbolic algebra and reasoning library SARL.
|
|---|
| 163 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 164 | svn://vsl.cis.udel.edu/sarl. After entering that, open it
|
|---|
| 165 | up and select the "trunk". After checking out trunk, name
|
|---|
| 166 | the project "SARL". Then follow the instructions in the INSTALL
|
|---|
| 167 | file for Eclipse installation. Build the sarl.jar from within
|
|---|
| 168 | Eclipse by right-clicking (or ctrl-clicking) on the build.xml
|
|---|
| 169 | file and selecting Run As->Ant Build.
|
|---|
| 170 |
|
|---|
| 171 | b. Install the C front-end ABC. In Eclipse,
|
|---|
| [8d0a007] | 172 | select New Project...from SVN, use the archive
|
|---|
| 173 | svn://vsl.cis.udel.edu/abc. After entering that, open it
|
|---|
| 174 | up and select the "trunk". After checking out trunk, name
|
|---|
| 175 | the project "ABC". Then follow the instructions in the INSTALL
|
|---|
| 176 | file for Eclipse installation. Build the abc.jar from within
|
|---|
| 177 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 178 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 179 |
|
|---|
| [ae48dce] | 180 | c. Install the generic model checking utilities package GMC.
|
|---|
| [8d0a007] | 181 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 182 | svn://vsl.cis.udel.edu/gmc. After entering that, open it
|
|---|
| 183 | up and select the "trunk". After checking out trunk, name
|
|---|
| 184 | the project "GMC". Build the gmc.jar from within Eclipse
|
|---|
| 185 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 186 | selecting Run As->Ant Build.
|
|---|
| 187 |
|
|---|
| [83c054c] | 188 | 3. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| [148cbce] | 189 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 190 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 191 | the Eclipse project.)
|
|---|
| [8d0a007] | 192 |
|
|---|
| [83c054c] | 193 | 4. Check out the trunk, and create the project using the New Java
|
|---|
| [148cbce] | 194 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| [be6d877] | 195 | and other Eclipse meta-data are already in the SVN archive,
|
|---|
| 196 | saving you a bunch of work.
|
|---|
| [8d0a007] | 197 |
|
|---|
| [83c054c] | 198 | 5. If you already have the VSL dependencies library, you may
|
|---|
| [be6d877] | 199 | skip this step. Otherwise, download the tgz archive of VSL
|
|---|
| 200 | dependencies from http://vsl.cis.udel.edu/tools/vsl_depend
|
|---|
| [8d0a007] | 201 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| 202 | Move vsl to /opt (you might need to use sudo for this.
|
|---|
| 203 | Also, if you don't already have a directory called /opt,
|
|---|
| 204 | you will have to create it with mkdir /opt).
|
|---|
| 205 |
|
|---|
| 206 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| [85b7e48] | 207 | unzipped it automatically to a .tar file) in the directory DOWNLOAD.
|
|---|
| [8d0a007] | 208 | You can use the following commands:
|
|---|
| 209 |
|
|---|
| [85b7e48] | 210 | $ cd DOWNLOAD
|
|---|
| [8d0a007] | 211 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 212 | $ sudo mv vsl /opt
|
|---|
| 213 |
|
|---|
| [be6d877] | 214 | (Leave out the "x" in the tar command if the file was already
|
|---|
| 215 | unzipped.) Now you can type "ls /opt/vsl", and the output
|
|---|
| 216 | should be
|
|---|
| [8d0a007] | 217 |
|
|---|
| 218 | README.txt lib licenses src
|
|---|
| 219 |
|
|---|
| [83c054c] | 220 | 6. If default_build.properties matches the configuration of your system,
|
|---|
| [c1c00b6] | 221 | then you can skip this step. Otherwise, you may need to create a file
|
|---|
| [be6d877] | 222 | build.properties in the directory containing build.xml.
|
|---|
| [c1c00b6] | 223 | Copy and paste the content from any file under properties, edit each
|
|---|
| 224 | entry with the path configured in your system. The newly created file
|
|---|
| 225 | build.properties will automatically be used by ant to to build the .jar file.
|
|---|
| [8d0a007] | 226 |
|
|---|
| [83c054c] | 227 | 7. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| [8d0a007] | 228 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| [be6d877] | 229 | and specify its value to be /opt/vsl.
|
|---|
| [8d0a007] | 230 |
|
|---|
| [83c054c] | 231 | 8. Do a clean build. Everything should compile. Generate the civl.jar
|
|---|
| [8d0a007] | 232 | by right-clicking (or ctrl-click on OS X) the build.xml file and
|
|---|
| [be6d877] | 233 | Run As->Ant Build.
|
|---|
| 234 |
|
|---|
| 235 | 9. Somewhere on your system, create a plain text file containing
|
|---|
| 236 | exactly the following two lines:
|
|---|
| 237 |
|
|---|
| 238 | #!/bin/sh
|
|---|
| 239 | java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
|
|---|
| 240 |
|
|---|
| 241 | where "/Path/To/Your/workspace" is replaced with the path
|
|---|
| 242 | to your Eclipse workspace directory. Name this file "civl",
|
|---|
| 243 | put it in your PATH, and make it executable (chmod ugo+x civl).
|
|---|
| 244 |
|
|---|
| 245 | 10. From a terminal window, execute "civl config". This should
|
|---|
| 246 | find the theorem provers in your PATH and create a file
|
|---|
| 247 | .sarl in your home directory.
|
|---|
| 248 |
|
|---|
| 249 | 11. In Eclipse, navigate to "Run->Run Configurations... Create a new
|
|---|
| 250 | JUnit configuration."
|
|---|
| 251 | Name it "CIVL Regression Tests". Select "Run all tests in the
|
|---|
| 252 | selected project..." and navigate to the folder "test/regress"
|
|---|
| 253 | in the CIVL project. The Test runner should be JUnit 4. Under the
|
|---|
| 254 | Arguments tab, type "-ea" (without the quotes) in the VM arguments
|
|---|
| 255 | area (to enable assertion checking).
|
|---|
| 256 |
|
|---|
| 257 | 12. An example of how to set up a single test from within Eclipse:
|
|---|
| [8d0a007] | 258 | create a new Run Configuration via the Run->Run
|
|---|
| 259 | Configurations... menu. Create a new "Java Application"
|
|---|
| 260 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 261 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| [be6d877] | 262 | set the Program arguments to
|
|---|
| 263 |
|
|---|
| 264 | verify examples/concurrency/barrier2.cvl
|
|---|
| 265 |
|
|---|
| 266 | Modify the VM arguments as in the step above. You should now be
|
|---|
| 267 | able to run the test by clicking "Run".
|
|---|