source: CIVL/README@ e8576bf

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

merged Wenhao's fix for strlen and outofmemory ticket

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

  • Property mode set to 100644
File size: 11.2 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.14
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
32Yihao Yan
33
34Inactive Developers:
35John Edenhofner
36Andre Marianiello
37Michael Rogers
38Timothy K. Zirkel
39Si Li
40Manchun Zheng
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
50-------------------------- Updates from v1.13 -------------------------
51-- added headers for all C standard libraries
52-- fixed a bug and improved the simplification in SARL for power expressions
53-- fixed a bug that $equal cannot compare objects with different qualifiers
54-- theorem provers now translate queries in a compressed pattern using
55 "let .. in .."
56-- fixed some bugs in why3 translator
57-- the printing of symbolic expressions will switch to compressed tree if the
58 size of the symbolic expression exceeds some threshold.
59-- fixed a bug that can may CIVL crash when user disable the check of division by
60 zero and a division by zero still happens
61-- fixed a bug in SARL which is casued by caching negations of boolean expressions
62-- improved ABC for "normalizing" variable declarations with external linkages.
63 After normalization, variable declarations with external linkage will only
64 appear in file scope. In addition, back-ends use ABC have no need to deal with
65 "extern" and "const" specifiers and qualifiers.
66-- Added support for ACSL predicate.
67
68
69------------------------- Binary Installation -------------------------
70
71For most users, this will be the easiest way to install and
72use CIVL. Developers should instead follow the instructions for
73"Source Installation" below.
74
751. Install at least one of the theorem provers below.
76The more provers you install, the more precise CIVL analysis will
77be. Note that CIVL only requires the binary executable
78version of each prover; you can ignore the libraries, various
79API bindings, etc. You just need to ensure that
80each binary executable is in your PATH when you run
81"civl config". The currently supported provers are:
82
83 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
84 download the latest, optimized build with static library
85 and executable for your OS. Place the executable file
86 "cvc3" in your PATH. You can discard everything else.
87 Alternatively, on some linux systems, CVC3 can be installed
88 using the package manager via "sudo apt-get install cvc3".
89 This will place cvc3 in /usr/bin.
90
91 - CVC4, http://cvc4.cs.nyu.edu/downloads/
92
93 - Z3, http://z3.codeplex.com/SourceControl/latest
94
952. Install a Java 8 SDK if you have not already. Go to
96
97 http://www.oracle.com/technetwork/java/javase/downloads/
98
99for the latest from Oracle. On linux, you can instead use
100the package manager:
101
102 sudo apt-get install openjdk-8-jdk
103
1043. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
105
1064. Unzip and untar the CIVL distribution file if this
107does not happen automatically. This should result in a
108folder named CIVL-TAG, where TAG is some version ID string.
109This folder contains the following:
110
111 - README : this file
112 - bin : containing one executable sh script called "civl"
113 - lib : containing civl-TAG.jar
114 - doc : containing the manual and the tutorial of CIVL
115 - emacs : CIVL-C emacs mode and its installation instructions
116 - licenses : licenses for CIVL and included libraries
117 - examples : some example CIVL programs
118
1195. You can move the CIVL folder wherever you want.
120The JAR file in the lib directory is all you need to run CIVL.
121You may also move this jar file wherever you want. You
122run CIVL by typing a command that begins
123"java -jar /path/to/civl-TAG.jar ...". For convenience
124you may instead use the shell script "civl" in bin,
125which allows you to replace "java -jar /path/to/civl-TAG.jar"
126with just "civl" on the command line. Simply edit the civl script
127to reflect the path to civl-TAG.jar and place the script
128somewhere in your PATH. Alternatively, you can just define
129an alias in your .profile, .bash_profile, or equivalent, such as
130
131alias civl='java -jar /path/to/civl-TAG.jar'
132
133In the following, we will assume that you have defined
134a command "civl" in one these ways.
135
1366. Type "civl config". This should report that it found
137the theorem provers you installed (and are in your PATH).
138It should create a file called ".sarl" in your home directory
139which you can also edit by hand.
140
141
142------------------------- Source Installation -------------------------
143
144We recommend using the Eclipse IDE for Java/EE developers.
145
1460. Install theorem provers following the directions above.
147Install Eclipse IDE for Java/EE developers if you have not already
148done so.
149
1501. Install an SVN plugin in Eclipse (such as Subversive) if you have
151 not already.
152
1532. Install prerequisite projects ABC, SARL and GMC.
154 Make sure that the three projects are put in the workspace
155 directory where CIVL will be created. Specifically:
156
157 a. Install the symbolic algebra and reasoning library SARL.
158 In Eclipse, select New Project...from SVN, use the archive
159 svn://vsl.cis.udel.edu/sarl. After entering that, open it
160 up and select the "trunk". After checking out trunk, name
161 the project "SARL". Then follow the instructions in the INSTALL
162 file for Eclipse installation. Build the sarl.jar from within
163 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
164 file and selecting Run As->Ant Build.
165
166 b. Install the C front-end ABC. In Eclipse,
167 select New Project...from SVN, use the archive
168 svn://vsl.cis.udel.edu/abc. After entering that, open it
169 up and select the "trunk". After checking out trunk, name
170 the project "ABC". Then follow the instructions in the INSTALL
171 file for Eclipse installation. Build the abc.jar from within
172 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
173 build.xml file and selecting Run As->Ant Build.
174
175 c. Install the generic model checking utilities package GMC.
176 In Eclipse, select New Project...from SVN, use the archive
177 svn://vsl.cis.udel.edu/gmc. After entering that, open it
178 up and select the "trunk". After checking out trunk, name
179 the project "GMC". Build the gmc.jar from within Eclipse
180 by right-clicking (or ctrl-clicking) on the build.xml file and
181 selecting Run As->Ant Build.
182
1833. From within Eclipse, select New Project...from SVN. The archive is
184 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
185 select the "trunk". (It is simplest to just check out the trunk for
186 the Eclipse project.)
187
1884. Check out the trunk, and create the project using the New Java
189 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
190 and other Eclipse meta-data are already in the SVN archive,
191 saving you a bunch of work.
192
1935. If you already have the VSL dependencies library, you may
194 skip this step. Otherwise, download the tgz archive of VSL
195 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
196 Unzip the .tgz file and you will have the folder vsl.
197 Move vsl to /opt.
198 Note: you probably will need to use sudo for this.
199 Also, if you don't already have a directory called /opt,
200 you will have to create it with "mkdir /opt". Also, if you
201 don't want to use /opt for some reason, you can use any
202 directory you want; just modify the instructions below
203 accordingly.
204
205 Suppose that you put the .tgz file (or .tar file if your browser
206 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
207 You can use the following commands:
208
209 $ cd DOWNLOAD
210 $ tar xzf YourTgzOrTarFile vsl
211 $ sudo mv vsl /opt
212
213 (Leave out the "x" in the tar command if the file was already
214 unzipped.) Now you can type "ls /opt/vsl", and the output
215 should be
216
217 README.txt lib licenses src
218
2196. If default_build.properties matches the configuration of your system,
220 then you can skip this step. Otherwise, you may need to create a file
221 build.properties in the directory containing build.xml.
222 Copy and paste the content from any file under properties, edit each
223 entry with the path configured in your system. The newly created file
224 build.properties will automatically be used by ant to to build the
225 .jar file.
226
2277. Navigate to Preferences -> Java -> Build Path -> ClassPath
228 Variables, and then select New to create a classpath variable VSL,
229 and specify its value to be /opt/vsl.
230
2318. Do a clean build. Everything should compile. Generate the civl.jar
232 by right-clicking (or ctrl-click on OS X) the build.xml file and
233 Run As->Ant Build.
234
2359. Shortcuts for running CIVL
236
237 Somewhere on your system, create a plain text file containing
238 exactly the following two lines:
239
240#!/bin/sh
241java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
242
243 where "/Path/To/Your/workspace" is replaced with the path
244 to your Eclipse workspace directory. Name this file "civl",
245 put it in your PATH, and make it executable (chmod ugo+x civl).
246
24710. From a terminal window, execute "civl config". This should
248 find the theorem provers in your PATH and create a file
249 .sarl in your home directory.
250
25111. In Eclipse, navigate to "Run->Run Configurations... Create a new
252 JUnit configuration."
253 Name it "CIVL Regression Tests". Select "Run all tests in the
254 selected project..." and navigate to the folder "test/regress"
255 in the CIVL project. The Test runner should be JUnit 4. Under the
256 Arguments tab, type "-ea" (without the quotes) in the VM arguments
257 area (to enable assertion checking).
258
25912. An example of how to set up a single test from within Eclipse:
260 create a new Run Configuration via the Run->Run
261 Configurations... menu. Create a new "Java Application"
262 configuration. Call it "CIVL barrier2". The Project is CIVL. The
263 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
264 set the Program arguments to
265
266 verify examples/concurrency/barrier2.cvl
267
268 Modify the VM arguments as in the step above. You should now be
269 able to run the test by clicking "Run".
270
271
272
Note: See TracBrowser for help on using the repository browser.