source: CIVL/README@ cee61f5

1.23 2.0 main test-branch
Last change on this file since cee61f5 was cee61f5, checked in by Alex Wilton <awilton@…>, 3 years ago

Creating release 1.22

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5850 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 14.8 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.22
3
4------------------------------ Overview -------------------------------
5
6CIVL 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
22CIVL is developed by the Verified Software Laboratory at the
23University of Delaware Department of Computer Science.
24For more information, visit http://vsl.cis.udel.edu/civl
25
26Active Developers:
27Stephen F. Siegel
28Wenhao Wu
29Alexander Wilton
30
31Inactive Developers:
32John Edenhofner
33Andre Marianiello
34Michael Rogers
35Timothy K. Zirkel
36Manchun Zheng
37Yihao Yan
38Matthew B. Dwyer
39Mitchell Gerrard
40Ziqing Luo
41
42------------------------------- License -------------------------------
43
44CIVL is open source software distributed under the GNU
45General Public License. However, the libraries used by CIVL
46(and incorporated into the complete distribution) use various
47licenses. 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
139For most users, this will be the easiest way to install and
140use CIVL. Developers should instead follow the instructions for
141"Source Installation" below.
142
1431. Install at least one of the theorem provers below.
144The more provers you install, the more precise CIVL analysis will
145be. Note that CIVL only requires the binary executable
146version of each prover; you can ignore the libraries, various
147API bindings, etc. You just need to ensure that
148each binary executable is in your PATH when you run
149"civl config". The currently supported provers are:
150
151 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
152 download the latest, optimized build with static library
153 and executable for your OS. Place the executable file
154 "cvc3" in your PATH. You can discard everything else.
155 Alternatively, on some linux systems, CVC3 can be installed
156 using the package manager via "sudo apt-get install cvc3".
157 This will place cvc3 in /usr/bin.
158
159 - CVC4, http://cvc4.cs.nyu.edu/downloads/
160
161 - Z3, http://z3.codeplex.com/SourceControl/latest
162
1632. Install a Java 8 SDK if you have not already. Go to
164
165 http://www.oracle.com/technetwork/java/javase/downloads/
166
167for the latest from Oracle. On linux, you can instead use
168the package manager:
169
170 sudo apt-get install openjdk-8-jdk
171
1723. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
173
1744. Unzip and untar the CIVL distribution file if this
175does not happen automatically. This should result in a
176folder named CIVL-TAG, where TAG is some version ID string.
177This folder contains the following:
178
179 - README : this file
180 - bin : containing one executable sh script called "civl"
181 - lib : containing civl-TAG.jar
182 - doc : containing the manual and the tutorial of CIVL
183 - emacs : CIVL-C emacs mode and its installation instructions
184 - licenses : licenses for CIVL and included libraries
185 - examples : some example CIVL programs
186
1875. You can move the CIVL folder wherever you want.
188The JAR file in the lib directory is all you need to run CIVL.
189You may also move this jar file wherever you want. You
190run CIVL by typing a command that begins
191"java -jar /path/to/civl-TAG.jar ...". For convenience
192you may instead use the shell script "civl" in bin,
193which allows you to replace "java -jar /path/to/civl-TAG.jar"
194with just "civl" on the command line. Simply edit the civl script
195to reflect the path to civl-TAG.jar and place the script
196somewhere in your PATH. Alternatively, you can just define
197an alias in your .profile, .bash_profile, or equivalent, such as
198
199alias civl='java -jar /path/to/civl-TAG.jar'
200
201In the following, we will assume that you have defined
202a command "civl" in one these ways.
203
2046. Type "civl config". This should report that it found
205the theorem provers you installed (and are in your PATH).
206It should create a file called ".sarl" in your home directory
207which you can also edit by hand.
208
209
210------------------------- Source Installation -------------------------
211
212We recommend using the Eclipse IDE for Java/EE developers.
213
2140. Install theorem provers following the directions above.
215Install Eclipse IDE for Java/EE developers if you have not already
216done so.
217
2181. Install an SVN plugin in Eclipse (such as Subversive) if you have
219 not already.
220
2212. Install prerequisite projects ABC, SARL and GMC.
222 Make sure that the three projects are put in the workspace
223 directory where CIVL will be created. Specifically:
224
225 a. Install the symbolic algebra and reasoning library SARL.
226 In Eclipse, select New Project...from SVN, use the archive
227 svn://vsl.cis.udel.edu/sarl. After entering that, open it
228 up and select the "trunk". After checking out trunk, name
229 the project "SARL". Then follow the instructions in the INSTALL
230 file for Eclipse installation. Build the sarl.jar from within
231 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
232 file and selecting Run As->Ant Build.
233
234 b. Install the C front-end ABC. In Eclipse,
235 select New Project...from SVN, use the archive
236 svn://vsl.cis.udel.edu/abc. After entering that, open it
237 up and select the "trunk". After checking out trunk, name
238 the project "ABC". Then follow the instructions in the INSTALL
239 file for Eclipse installation. Build the abc.jar from within
240 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
241 build.xml file and selecting Run As->Ant Build.
242
243 c. Install the generic model checking utilities package GMC.
244 In Eclipse, select New Project...from SVN, use the archive
245 svn://vsl.cis.udel.edu/gmc. After entering that, open it
246 up and select the "trunk". After checking out trunk, name
247 the project "GMC". Build the gmc.jar from within Eclipse
248 by right-clicking (or ctrl-clicking) on the build.xml file and
249 selecting Run As->Ant Build.
250
2513. From within Eclipse, select New Project...from SVN. The archive is
252 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
253 select the "trunk". (It is simplest to just check out the trunk for
254 the Eclipse project.)
255
2564. Check out the trunk, and create the project using the New Java
257 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
258 and other Eclipse meta-data are already in the SVN archive,
259 saving you a bunch of work.
260
2615. If you already have the VSL dependencies library, you may
262 skip this step. Otherwise, download the tgz archive of VSL
263 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
264 Unzip the .tgz file and you will have the folder vsl.
265 Move vsl to /opt.
266 Note: you probably will need to use sudo for this.
267 Also, if you don't already have a directory called /opt,
268 you will have to create it with "mkdir /opt". Also, if you
269 don't want to use /opt for some reason, you can use any
270 directory you want; just modify the instructions below
271 accordingly.
272
273 Suppose that you put the .tgz file (or .tar file if your browser
274 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
275 You can use the following commands:
276
277 $ cd DOWNLOAD
278 $ tar xzf YourTgzOrTarFile vsl
279 $ sudo mv vsl /opt
280
281 (Leave out the "x" in the tar command if the file was already
282 unzipped.) Now you can type "ls /opt/vsl", and the output
283 should be
284
285 README.txt lib licenses src
286
2876. If default_build.properties matches the configuration of your system,
288 then you can skip this step. Otherwise, you may need to create a file
289 build.properties in the directory containing build.xml.
290 Copy and paste the content from any file under properties, edit each
291 entry with the path configured in your system. The newly created file
292 build.properties will automatically be used by ant to to build the
293 .jar file.
294
2957. Navigate to Preferences -> Java -> Build Path -> ClassPath
296 Variables, and then select New to create a classpath variable VSL,
297 and specify its value to be /opt/vsl.
298
2998. Do a clean build. Everything should compile. Generate the civl.jar
300 by right-clicking (or ctrl-click on OS X) the build.xml file and
301 Run As->Ant Build.
302
3039. Shortcuts for running CIVL
304
305 Somewhere on your system, create a plain text file containing
306 exactly the following two lines:
307
308#!/bin/sh
309java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
310
311 where "/Path/To/Your/workspace" is replaced with the path
312 to your Eclipse workspace directory. Name this file "civl",
313 put it in your PATH, and make it executable (chmod ugo+x civl).
314
31510. From a terminal window, execute "civl config". This should
316 find the theorem provers in your PATH and create a file
317 .sarl in your home directory.
318
31911. In Eclipse, navigate to "Run->Run Configurations... Create a new
320 JUnit configuration."
321 Name it "CIVL Regression Tests". Select "Run all tests in the
322 selected project..." and navigate to the folder "test/regress"
323 in the CIVL project. The Test runner should be JUnit 4. Under the
324 Arguments tab, type "-ea" (without the quotes) in the VM arguments
325 area (to enable assertion checking).
326
32712. An example of how to set up a single test from within Eclipse:
328 create a new Run Configuration via the Run->Run
329 Configurations... menu. Create a new "Java Application"
330 configuration. Call it "CIVL barrier2". The Project is CIVL. The
331 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
332 set the Program arguments to
333
334 verify examples/concurrency/barrier2.cvl
335
336 Modify the VM arguments as in the step above. You should now be
337 able to run the test by clicking "Run".
338
Note: See TracBrowser for help on using the repository browser.