| 1 | CIVL: The Concurrency Intermediate Verification Language
|
|---|
| 2 | v1.22
|
|---|
| 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, Pthread, CUDA, and Chapel. CIVL-C also
|
|---|
| 14 | provides 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 https://civl.dev
|
|---|
| 25 |
|
|---|
| 26 | Active Developers:
|
|---|
| 27 | Stephen F. Siegel
|
|---|
| 28 | Alexander Wilton
|
|---|
| 29 |
|
|---|
| 30 | Previous Developers:
|
|---|
| 31 | John Edenhofner
|
|---|
| 32 | Andre Marianiello
|
|---|
| 33 | Michael Rogers
|
|---|
| 34 | Timothy K. Zirkel
|
|---|
| 35 | Manchun Zheng
|
|---|
| 36 | Yihao Yan
|
|---|
| 37 | Matthew B. Dwyer
|
|---|
| 38 | Mitchell Gerrard
|
|---|
| 39 | Wenhao Wu
|
|---|
| 40 | Ziqing Luo
|
|---|
| 41 |
|
|---|
| 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 |
|
|---|
| 49 | -------------------------- Updates from v1.21 -------------------------
|
|---|
| 50 |
|
|---|
| 51 | -- 1. Upgraded to Java 17
|
|---|
| 52 | -- 2. Overhauled repository structure by moving ABC, SARL, and GMC
|
|---|
| 53 | repositories into this one.
|
|---|
| 54 | -- 3. Core language changes
|
|---|
| 55 | 3.1 Only the first statement in an $atomic block is allowed to block.
|
|---|
| 56 | 3.2 $yield can be used to release the lock of the atomic block
|
|---|
| 57 | 3.3 Removed $atom
|
|---|
| 58 | -- 4. Total overhaul to OpenMP transformations. Now includes a robust data
|
|---|
| 59 | race detection feature as described in CAV 2023 paper 'Model Checking
|
|---|
| 60 | Race-freedom When “Sequential Consistency for Data-race-free Programs”
|
|---|
| 61 | is Guaranteed'
|
|---|
| 62 | -- 5. A large number of bug fixes and small improvements.
|
|---|
| 63 |
|
|---|
| 64 | -------------------------- Updates from v1.20 -------------------------
|
|---|
| 65 | -- 1. refine the Fortran extension for paper submitted to TACAS 2022
|
|---|
| 66 | 1.1 Complete Fortran Array Descriptor for tracking changes made on
|
|---|
| 67 | index ranges by array section and reshape operations.
|
|---|
| 68 | Any declared array type is transformed into a Fortran array
|
|---|
| 69 | descriptor by Fortran to CIVL-C AST transformer.
|
|---|
| 70 | 1.2 Introduce four basic CIVL verification primitives Fortran bindings
|
|---|
| 71 | 1.2.1 Type qualifiers:
|
|---|
| 72 | - !$CVL $input: indicates that all variables declared immediately
|
|---|
| 73 | in the next line are symbolic and read-only.
|
|---|
| 74 | - !$CVL $output: indicates that all variables declared immediately
|
|---|
| 75 | in the next line are write-only and used for
|
|---|
| 76 | verifying functional output equivalence.
|
|---|
| 77 | A type declaration statement is required to be used immediately
|
|---|
| 78 | after any CIVL type qualifier and variables qualified shall follow
|
|---|
| 79 | read/write constraints mentioned above.
|
|---|
| 80 | CIVL assumption primitives can be used for limiting the value range
|
|---|
| 81 | of variables qualified by '!$CVL $input'.
|
|---|
| 82 | e.g.,
|
|---|
| 83 | !$CVL $input
|
|---|
| 84 | integer :: n, a(n)
|
|---|
| 85 | !! both 'n' and elements of 'a' are symbolic and read-only
|
|---|
| 86 | !$CVL $output
|
|---|
| 87 | integer :: sum
|
|---|
| 88 | !! sum is write-only and can be used for comparing with another
|
|---|
| 89 | !! program, which also has 'sum' with a same type and qualified
|
|---|
| 90 | !! by '!$CVL $output'
|
|---|
| 91 |
|
|---|
| 92 | 1.2.2 Verification
|
|---|
| 93 | - !$CVL $assume(logic_expr);
|
|---|
| 94 | Make CIVL only explores paths, whose path conditions shall
|
|---|
| 95 | make 'logic_expr' to be true.
|
|---|
| 96 | Set the value range for varialbes qualified by '!$CVL $input'
|
|---|
| 97 | - !$CVL $assert(logic_expr);
|
|---|
| 98 | Checks predicates representing specific correctness properties
|
|---|
| 99 | that users expect to verify.
|
|---|
| 100 | If any CIVL assertion primitive is evaluated as false, then
|
|---|
| 101 | CIVL shall report an assertion violation.
|
|---|
| 102 | 1.3 Add supports for additional Fortran features include:
|
|---|
| 103 | 1.3.1 'inout' and 'out' attributes declared by 'intent' statement
|
|---|
| 104 | 1.3.2 compound types with fields having scalar types.
|
|---|
| 105 | 1.3.3 pointer types to scalar types.
|
|---|
| 106 | 1.3.4 logic expression evaluation without short-circuits
|
|---|
| 107 | 1.3.5 line truncation for fixed and free forms
|
|---|
| 108 | 1.3.6 other features are shown here:
|
|---|
| 109 | https://vsl.cis.udel.edu/trac/civl/wiki/FortranTransformations
|
|---|
| 110 | 1.4 Add test cases imported from SMACK verification suite
|
|---|
| 111 | https://github.com/soarlab/gandalv/
|
|---|
| 112 | 2. CUDA Support Improvement
|
|---|
| 113 | 2.1 Fixed CUDA bug in which CUDA kernel declarations were not being
|
|---|
| 114 | transformed properly
|
|---|
| 115 | 2.2 Fixed source info bug (completeSources wasn’t being called
|
|---|
| 116 | everywhere that it should)
|
|---|
| 117 | 2.3 Fixed short circuit bug described in ticket #943
|
|---|
| 118 | 2.4 Added small optimization to short circuit transformer to allow
|
|---|
| 119 | for finer granularity of its transformation
|
|---|
| 120 | 3. Other Improvement and Fixed Bugs
|
|---|
| 121 | 3.1 MPI_Comm types can be compared by equality operator ('==').
|
|---|
| 122 | 3.2 Java-Doc improvements
|
|---|
| 123 |
|
|---|
| 124 |
|
|---|
| 125 | -------------------------- Updates from v1.19 -------------------------
|
|---|
| 126 | -- 1. added new language primitives:
|
|---|
| 127 | 1.1 $local_start() and $local_end()
|
|---|
| 128 | An execution of the statements in between of this pair, including this pair themselves,
|
|---|
| 129 | is NOT ONLY uninterruptable BUT ALSO purely local to the view of the verifier.
|
|---|
| 130 | 1.2 $read_set_push() and $read_set_pop() (the correspondence for write set has already been supported)
|
|---|
| 131 | This pair of primitives can be used to turn on/off the capturing of read set during execution.
|
|---|
| 132 | -- 2. added Fortran support for translating basic Fortran features into CIVL-AST
|
|---|
| 133 | (see: https://vsl.cis.udel.edu/trac/civl/wiki/FortranTransformations)
|
|---|
| 134 | -- 3. added simple Fortran verification examples (edited)
|
|---|
| 135 |
|
|---|
| 136 |
|
|---|
| 137 | ------------------------- Binary Installation -------------------------
|
|---|
| 138 |
|
|---|
| 139 | For most users, this will be the easiest way to install and
|
|---|
| 140 | use CIVL. Developers should instead follow the instructions for
|
|---|
| 141 | "Source Installation" below.
|
|---|
| 142 |
|
|---|
| 143 | 1. Install at least one of the theorem provers below.
|
|---|
| 144 | The more provers you install, the more precise CIVL analysis will
|
|---|
| 145 | be. Note that CIVL only requires the binary executable
|
|---|
| 146 | version of each prover; you can ignore the libraries, various
|
|---|
| 147 | API bindings, etc. You just need to ensure that
|
|---|
| 148 | each binary executable is in your PATH when you run
|
|---|
| 149 | "civl config". The currently supported provers are:
|
|---|
| 150 |
|
|---|
| 151 | - CVC4, http://cvc4.cs.nyu.edu/downloads/
|
|---|
| 152 |
|
|---|
| 153 | - Z3, http://z3.codeplex.com/SourceControl/latest
|
|---|
| 154 |
|
|---|
| 155 | 2. Install a Java 17 SDK if you have not already. Go to
|
|---|
| 156 |
|
|---|
| 157 | http://www.oracle.com/technetwork/java/javase/downloads/
|
|---|
| 158 |
|
|---|
| 159 | for the latest from Oracle. On linux, you can instead use
|
|---|
| 160 | the package manager:
|
|---|
| 161 |
|
|---|
| 162 | sudo apt install openjdk-17-jdk
|
|---|
| 163 |
|
|---|
| 164 | 3. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
|
|---|
| 165 |
|
|---|
| 166 | 4. Unzip and untar the CIVL distribution file if this
|
|---|
| 167 | does not happen automatically. This should result in a
|
|---|
| 168 | folder named CIVL-TAG, where TAG is some version ID string.
|
|---|
| 169 | This folder contains the following:
|
|---|
| 170 |
|
|---|
| 171 | - README : this file
|
|---|
| 172 | - bin : containing one executable sh script called "civl"
|
|---|
| 173 | - lib : containing civl-TAG.jar
|
|---|
| 174 | - doc : containing the manual and the tutorial of CIVL
|
|---|
| 175 | - emacs : CIVL-C emacs mode and its installation instructions
|
|---|
| 176 | - licenses : licenses for CIVL and included libraries
|
|---|
| 177 | - examples : some example CIVL programs
|
|---|
| 178 |
|
|---|
| 179 | 5. You can move the CIVL folder wherever you want.
|
|---|
| 180 | The JAR file in the lib directory is all you need to run CIVL.
|
|---|
| 181 | You may also move this jar file wherever you want. You
|
|---|
| 182 | run CIVL by typing a command that begins
|
|---|
| 183 | "java -jar /path/to/civl-TAG.jar ...". For convenience
|
|---|
| 184 | you may instead use the shell script "civl" in bin,
|
|---|
| 185 | which allows you to replace "java -jar /path/to/civl-TAG.jar"
|
|---|
| 186 | with just "civl" on the command line. Simply edit the civl script
|
|---|
| 187 | to reflect the path to civl-TAG.jar and place the script
|
|---|
| 188 | somewhere in your PATH. Alternatively, you can just define
|
|---|
| 189 | an alias in your .profile, .bash_profile, or equivalent, such as
|
|---|
| 190 |
|
|---|
| 191 | alias civl='java -jar /path/to/civl-TAG.jar'
|
|---|
| 192 |
|
|---|
| 193 | In the following, we will assume that you have defined
|
|---|
| 194 | a command "civl" in one these ways.
|
|---|
| 195 |
|
|---|
| 196 | 6. Type "civl config". This should report that it found
|
|---|
| 197 | the theorem provers you installed (and are in your PATH).
|
|---|
| 198 | It should create a file called ".sarl" in your home directory
|
|---|
| 199 | which you can also edit by hand.
|
|---|
| 200 |
|
|---|
| 201 |
|
|---|
| 202 | ------------------------- Source Installation -------------------------
|
|---|
| 203 |
|
|---|
| 204 | Instructions found here:
|
|---|
| 205 | https://vsl.cis.udel.edu/trac/civl/wiki/Be%20a%20CIVL%20developer
|
|---|
| 206 |
|
|---|