source: CIVL/README@ e5cec5ae

1.23 2.0 main test-branch
Last change on this file since e5cec5ae was 6261a62, checked in by Ziqing Luo <ziqing@…>, 9 years ago

Commit for release 1.8

Added two new tests for newly closed tickets.

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

  • Property mode set to 100644
File size: 11.9 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.8
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:
27Matthew B. Dwyer
28Mitchell Gerrard
29Si Li
30Ziqing Luo
31Stephen F. Siegel
32Wenhao Wu
33Yihao Yan
34Manchun Zheng
35
36Inactive Developers:
37John Edenhofner
38Andre Marianiello
39Michael Rogers
40Timothy K. Zirkel
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.7.4 -------------------------
50- Improved the approach of evaluating short-circuiting operations. An transformer is now applied.
51 And for short-circuiting operations in guards or quantified expression, no undefined value will
52 be given for expressions with error side effects. This improvement speeds up CIVL for evaluating
53 non-trivial short-circuiting operations.
54- Improved the cycle proviso: The cycle proviso in CIVL v1.7.4 was only checking if the current state
55 is fully expanded. Now it checks it for both current state and the new explored state. It is the
56 condition used in CIVL of versions older than 1.7.1 which is indeed an optimization.
57- Improved the CIVL model of $parfor statement. The new model simplifies the guard of the wating
58 statement which speeds up examples using this primitive.
59- Fixed a bug which made CIVL violate partial order reduction invisibility condition (c2).
60- The improvement above also fixed a bug which will cause bound variables leak out of quantified
61 expressions when the quantified predicates have complex short-circuiting operations.
62- Fixed a bug which is CIVL model didn't consider Integer to Boolean implicit conversions.
63- Fixed a bug which is "fprint" calls may append strings to non-concrete 2d-arrays-of-char. Now a
64 non-trivial conditional symbolic expression will be used to handle non-concrete cases.
65- Fixed a bug in ABC, which is ABC could not recognize a function when it is declared in a some other functions
66 body while definition of it is given in root scope.
67- Fixed bugs in SARL which are all related to quantified expressions.
68
69
70------------------------- Binary Installation -------------------------
71
72For most users, this will be the easiest way to install and
73use CIVL. Developers should instead follow the instructions for
74"Source Installation" below.
75
761. Install at least one of the theorem provers below.
77The more provers you install, the more precise CIVL analysis will
78be. Note that CIVL only requires the binary executable
79version of each prover; you can ignore the libraries, various
80API bindings, etc. You just need to ensure that
81each binary executable is in your PATH when you run
82"civl config". The currently supported provers are:
83
84 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
85 download the latest, optimized build with static library
86 and executable for your OS. Place the executable file
87 "cvc3" in your PATH. You can discard everything else.
88 Alternatively, on some linux systems, CVC3 can be installed
89 using the package manager via "sudo apt-get install cvc3".
90 This will place cvc3 in /usr/bin.
91
92 - CVC4, http://cvc4.cs.nyu.edu/downloads/
93
94 - Z3, http://z3.codeplex.com/SourceControl/latest
95
962. Install a Java 8 SDK if you have not already. Go to
97
98 http://www.oracle.com/technetwork/java/javase/downloads/
99
100for the latest from Oracle. On linux, you can instead use
101the package manager:
102
103 sudo apt-get install openjdk-8-jdk
104
1053. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
106
1074. Unzip and untar the CIVL distribution file if this
108does not happen automatically. This should result in a
109folder named CIVL-TAG, where TAG is some version ID string.
110This folder contains the following:
111
112 - README : this file
113 - bin : containing one executable sh script called "civl"
114 - lib : containing civl-TAG.jar
115 - doc : containing the manual and the tutorial of CIVL
116 - emacs : CIVL-C emacs mode and its installation instructions
117 - licenses : licenses for CIVL and included libraries
118 - examples : some example CIVL programs
119
1205. You can move the CIVL folder wherever you want.
121The JAR file in the lib directory is all you need to run CIVL.
122You may also move this jar file wherever you want. You
123run CIVL by typing a command that begins
124"java -jar /path/to/civl-TAG.jar ...". For convenience
125you may instead use the shell script "civl" in bin,
126which allows you to replace "java -jar /path/to/civl-TAG.jar"
127with just "civl" on the command line. Simply edit the civl script
128to reflect the path to civl-TAG.jar and place the script
129somewhere in your PATH. Alternatively, you can just define
130an alias in your .profile, .bash_profile, or equivalent, such as
131
132alias civl='java -jar /path/to/civl-TAG.jar'
133
134In the following, we will assume that you have defined
135a command "civl" in one these ways.
136
1376. Type "civl config". This should report that it found
138the theorem provers you installed (and are in your PATH).
139It should create a file called ".sarl" in your home directory
140which you can also edit by hand.
141
142
143------------------------- Source Installation -------------------------
144
145We recommend using the Eclipse IDE for Java/EE developers.
146
1470. Install theorem provers following the directions above.
148Install Eclipse IDE for Java/EE developers if you have not already
149done so.
150
1511. Install an SVN plugin in Eclipse (such as Subversive) if you have
152 not already.
153
1542. Install prerequisite projects ABC, SARL and GMC.
155 Make sure that the three projects are put in the workspace
156 directory where CIVL will be created. Specifically:
157
158 a. Install the symbolic algebra and reasoning library SARL.
159 In Eclipse, select New Project...from SVN, use the archive
160 svn://vsl.cis.udel.edu/sarl. After entering that, open it
161 up and select the "trunk". After checking out trunk, name
162 the project "SARL". Then follow the instructions in the INSTALL
163 file for Eclipse installation. Build the sarl.jar from within
164 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
165 file and selecting Run As->Ant Build.
166
167 b. Install the C front-end ABC. In Eclipse,
168 select New Project...from SVN, use the archive
169 svn://vsl.cis.udel.edu/abc. After entering that, open it
170 up and select the "trunk". After checking out trunk, name
171 the project "ABC". Then follow the instructions in the INSTALL
172 file for Eclipse installation. Build the abc.jar from within
173 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
174 build.xml file and selecting Run As->Ant Build.
175
176 c. Install the generic model checking utilities package GMC.
177 In Eclipse, select New Project...from SVN, use the archive
178 svn://vsl.cis.udel.edu/gmc. After entering that, open it
179 up and select the "trunk". After checking out trunk, name
180 the project "GMC". Build the gmc.jar from within Eclipse
181 by right-clicking (or ctrl-clicking) on the build.xml file and
182 selecting Run As->Ant Build.
183
1843. From within Eclipse, select New Project...from SVN. The archive is
185 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
186 select the "trunk". (It is simplest to just check out the trunk for
187 the Eclipse project.)
188
1894. Check out the trunk, and create the project using the New Java
190 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
191 and other Eclipse meta-data are already in the SVN archive,
192 saving you a bunch of work.
193
1945. If you already have the VSL dependencies library, you may
195 skip this step. Otherwise, download the tgz archive of VSL
196 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
197 Unzip the .tgz file and you will have the folder vsl.
198 Move vsl to /opt.
199 Note: you probably will need to use sudo for this.
200 Also, if you don't already have a directory called /opt,
201 you will have to create it with "mkdir /opt". Also, if you
202 don't want to use /opt for some reason, you can use any
203 directory you want; just modify the instructions below
204 accordingly.
205
206 Suppose that you put the .tgz file (or .tar file if your browser
207 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
208 You can use the following commands:
209
210 $ cd DOWNLOAD
211 $ tar xzf YourTgzOrTarFile vsl
212 $ sudo mv vsl /opt
213
214 (Leave out the "x" in the tar command if the file was already
215 unzipped.) Now you can type "ls /opt/vsl", and the output
216 should be
217
218 README.txt lib licenses src
219
2206. If default_build.properties matches the configuration of your system,
221 then you can skip this step. Otherwise, you may need to create a file
222 build.properties in the directory containing build.xml.
223 Copy and paste the content from any file under properties, edit each
224 entry with the path configured in your system. The newly created file
225 build.properties will automatically be used by ant to to build the
226 .jar file.
227
2287. Navigate to Preferences -> Java -> Build Path -> ClassPath
229 Variables, and then select New to create a classpath variable VSL,
230 and specify its value to be /opt/vsl.
231
2328. Do a clean build. Everything should compile. Generate the civl.jar
233 by right-clicking (or ctrl-click on OS X) the build.xml file and
234 Run As->Ant Build.
235
2369. Somewhere on your system, create a plain text file containing
237 exactly the following two lines:
238
239#!/bin/sh
240java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
241
242 where "/Path/To/Your/workspace" is replaced with the path
243 to your Eclipse workspace directory. Name this file "civl",
244 put it in your PATH, and make it executable (chmod ugo+x civl).
245 Alternatively, you can define an alias in your .profile,
246 .bash_profile, .bashrc, or equivalent:
247
248alias civl='java -jar /Path/To/Your/workspace/CIVL/civl.jar'
249
25010. From a terminal window, execute "civl config". This should
251 find the theorem provers in your PATH and create a file
252 .sarl in your home directory.
253
25411. In Eclipse, navigate to "Run->Run Configurations... Create a new
255 JUnit configuration."
256 Name it "CIVL Regression Tests". Select "Run all tests in the
257 selected project..." and navigate to the folder "test/regress"
258 in the CIVL project. The Test runner should be JUnit 4. Under the
259 Arguments tab, type "-ea" (without the quotes) in the VM arguments
260 area (to enable assertion checking).
261
26212. An example of how to set up a single test from within Eclipse:
263 create a new Run Configuration via the Run->Run
264 Configurations... menu. Create a new "Java Application"
265 configuration. Call it "CIVL barrier2". The Project is CIVL. The
266 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
267 set the Program arguments to
268
269 verify examples/concurrency/barrier2.cvl
270
271 Modify the VM arguments as in the step above. You should now be
272 able to run the test by clicking "Run".
273
274
275
Note: See TracBrowser for help on using the repository browser.