source: CIVL/README@ 494390a

1.23 2.0 main test-branch
Last change on this file since 494390a was 4619d67, checked in by Ziqing Luo <ziqing@…>, 7 years ago

commit for release

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

  • Property mode set to 100644
File size: 11.4 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.19
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
29Ziqing Luo
30Stephen F. Siegel
31Wenhao Wu
32
33Inactive Developers:
34John Edenhofner
35Andre Marianiello
36Michael Rogers
37Timothy K. Zirkel
38Si Li
39Manchun Zheng
40Yihao Yan
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.18 -------------------------
50-- improved simplification for array-read & array-write symbolic expressions
51-- improved error message for detected data race in OpenMP programs
52-- improved error message for array out-of-bound errors
53-- added a new option in CIVL for users to decide whether to report cycles, which means possible non-termination
54-- fixed a bug which may caused CIVL crash when casting non-concrete char type expression to int
55-- fixed a bug in OpenMP Simplifier which didn't carefully check for the case of write-write data race
56-- fixed a bug which caused CIVL crash if a $choose_int has no left-hand side expression
57-- fixed a bug in casting conditional expressions which may caused branches in a condition expression
58 have different types
59-- fixed bugs in semantics analysis of compound initializers
60-- fixed a bug which may incorrectly changed the type of an array variable after its initialization
61-- fixed bugs which may caused crash when transforming OpenMP atomic and flush constructs
62-- fixed a bug related to using pragmas to control the parsing of ACSL annotations
63-- fixed bugs that were caught and marked as warning by the static analyzer of a newer version of Eclipse
64
65------------------------- Binary Installation -------------------------
66
67For most users, this will be the easiest way to install and
68use CIVL. Developers should instead follow the instructions for
69"Source Installation" below.
70
711. Install at least one of the theorem provers below.
72The more provers you install, the more precise CIVL analysis will
73be. Note that CIVL only requires the binary executable
74version of each prover; you can ignore the libraries, various
75API bindings, etc. You just need to ensure that
76each binary executable is in your PATH when you run
77"civl config". The currently supported provers are:
78
79 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
80 download the latest, optimized build with static library
81 and executable for your OS. Place the executable file
82 "cvc3" in your PATH. You can discard everything else.
83 Alternatively, on some linux systems, CVC3 can be installed
84 using the package manager via "sudo apt-get install cvc3".
85 This will place cvc3 in /usr/bin.
86
87 - CVC4, http://cvc4.cs.nyu.edu/downloads/
88
89 - Z3, http://z3.codeplex.com/SourceControl/latest
90
912. Install a Java 8 SDK if you have not already. Go to
92
93 http://www.oracle.com/technetwork/java/javase/downloads/
94
95for the latest from Oracle. On linux, you can instead use
96the package manager:
97
98 sudo apt-get install openjdk-8-jdk
99
1003. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
101
1024. Unzip and untar the CIVL distribution file if this
103does not happen automatically. This should result in a
104folder named CIVL-TAG, where TAG is some version ID string.
105This folder contains the following:
106
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 instructions
112 - licenses : licenses for CIVL and included libraries
113 - examples : some example CIVL programs
114
1155. You can move the CIVL folder wherever you want.
116The JAR file in the lib directory is all you need to run CIVL.
117You may also move this jar file wherever you want. You
118run CIVL by typing a command that begins
119"java -jar /path/to/civl-TAG.jar ...". For convenience
120you may instead use the shell script "civl" in bin,
121which allows you to replace "java -jar /path/to/civl-TAG.jar"
122with just "civl" on the command line. Simply edit the civl script
123to reflect the path to civl-TAG.jar and place the script
124somewhere in your PATH. Alternatively, you can just define
125an alias in your .profile, .bash_profile, or equivalent, such as
126
127alias civl='java -jar /path/to/civl-TAG.jar'
128
129In the following, we will assume that you have defined
130a command "civl" in one these ways.
131
1326. Type "civl config". This should report that it found
133the theorem provers you installed (and are in your PATH).
134It should create a file called ".sarl" in your home directory
135which you can also edit by hand.
136
137
138------------------------- Source Installation -------------------------
139
140We recommend using the Eclipse IDE for Java/EE developers.
141
1420. Install theorem provers following the directions above.
143Install Eclipse IDE for Java/EE developers if you have not already
144done so.
145
1461. Install an SVN plugin in Eclipse (such as Subversive) if you have
147 not already.
148
1492. Install prerequisite projects ABC, SARL and GMC.
150 Make sure that the three projects are put in the workspace
151 directory where CIVL will be created. Specifically:
152
153 a. Install the symbolic algebra and reasoning library SARL.
154 In Eclipse, select New Project...from SVN, use the archive
155 svn://vsl.cis.udel.edu/sarl. After entering that, open it
156 up and select the "trunk". After checking out trunk, name
157 the project "SARL". Then follow the instructions in the INSTALL
158 file for Eclipse installation. Build the sarl.jar from within
159 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
160 file and selecting Run As->Ant Build.
161
162 b. Install the C front-end ABC. In Eclipse,
163 select New Project...from SVN, use the archive
164 svn://vsl.cis.udel.edu/abc. After entering that, open it
165 up and select the "trunk". After checking out trunk, name
166 the project "ABC". Then follow the instructions in the INSTALL
167 file for Eclipse installation. Build the abc.jar from within
168 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
169 build.xml file and selecting Run As->Ant Build.
170
171 c. Install the generic model checking utilities package GMC.
172 In Eclipse, select New Project...from SVN, use the archive
173 svn://vsl.cis.udel.edu/gmc. After entering that, open it
174 up and select the "trunk". After checking out trunk, name
175 the project "GMC". Build the gmc.jar from within Eclipse
176 by right-clicking (or ctrl-clicking) on the build.xml file and
177 selecting Run As->Ant Build.
178
1793. From within Eclipse, select New Project...from SVN. The archive is
180 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
181 select the "trunk". (It is simplest to just check out the trunk for
182 the Eclipse project.)
183
1844. Check out the trunk, and create the project using the New Java
185 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
186 and other Eclipse meta-data are already in the SVN archive,
187 saving you a bunch of work.
188
1895. If you already have the VSL dependencies library, you may
190 skip this step. Otherwise, download the tgz archive of VSL
191 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
192 Unzip the .tgz file and you will have the folder vsl.
193 Move vsl to /opt.
194 Note: you probably will need to use sudo for this.
195 Also, if you don't already have a directory called /opt,
196 you will have to create it with "mkdir /opt". Also, if you
197 don't want to use /opt for some reason, you can use any
198 directory you want; just modify the instructions below
199 accordingly.
200
201 Suppose that you put the .tgz file (or .tar file if your browser
202 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
203 You can use the following commands:
204
205 $ cd DOWNLOAD
206 $ tar xzf YourTgzOrTarFile vsl
207 $ sudo mv vsl /opt
208
209 (Leave out the "x" in the tar command if the file was already
210 unzipped.) Now you can type "ls /opt/vsl", and the output
211 should be
212
213 README.txt lib licenses src
214
2156. If default_build.properties matches the configuration of your system,
216 then you can skip this step. Otherwise, you may need to create a file
217 build.properties in the directory containing build.xml.
218 Copy and paste the content from any file under properties, edit each
219 entry with the path configured in your system. The newly created file
220 build.properties will automatically be used by ant to to build the
221 .jar file.
222
2237. Navigate to Preferences -> Java -> Build Path -> ClassPath
224 Variables, and then select New to create a classpath variable VSL,
225 and specify its value to be /opt/vsl.
226
2278. Do a clean build. Everything should compile. Generate the civl.jar
228 by right-clicking (or ctrl-click on OS X) the build.xml file and
229 Run As->Ant Build.
230
2319. Shortcuts for running CIVL
232
233 Somewhere on your system, create a plain text file containing
234 exactly the following two lines:
235
236#!/bin/sh
237java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
238
239 where "/Path/To/Your/workspace" is replaced with the path
240 to your Eclipse workspace directory. Name this file "civl",
241 put it in your PATH, and make it executable (chmod ugo+x civl).
242
24310. From a terminal window, execute "civl config". This should
244 find the theorem provers in your PATH and create a file
245 .sarl in your home directory.
246
24711. In Eclipse, navigate to "Run->Run Configurations... Create a new
248 JUnit configuration."
249 Name it "CIVL Regression Tests". Select "Run all tests in the
250 selected project..." and navigate to the folder "test/regress"
251 in the CIVL project. The Test runner should be JUnit 4. Under the
252 Arguments tab, type "-ea" (without the quotes) in the VM arguments
253 area (to enable assertion checking).
254
25512. An example of how to set up a single test from within Eclipse:
256 create a new Run Configuration via the Run->Run
257 Configurations... menu. Create a new "Java Application"
258 configuration. Call it "CIVL barrier2". The Project is CIVL. The
259 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
260 set the Program arguments to
261
262 verify examples/concurrency/barrier2.cvl
263
264 Modify the VM arguments as in the step above. You should now be
265 able to run the test by clicking "Run".
266
267
268
Note: See TracBrowser for help on using the repository browser.