source: CIVL/README@ b97b3d04

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

commit for release, add updates

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

  • Property mode set to 100644
File size: 10.8 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.10
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
50-------------------------- Updates from v1.9 -------------------------
51- Re-designed the model checking engine GMC, let a "node" enclosing a
52 generic STATE and other informations related to model checker. A
53 client of GMC can implement a STATE purely based on the client
54 application.
55- Fixed a bug reported by a CIVL user: Run locksbad.cvl with replay gives an exception;
56- Fixed a bug reported by a CIVL user: An unexpected error reported when doing memcpy
57 on pointers pointing to arrays.
58
59------------------------- Binary Installation -------------------------
60
61For most users, this will be the easiest way to install and
62use CIVL. Developers should instead follow the instructions for
63"Source Installation" below.
64
651. Install at least one of the theorem provers below.
66The more provers you install, the more precise CIVL analysis will
67be. Note that CIVL only requires the binary executable
68version of each prover; you can ignore the libraries, various
69API bindings, etc. You just need to ensure that
70each binary executable is in your PATH when you run
71"civl config". The currently supported provers are:
72
73 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
74 download the latest, optimized build with static library
75 and executable for your OS. Place the executable file
76 "cvc3" in your PATH. You can discard everything else.
77 Alternatively, on some linux systems, CVC3 can be installed
78 using the package manager via "sudo apt-get install cvc3".
79 This will place cvc3 in /usr/bin.
80
81 - CVC4, http://cvc4.cs.nyu.edu/downloads/
82
83 - Z3, http://z3.codeplex.com/SourceControl/latest
84
852. Install a Java 8 SDK if you have not already. Go to
86
87 http://www.oracle.com/technetwork/java/javase/downloads/
88
89for the latest from Oracle. On linux, you can instead use
90the package manager:
91
92 sudo apt-get install openjdk-8-jdk
93
943. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
95
964. Unzip and untar the CIVL distribution file if this
97does not happen automatically. This should result in a
98folder named CIVL-TAG, where TAG is some version ID string.
99This folder contains the following:
100
101 - README : this file
102 - bin : containing one executable sh script called "civl"
103 - lib : containing civl-TAG.jar
104 - doc : containing the manual and the tutorial of CIVL
105 - emacs : CIVL-C emacs mode and its installation instructions
106 - licenses : licenses for CIVL and included libraries
107 - examples : some example CIVL programs
108
1095. You can move the CIVL folder wherever you want.
110The JAR file in the lib directory is all you need to run CIVL.
111You may also move this jar file wherever you want. You
112run CIVL by typing a command that begins
113"java -jar /path/to/civl-TAG.jar ...". For convenience
114you may instead use the shell script "civl" in bin,
115which allows you to replace "java -jar /path/to/civl-TAG.jar"
116with just "civl" on the command line. Simply edit the civl script
117to reflect the path to civl-TAG.jar and place the script
118somewhere in your PATH. Alternatively, you can just define
119an alias in your .profile, .bash_profile, or equivalent, such as
120
121alias civl='java -jar /path/to/civl-TAG.jar'
122
123In the following, we will assume that you have defined
124a command "civl" in one these ways.
125
1266. Type "civl config". This should report that it found
127the theorem provers you installed (and are in your PATH).
128It should create a file called ".sarl" in your home directory
129which you can also edit by hand.
130
131
132------------------------- Source Installation -------------------------
133
134We recommend using the Eclipse IDE for Java/EE developers.
135
1360. Install theorem provers following the directions above.
137Install Eclipse IDE for Java/EE developers if you have not already
138done so.
139
1401. Install an SVN plugin in Eclipse (such as Subversive) if you have
141 not already.
142
1432. Install prerequisite projects ABC, SARL and GMC.
144 Make sure that the three projects are put in the workspace
145 directory where CIVL will be created. Specifically:
146
147 a. Install the symbolic algebra and reasoning library SARL.
148 In Eclipse, select New Project...from SVN, use the archive
149 svn://vsl.cis.udel.edu/sarl. After entering that, open it
150 up and select the "trunk". After checking out trunk, name
151 the project "SARL". Then follow the instructions in the INSTALL
152 file for Eclipse installation. Build the sarl.jar from within
153 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
154 file and selecting Run As->Ant Build.
155
156 b. Install the C front-end ABC. In Eclipse,
157 select New Project...from SVN, use the archive
158 svn://vsl.cis.udel.edu/abc. After entering that, open it
159 up and select the "trunk". After checking out trunk, name
160 the project "ABC". Then follow the instructions in the INSTALL
161 file for Eclipse installation. Build the abc.jar from within
162 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
163 build.xml file and selecting Run As->Ant Build.
164
165 c. Install the generic model checking utilities package GMC.
166 In Eclipse, select New Project...from SVN, use the archive
167 svn://vsl.cis.udel.edu/gmc. After entering that, open it
168 up and select the "trunk". After checking out trunk, name
169 the project "GMC". Build the gmc.jar from within Eclipse
170 by right-clicking (or ctrl-clicking) on the build.xml file and
171 selecting Run As->Ant Build.
172
1733. From within Eclipse, select New Project...from SVN. The archive is
174 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
175 select the "trunk". (It is simplest to just check out the trunk for
176 the Eclipse project.)
177
1784. Check out the trunk, and create the project using the New Java
179 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
180 and other Eclipse meta-data are already in the SVN archive,
181 saving you a bunch of work.
182
1835. If you already have the VSL dependencies library, you may
184 skip this step. Otherwise, download the tgz archive of VSL
185 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
186 Unzip the .tgz file and you will have the folder vsl.
187 Move vsl to /opt.
188 Note: you probably will need to use sudo for this.
189 Also, if you don't already have a directory called /opt,
190 you will have to create it with "mkdir /opt". Also, if you
191 don't want to use /opt for some reason, you can use any
192 directory you want; just modify the instructions below
193 accordingly.
194
195 Suppose that you put the .tgz file (or .tar file if your browser
196 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
197 You can use the following commands:
198
199 $ cd DOWNLOAD
200 $ tar xzf YourTgzOrTarFile vsl
201 $ sudo mv vsl /opt
202
203 (Leave out the "x" in the tar command if the file was already
204 unzipped.) Now you can type "ls /opt/vsl", and the output
205 should be
206
207 README.txt lib licenses src
208
2096. If default_build.properties matches the configuration of your system,
210 then you can skip this step. Otherwise, you may need to create a file
211 build.properties in the directory containing build.xml.
212 Copy and paste the content from any file under properties, edit each
213 entry with the path configured in your system. The newly created file
214 build.properties will automatically be used by ant to to build the
215 .jar file.
216
2177. Navigate to Preferences -> Java -> Build Path -> ClassPath
218 Variables, and then select New to create a classpath variable VSL,
219 and specify its value to be /opt/vsl.
220
2218. Do a clean build. Everything should compile. Generate the civl.jar
222 by right-clicking (or ctrl-click on OS X) the build.xml file and
223 Run As->Ant Build.
224
2259. Somewhere on your system, create a plain text file containing
226 exactly the following two lines:
227
228#!/bin/sh
229java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
230
231 where "/Path/To/Your/workspace" is replaced with the path
232 to your Eclipse workspace directory. Name this file "civl",
233 put it in your PATH, and make it executable (chmod ugo+x civl).
234 Alternatively, you can define an alias in your .profile,
235 .bash_profile, .bashrc, or equivalent:
236
237alias civl='java -jar /Path/To/Your/workspace/CIVL/civl.jar'
238
23910. From a terminal window, execute "civl config". This should
240 find the theorem provers in your PATH and create a file
241 .sarl in your home directory.
242
24311. In Eclipse, navigate to "Run->Run Configurations... Create a new
244 JUnit configuration."
245 Name it "CIVL Regression Tests". Select "Run all tests in the
246 selected project..." and navigate to the folder "test/regress"
247 in the CIVL project. The Test runner should be JUnit 4. Under the
248 Arguments tab, type "-ea" (without the quotes) in the VM arguments
249 area (to enable assertion checking).
250
25112. An example of how to set up a single test from within Eclipse:
252 create a new Run Configuration via the Run->Run
253 Configurations... menu. Create a new "Java Application"
254 configuration. Call it "CIVL barrier2". The Project is CIVL. The
255 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
256 set the Program arguments to
257
258 verify examples/concurrency/barrier2.cvl
259
260 Modify the VM arguments as in the step above. You should now be
261 able to run the test by clicking "Run".
262
263
264
Note: See TracBrowser for help on using the repository browser.