| [c7a0783] | 1 | CIVL: The Concurrency Intermediate Verification Language
|
|---|
| [c15a745] | 2 | v 0.6
|
|---|
| [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 |
|
|---|
| 28 | Stephen F. Siegel
|
|---|
| 29 | Timothy K. Zirkel
|
|---|
| [8d0a007] | 30 | Manchun Zheng
|
|---|
| 31 | Ziqing Luo
|
|---|
| [c7a0783] | 32 |
|
|---|
| [8d0a007] | 33 | ------------------------------- License -------------------------------
|
|---|
| 34 |
|
|---|
| 35 | CIVL is open source software distributed under the GNU
|
|---|
| 36 | General Public License. However, the libraries used by CIVL
|
|---|
| 37 | (and incorporated into the complete distribution) use various
|
|---|
| 38 | licenses. See directory licenses for the license of each component.
|
|---|
| 39 |
|
|---|
| [c15a745] | 40 | -------------------------- Updates from v 0.5 -------------------------
|
|---|
| [8d0a007] | 41 |
|
|---|
| [c15a745] | 42 | 1. Support struct and array literal expressions.
|
|---|
| 43 | For example:
|
|---|
| 44 | typedef struct Node {int id; Node* next; } Node;
|
|---|
| 45 | Node last = {.id=2, .next=NULL};
|
|---|
| 46 | Node first = {.id = 1, .next = &last};
|
|---|
| 47 | Node* list = (Node[]){[0]=one, [1]=last};
|
|---|
| 48 | More examples can be found in
|
|---|
| 49 | examples/languageFeatures/arrayLiteral.cvl,
|
|---|
| 50 | arrays.cvl, struct.cvl, etc.
|
|---|
| [8d0a007] | 51 |
|
|---|
| [c15a745] | 52 | 2. Support constants of char type. Refer to
|
|---|
| 53 | examples/languageFeatures/char.cvl for more details.
|
|---|
| 54 |
|
|---|
| 55 | 3. Support quantifier expressions. Refer to
|
|---|
| 56 | examples/languageFeatures/quantifiers.cvl for more details.
|
|---|
| 57 |
|
|---|
| 58 | 4. Support abstract functions and derivative operations.
|
|---|
| 59 | Refer to examples/arithmetic/derivative.cvl for more details.
|
|---|
| 60 |
|
|---|
| 61 | 5. A new system function is supported: exit(). Refer to
|
|---|
| 62 | examples/languageFeatures/exit.cvl for more details.
|
|---|
| 63 |
|
|---|
| 64 | 6. $assert is now a system function declared in civlc.h and can have
|
|---|
| 65 | optional arguments for printing information when the assertion is
|
|---|
| 66 | violated. Refer to examples/languageFeatures/assertPrintf.cvl
|
|---|
| 67 | for more details.
|
|---|
| 68 |
|
|---|
| 69 | 7. Bugs fixed: false deadlock predicate for system function calls;
|
|---|
| 70 | false error report when function declaration and function definition
|
|---|
| 71 | are separated.
|
|---|
| [8d0a007] | 72 |
|
|---|
| 73 | ------------------------- Binary Installation -------------------------
|
|---|
| [c7a0783] | 74 |
|
|---|
| [583119f] | 75 | For most users, this will be the easiest way to install and use CIVL.
|
|---|
| 76 |
|
|---|
| 77 | 1. Install a Java 7 SDK if you have not already. Go to
|
|---|
| 78 | http://www.oracle.com/technetwork/java/javase/downloads/ for the
|
|---|
| 79 | latest from Oracle. On linux, you can optionally sudo apt-get install
|
|---|
| 80 | openjdk-7-jdk.
|
|---|
| 81 |
|
|---|
| 82 | 2. If you already have the VSL dependencies library, you may
|
|---|
| 83 | skip this step. Otherwise, download the archive of VSL
|
|---|
| 84 | dependencies from http://vsl.cis.udel.edu/tools/vsl_depend,
|
|---|
| 85 | choosing the version for your OS type (32-bit linux,
|
|---|
| 86 | 64-bit linux, or 64-bit OS X). Unzip and untar the
|
|---|
| 87 | downloaded .tgz file and you will have a folder named "vsl".
|
|---|
| 88 | If you do not already have a directory /opt, create one with
|
|---|
| 89 | "mkdir /opt". Move vsl into /opt. Use sudo as needed.
|
|---|
| 90 |
|
|---|
| 91 | 3. Download the appropriate CIVL distribution from
|
|---|
| 92 | http://vsl.cis.udel.edu/civl.
|
|---|
| 93 |
|
|---|
| 94 | 4. Unzip and untar the downloaded file if this does not happen
|
|---|
| 95 | automatically. This should result in a folder named
|
|---|
| 96 | CIVL-TAG, where TAG is some version id string. This folder
|
|---|
| 97 | contains the following:
|
|---|
| [c7a0783] | 98 |
|
|---|
| 99 | - README : this file
|
|---|
| 100 | - bin : containing one executable sh script called "civl"
|
|---|
| [583119f] | 101 | - lib : containing civl-TAG.jar
|
|---|
| [8d0a007] | 102 | - doc : containing the manual and the tutorial of CIVL
|
|---|
| [c7a0783] | 103 | - licenses : licenses for CIVL and included libraries
|
|---|
| 104 | - examples : some example CIVL programs
|
|---|
| 105 |
|
|---|
| [583119f] | 106 | 5. Move CIVL-TAG into /opt.
|
|---|
| 107 |
|
|---|
| 108 | 6. Put the civl script in your path however you like to put things
|
|---|
| 109 | in your path. Either move it to a directory in your path,
|
|---|
| 110 | or create a symlink to it, or edit your .profile or equivalent
|
|---|
| 111 | to put it in your path.
|
|---|
| 112 |
|
|---|
| [8d0a007] | 113 | ------------------------- Source Installation -------------------------
|
|---|
| 114 |
|
|---|
| 115 | We recommend using the Eclipse IDE for Java/EE developers.
|
|---|
| 116 |
|
|---|
| 117 | 1. Install prerequisite projects ABC, SARL and GMC.
|
|---|
| 118 | Make sure that the three projects are put in the workspace
|
|---|
| 119 | directory where CIVL will be put.
|
|---|
| 120 |
|
|---|
| 121 | a. Install the C front-end ABC. In Eclipse,
|
|---|
| 122 | select New Project...from SVN, use the archive
|
|---|
| 123 | svn://vsl.cis.udel.edu/abc. After entering that, open it
|
|---|
| 124 | up and select the "trunk". After checking out trunk, name
|
|---|
| 125 | the project "ABC". Then follow the instructions in the INSTALL
|
|---|
| 126 | file for Eclipse installation. Build the abc.jar from within
|
|---|
| 127 | Eclipse by right-clicking (or ctrl-clicking on OS X) on the
|
|---|
| 128 | build.xml file and selecting Run As->Ant Build.
|
|---|
| 129 |
|
|---|
| 130 | b. Install the symbolic algebra and reasoning library SARL.
|
|---|
| 131 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 132 | svn://vsl.cis.udel.edu/sarl. After entering that, open it
|
|---|
| 133 | up and select the "trunk". After checking out trunk, name
|
|---|
| 134 | the project "SARL". Then follow the instructions in the INSTALL
|
|---|
| 135 | file for Eclipse installation. Build the sarl.jar from within
|
|---|
| 136 | Eclipse by right-clicking (or ctrl-clicking) on the build.xml
|
|---|
| 137 | file and selecting Run As->Ant Build.
|
|---|
| 138 |
|
|---|
| 139 | c. Install the generic model checking utilities package GMC.
|
|---|
| 140 | In Eclipse, select New Project...from SVN, use the archive
|
|---|
| 141 | svn://vsl.cis.udel.edu/gmc. After entering that, open it
|
|---|
| 142 | up and select the "trunk". After checking out trunk, name
|
|---|
| 143 | the project "GMC". Build the gmc.jar from within Eclipse
|
|---|
| 144 | by right-clicking (or ctrl-clicking) on the build.xml file and
|
|---|
| 145 | selecting Run As->Ant Build.
|
|---|
| 146 |
|
|---|
| 147 | 2. From within Eclipse, select New Project...from SVN. The archive is
|
|---|
| 148 | svn://vsl.cis.udel.edu/civl. After entering that, open it up and
|
|---|
| 149 | select the "trunk". (It is simplest to just check out the trunk for
|
|---|
| 150 | the Eclipse project.)
|
|---|
| 151 |
|
|---|
| 152 | 3. Check out the trunk, and create the project using the New Java
|
|---|
| 153 | Project Wizard as usual, naming it "CIVL". The .project, .classpath,
|
|---|
| 154 | and other Eclipse meta-data are already in the SVN archive, saving you
|
|---|
| 155 | a bunch of work.
|
|---|
| 156 |
|
|---|
| 157 | 4. If you already have the VSL dependencies library, you may
|
|---|
| 158 | skip this step.
|
|---|
| 159 |
|
|---|
| 160 | Download the tgz archive of VSL dependencies from
|
|---|
| 161 | http://vsl.cis.udel.edu/tools/vsl_depend,
|
|---|
| 162 | choosing the right .tgz according to your platform:
|
|---|
| 163 |
|
|---|
| 164 | vsl_linux32-1.0.tgz - 32-bit linux
|
|---|
| 165 | vsl_linux64-1.0.tgz - 64-bit linux
|
|---|
| 166 | vsl_osx64-1.0.tgz - 64-bit osx
|
|---|
| 167 |
|
|---|
| 168 | Unzip the .tgz file and you will have the folder vsl.
|
|---|
| 169 | Move vsl to /opt (you might need to use sudo for this.
|
|---|
| 170 | Also, if you don't already have a directory called /opt,
|
|---|
| 171 | you will have to create it with mkdir /opt).
|
|---|
| 172 |
|
|---|
| 173 | Suppose that you put the .tgz file (or .tar file if your browser
|
|---|
| 174 | unzipped it automatically to a .tar file) in the directory $Download.
|
|---|
| 175 | You can use the following commands:
|
|---|
| 176 |
|
|---|
| 177 | $ cd $Download
|
|---|
| 178 | $ tar xzf YourTgzOrTarFile vsl
|
|---|
| 179 | $ sudo mv vsl /opt
|
|---|
| 180 |
|
|---|
| 181 | Now you can type "ls /opt/vsl", and the output should be
|
|---|
| 182 |
|
|---|
| 183 | README.txt lib licenses src
|
|---|
| 184 |
|
|---|
| 185 | 5. Create a file build.properties in the directory where build.xml is in.
|
|---|
| 186 | Copy and paste the content from properties/build.properties.osx or
|
|---|
| 187 | properties/build.properties.linux depending on your platform.
|
|---|
| 188 | If your workspace directory is the default setting of Eclipse,
|
|---|
| 189 | i.e., HOME/Documents/workspace for osx or HOME/workspace for linux,
|
|---|
| 190 | then you dont have to anything.
|
|---|
| 191 | Otherwise, you need to edit the entry "workspace" to point to the
|
|---|
| 192 | corresponding directory where you put the projects ABC, SARL and GMC.
|
|---|
| 193 |
|
|---|
| 194 | 6. Navigate to Preferences -> Java -> Build Path -> ClassPath
|
|---|
| 195 | Variables, and then select New to create a classpath variable VSL,
|
|---|
| 196 | and specify its value to be /opt/vsl. Navigate to Preferences -> Run/Debug
|
|---|
| 197 | -> String Substitution -> New, and then define an entry vsl_lib and
|
|---|
| 198 | set its value to be /opt/vsl/lib.
|
|---|
| 199 |
|
|---|
| 200 | 7. Do a clean build. Everything should compile. Generate the civl.jar
|
|---|
| 201 | by right-clicking (or ctrl-click on OS X) the build.xml file and
|
|---|
| 202 | Run As->Ant Build.
|
|---|
| 203 |
|
|---|
| 204 | 8. Go to Run->Run Configurations... Create a new JUnit configuration.
|
|---|
| 205 | Name it CIVL Tests. Select "Run all tests in the selected project..."
|
|---|
| 206 | and navigate to the folder "test" in the CIVL project.
|
|---|
| 207 | The Test runner should be JUnit 4. Under the Arguments tab, type
|
|---|
| 208 | "-ea" (without the quotes) in the VM arguments area (to enable assertion
|
|---|
| 209 | checking). Under the Environment tab, create an entry
|
|---|
| 210 | DYLD_LIBRARY_PATH (OS X) or LD_LIBRARY_PATH (linux),
|
|---|
| 211 | specify its value by clicking Variables and choose vsl_lib from the list,
|
|---|
| 212 | or you may type ${vsl_lib} in the value entry.
|
|---|
| 213 |
|
|---|
| 214 | 9. An example of how to set up a single test from within Eclipse:
|
|---|
| 215 | create a new Run Configuration via the Run->Run
|
|---|
| 216 | Configurations... menu. Create a new "Java Application"
|
|---|
| 217 | configuration. Call it "CIVL barrier2". The Project is CIVL. The
|
|---|
| 218 | main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
|
|---|
| 219 | set the Program arguments to "examples/barrier2.cvl" (without the
|
|---|
| 220 | quotes). Modify the VM arguments and the Environment as in the step
|
|---|
| 221 | above. You should now be able to run the test by clicking "Run".
|
|---|