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