| 1 | CIVL: The Concurrency Intermediate Verification Language
|
|---|
| 2 | v0.15
|
|---|
| 3 |
|
|---|
| 4 | ------------------------------ Overview -------------------------------
|
|---|
| 5 |
|
|---|
| 6 | CIVL is a framework encompassing...
|
|---|
| 7 |
|
|---|
| 8 | * a programming language, CIVL-C, which adds to C a number of
|
|---|
| 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.
|
|---|
| 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 |
|
|---|
| 28 | Matthew B. Dwyer
|
|---|
| 29 | Ziqing Luo
|
|---|
| 30 | Michael Rogers
|
|---|
| 31 | Stephen F. Siegel
|
|---|
| 32 | Manchun Zheng
|
|---|
| 33 | Timothy K. Zirkel
|
|---|
| 34 |
|
|---|
| 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 |
|
|---|
| 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 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 | ------------------------- Binary Installation -------------------------
|
|---|
| 83 |
|
|---|
| 84 | For most users, this will be the easiest way to install and use CIVL.
|
|---|
| 85 | Developers should instead follow the instructions for
|
|---|
| 86 | "Source Installation" below.
|
|---|
| 87 |
|
|---|
| 88 | 1. Install the automated theorem prover CVC3 (if you have not already).
|
|---|
| 89 | The easiest way to do this is to visit
|
|---|
| 90 |
|
|---|
| 91 | http://www.cs.nyu.edu/acsys/cvc3/download.html
|
|---|
| 92 |
|
|---|
| 93 | and download the latest, optimized build with static library
|
|---|
| 94 | and executable for your OS. Place the executable file "cvc3"
|
|---|
| 95 | somewhere in your PATH. You can discard everything else.
|
|---|
| 96 |
|
|---|
| 97 | Alternatively, on linux systems, CVC3 can be installed
|
|---|
| 98 | using the package manager via "sudo apt-get install cvc3".
|
|---|
| 99 | This will place cvc3 in /usr/bin.
|
|---|
| 100 |
|
|---|
| 101 | 2. Install the automated theorem prover CVC4 (if you have not already).
|
|---|
| 102 | The easiest way to do this is to visit
|
|---|
| 103 |
|
|---|
| 104 | http://cvc4.cs.nyu.edu/downloads/
|
|---|
| 105 |
|
|---|
| 106 | and choose one of the installation approaches. You only need the
|
|---|
| 107 | binary (cvc4), and you must put it in your PATH.
|
|---|
| 108 |
|
|---|
| 109 | 3. Install a Java 7 SDK if you have not already. Go to
|
|---|
| 110 |
|
|---|
| 111 | http://www.oracle.com/technetwork/java/javase/downloads/
|
|---|
| 112 |
|
|---|
| 113 | for the latest from Oracle. On linux, you can instead use
|
|---|
| 114 | the package manager:
|
|---|
| 115 |
|
|---|
| 116 | sudo apt-get install openjdk-7-jdk
|
|---|
| 117 |
|
|---|
| 118 | 4. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
|
|---|
| 119 |
|
|---|
| 120 | 5. Unzip and untar the downloaded file if this does not happen
|
|---|
| 121 | automatically. This should result in a folder named
|
|---|
| 122 | CIVL-TAG, where TAG is some version ID string. This folder
|
|---|
| 123 | contains the following:
|
|---|
| 124 |
|
|---|
| 125 | - README : this file
|
|---|
| 126 | - bin : containing one executable sh script called "civl"
|
|---|
| 127 | - lib : containing civl-TAG.jar
|
|---|
| 128 | - doc : containing the manual and the tutorial of CIVL
|
|---|
| 129 | - emacs : CIVL-C emacs mode and its installation instructions
|
|---|
| 130 | - licenses : licenses for CIVL and included libraries
|
|---|
| 131 | - examples : some example CIVL programs
|
|---|
| 132 |
|
|---|
| 133 | 6. Move CIVL-TAG into /opt. Alternatively, if you don't want to
|
|---|
| 134 | put it in /opt for some reason, put CIVL-TAG wherever you want
|
|---|
| 135 | and edit the script (bin/civl) to reflect the chosen path.
|
|---|
| 136 |
|
|---|
| 137 | 7. Put the script bin/civl in your path however you like to put things
|
|---|
| 138 | in your path. Either move it to a directory in your path,
|
|---|
| 139 | or create a symlink to it, or edit your .profile or equivalent
|
|---|
| 140 | to put it in your path.
|
|---|
| 141 |
|
|---|
| 142 | 8. Type "civl config". This should report that it found cvc3 and cvc4,
|
|---|
| 143 | and it should create a file called ".sarl" in your home directory.
|
|---|
| 144 |
|
|---|
| 145 |
|
|---|
| 146 | ------------------------- Source Installation -------------------------
|
|---|
| 147 |
|
|---|
| 148 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 149 |
|
|---|
| 150 | 0. Install CVC3 and CVC4 executables following the directions above.
|
|---|
| 151 | Install Eclipse IDE for Java/EE developers if you have not already
|
|---|
| 152 | done so.
|
|---|
| 153 |
|
|---|
| 154 | 1. Install an SVN plugin in Eclipse (such as Subversive) if you have
|
|---|
| 155 | not already.
|
|---|
| 156 |
|
|---|
| 157 | 2. Install prerequisite projects ABC, SARL and GMC.
|
|---|
| 158 | Make sure that the three projects are put in the workspace
|
|---|
| 159 | directory where CIVL will be created.
|
|---|
| 160 |
|
|---|
| 161 | a. Install the symbolic algebra and reasoning library SARL.
|
|---|
| 162 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 163 | svn://vsl.cis.udel.edu/sarl. After entering that, open it
|
|---|
| 164 | up and select the "trunk". After checking out trunk, name
|
|---|
| 165 | the project "SARL". Then follow the instructions in the INSTALL
|
|---|
| 166 | file for Eclipse installation. Build the sarl.jar from within
|
|---|
| 167 | Eclipse by right-clicking (or ctrl-clicking) on the build.xml
|
|---|
| 168 | file and selecting Run As->Ant Build.
|
|---|
| 169 |
|
|---|
| 170 | b. Install the C front-end ABC. In Eclipse,
|
|---|
| 171 | select New Project...from SVN, use the archive
|
|---|
| 172 | svn://vsl.cis.udel.edu/abc. After entering that, open it
|
|---|
| 173 | up and select the "trunk". After checking out trunk, name
|
|---|
| 174 | the project "ABC". Then follow the instructions in the INSTALL
|
|---|
| 175 | file for Eclipse installation. Build the abc.jar from within
|
|---|
| 176 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 177 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 178 |
|
|---|
| 179 | c. Install the generic model checking utilities package GMC.
|
|---|
| 180 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 181 | svn://vsl.cis.udel.edu/gmc. After entering that, open it
|
|---|
| 182 | up and select the "trunk". After checking out trunk, name
|
|---|
| 183 | the project "GMC". Build the gmc.jar from within Eclipse
|
|---|
| 184 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 185 | selecting Run As->Ant Build.
|
|---|
| 186 |
|
|---|
| 187 | 3. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 188 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 189 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 190 | the Eclipse project.)
|
|---|
| 191 |
|
|---|
| 192 | 4. Check out the trunk, and create the project using the New Java
|
|---|
| 193 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| 194 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 195 | a bunch of work.
|
|---|
| 196 |
|
|---|
| 197 | 5. If you already have the VSL dependencies library, you may
|
|---|
| 198 | skip this step. Download the tgz archive of VSL dependencies from
|
|---|
| 199 | http://vsl.cis.udel.edu/tools/vsl_depend, choosing the right .tgz
|
|---|
| 200 | according to your platform:
|
|---|
| 201 |
|
|---|
| 202 | vsl_linux32-1.0.tgz - 32-bit linux
|
|---|
| 203 | vsl_linux64-1.0.tgz - 64-bit linux
|
|---|
| 204 | vsl_osx64-1.0.tgz - 64-bit osx
|
|---|
| 205 |
|
|---|
| 206 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| 207 | Move vsl to /opt (you might need to use sudo for this.
|
|---|
| 208 | Also, if you don't already have a directory called /opt,
|
|---|
| 209 | you will have to create it with mkdir /opt).
|
|---|
| 210 |
|
|---|
| 211 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| 212 | unzipped it automatically to a .tar file) in the directory DOWNLOAD.
|
|---|
| 213 | You can use the following commands:
|
|---|
| 214 |
|
|---|
| 215 | $ cd DOWNLOAD
|
|---|
| 216 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 217 | $ sudo mv vsl /opt
|
|---|
| 218 |
|
|---|
| 219 | (Leave out the "x" in the tar command if the file was already unzipped.)
|
|---|
| 220 | Now you can type "ls /opt/vsl", and the output should be
|
|---|
| 221 |
|
|---|
| 222 | README.txt lib licenses src
|
|---|
| 223 |
|
|---|
| 224 | 6. If default_build.properties matches the configuration of your system,
|
|---|
| 225 | then you can skip this step. Otherwise, you may need to create a file
|
|---|
| 226 | build.properties in the directory where build.xml is in.
|
|---|
| 227 | Copy and paste the content from any file under properties, edit each
|
|---|
| 228 | entry with the path configured in your system. The newly created file
|
|---|
| 229 | build.properties will automatically be used by ant to to build the .jar file.
|
|---|
| 230 |
|
|---|
| 231 | 7. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| 232 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| 233 | and specify its value to be /opt/vsl. Navigate to Preferences -> Run/Debug
|
|---|
| 234 | -> String Substitution -> New, and then define an entry vsl_lib and
|
|---|
| 235 | set its value to be /opt/vsl/lib.
|
|---|
| 236 |
|
|---|
| 237 | 8. Do a clean build. Everything should compile. Generate the civl.jar
|
|---|
| 238 | by right-clicking (or ctrl-click on OS X) the build.xml file and
|
|---|
| 239 | Run As->Ant Build.
|
|---|
| 240 |
|
|---|
| 241 | 9. Go to Run->Run Configurations... Create a new JUnit configuration.
|
|---|
| 242 | Name it CIVL Tests. Select "Run all tests in the selected project..."
|
|---|
| 243 | and navigate to the folder "test/regress" in the CIVL project.
|
|---|
| 244 | The Test runner should be JUnit 4. Under the Arguments tab, type
|
|---|
| 245 | "-ea" (without the quotes) in the VM arguments area (to enable assertion
|
|---|
| 246 | checking). Under the Environment tab, create an entry
|
|---|
| 247 | DYLD_LIBRARY_PATH (OS X) or LD_LIBRARY_PATH (linux),
|
|---|
| 248 | specify its value by clicking Variables and choose vsl_lib from the list,
|
|---|
| 249 | or you may type ${vsl_lib} in the value entry.
|
|---|
| 250 |
|
|---|
| 251 | 10. An example of how to set up a single test from within Eclipse:
|
|---|
| 252 | create a new Run Configuration via the Run->Run
|
|---|
| 253 | Configurations... menu. Create a new "Java Application"
|
|---|
| 254 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 255 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| 256 | set the Program arguments to "verify examples/concurrency/barrier2.cvl"
|
|---|
| 257 | (without the quotes). Modify the VM arguments and the Environment
|
|---|
| 258 | as in the step above. You should now be able to run the test by
|
|---|
| 259 | clicking "Run".
|
|---|