source: CIVL/README@ 595bbec

1.23 2.0 main test-branch
Last change on this file since 595bbec was 2656d98, checked in by Ziqing Luo <ziqing@…>, 7 years ago

prepare for release

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

  • Property mode set to 100644
File size: 11.1 KB
Line 
1 CIVL: The Concurrency Intermediate Verification Language
2 v1.18
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-------------------------- Updates from v1.17.1 -------------------------
50-- fixed a bug in semantics analysis on ACSL annotations
51-- fixed a bug which made crash when compiling incomplete pragmas
52-- fixed a bug which made the replay mode miss errors that were caught in verification mode
53-- fixed a bug which allowed transformers to set illegal child nodes to an AST node
54-- fixed several bugs that caused syntax errors for theorem provers
55-- fixed a bug which allowed non-lvalue expression be the argument of an ADDRESS_OF operator
56-- fixed a infinite simplification bug in SARL which caused stack overflow
57-- fixed a bug which caused non-scalar type variables have incorrect dynamic types after initialization
58-- CIVL will no longer ignore theorem prover syntax errors
59-- CIVL will always make sure that the two operands of an assignment have compatible dynamic types
60-- improved source information for AST nodes that are inserted by transformers
61-- improved conditional-expression and array-read-write simplification in SARL
62
63------------------------- Binary Installation -------------------------
64
65For most users, this will be the easiest way to install and
66use CIVL. Developers should instead follow the instructions for
67"Source Installation" below.
68
691. Install at least one of the theorem provers below.
70The more provers you install, the more precise CIVL analysis will
71be. Note that CIVL only requires the binary executable
72version of each prover; you can ignore the libraries, various
73API bindings, etc. You just need to ensure that
74each binary executable is in your PATH when you run
75"civl config". The currently supported provers are:
76
77 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
78 download the latest, optimized build with static library
79 and executable for your OS. Place the executable file
80 "cvc3" in your PATH. You can discard everything else.
81 Alternatively, on some linux systems, CVC3 can be installed
82 using the package manager via "sudo apt-get install cvc3".
83 This will place cvc3 in /usr/bin.
84
85 - CVC4, http://cvc4.cs.nyu.edu/downloads/
86
87 - Z3, http://z3.codeplex.com/SourceControl/latest
88
892. Install a Java 8 SDK if you have not already. Go to
90
91 http://www.oracle.com/technetwork/java/javase/downloads/
92
93for the latest from Oracle. On linux, you can instead use
94the package manager:
95
96 sudo apt-get install openjdk-8-jdk
97
983. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
99
1004. Unzip and untar the CIVL distribution file if this
101does not happen automatically. This should result in a
102folder named CIVL-TAG, where TAG is some version ID string.
103This folder contains the following:
104
105 - README : this file
106 - bin : containing one executable sh script called "civl"
107 - lib : containing civl-TAG.jar
108 - doc : containing the manual and the tutorial of CIVL
109 - emacs : CIVL-C emacs mode and its installation instructions
110 - licenses : licenses for CIVL and included libraries
111 - examples : some example CIVL programs
112
1135. You can move the CIVL folder wherever you want.
114The JAR file in the lib directory is all you need to run CIVL.
115You may also move this jar file wherever you want. You
116run CIVL by typing a command that begins
117"java -jar /path/to/civl-TAG.jar ...". For convenience
118you may instead use the shell script "civl" in bin,
119which allows you to replace "java -jar /path/to/civl-TAG.jar"
120with just "civl" on the command line. Simply edit the civl script
121to reflect the path to civl-TAG.jar and place the script
122somewhere in your PATH. Alternatively, you can just define
123an alias in your .profile, .bash_profile, or equivalent, such as
124
125alias civl='java -jar /path/to/civl-TAG.jar'
126
127In the following, we will assume that you have defined
128a command "civl" in one these ways.
129
1306. Type "civl config". This should report that it found
131the theorem provers you installed (and are in your PATH).
132It should create a file called ".sarl" in your home directory
133which you can also edit by hand.
134
135
136------------------------- Source Installation -------------------------
137
138We recommend using the Eclipse IDE for Java/EE developers.
139
1400. Install theorem provers following the directions above.
141Install Eclipse IDE for Java/EE developers if you have not already
142done so.
143
1441. Install an SVN plugin in Eclipse (such as Subversive) if you have
145 not already.
146
1472. Install prerequisite projects ABC, SARL and GMC.
148 Make sure that the three projects are put in the workspace
149 directory where CIVL will be created. Specifically:
150
151 a. Install the symbolic algebra and reasoning library SARL.
152 In Eclipse, select New Project...from SVN, use the archive
153 svn://vsl.cis.udel.edu/sarl. After entering that, open it
154 up and select the "trunk". After checking out trunk, name
155 the project "SARL". Then follow the instructions in the INSTALL
156 file for Eclipse installation. Build the sarl.jar from within
157 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
158 file and selecting Run As->Ant Build.
159
160 b. Install the C front-end ABC. In Eclipse,
161 select New Project...from SVN, use the archive
162 svn://vsl.cis.udel.edu/abc. After entering that, open it
163 up and select the "trunk". After checking out trunk, name
164 the project "ABC". Then follow the instructions in the INSTALL
165 file for Eclipse installation. Build the abc.jar from within
166 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
167 build.xml file and selecting Run As->Ant Build.
168
169 c. Install the generic model checking utilities package GMC.
170 In Eclipse, select New Project...from SVN, use the archive
171 svn://vsl.cis.udel.edu/gmc. After entering that, open it
172 up and select the "trunk". After checking out trunk, name
173 the project "GMC". Build the gmc.jar from within Eclipse
174 by right-clicking (or ctrl-clicking) on the build.xml file and
175 selecting Run As->Ant Build.
176
1773. From within Eclipse, select New Project...from SVN. The archive is
178 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
179 select the "trunk". (It is simplest to just check out the trunk for
180 the Eclipse project.)
181
1824. Check out the trunk, and create the project using the New Java
183 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
184 and other Eclipse meta-data are already in the SVN archive,
185 saving you a bunch of work.
186
1875. If you already have the VSL dependencies library, you may
188 skip this step. Otherwise, download the tgz archive of VSL
189 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
190 Unzip the .tgz file and you will have the folder vsl.
191 Move vsl to /opt.
192 Note: you probably will need to use sudo for this.
193 Also, if you don't already have a directory called /opt,
194 you will have to create it with "mkdir /opt". Also, if you
195 don't want to use /opt for some reason, you can use any
196 directory you want; just modify the instructions below
197 accordingly.
198
199 Suppose that you put the .tgz file (or .tar file if your browser
200 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
201 You can use the following commands:
202
203 $ cd DOWNLOAD
204 $ tar xzf YourTgzOrTarFile vsl
205 $ sudo mv vsl /opt
206
207 (Leave out the "x" in the tar command if the file was already
208 unzipped.) Now you can type "ls /opt/vsl", and the output
209 should be
210
211 README.txt lib licenses src
212
2136. If default_build.properties matches the configuration of your system,
214 then you can skip this step. Otherwise, you may need to create a file
215 build.properties in the directory containing build.xml.
216 Copy and paste the content from any file under properties, edit each
217 entry with the path configured in your system. The newly created file
218 build.properties will automatically be used by ant to to build the
219 .jar file.
220
2217. Navigate to Preferences -> Java -> Build Path -> ClassPath
222 Variables, and then select New to create a classpath variable VSL,
223 and specify its value to be /opt/vsl.
224
2258. Do a clean build. Everything should compile. Generate the civl.jar
226 by right-clicking (or ctrl-click on OS X) the build.xml file and
227 Run As->Ant Build.
228
2299. Shortcuts for running CIVL
230
231 Somewhere on your system, create a plain text file containing
232 exactly the following two lines:
233
234#!/bin/sh
235java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
236
237 where "/Path/To/Your/workspace" is replaced with the path
238 to your Eclipse workspace directory. Name this file "civl",
239 put it in your PATH, and make it executable (chmod ugo+x civl).
240
24110. From a terminal window, execute "civl config". This should
242 find the theorem provers in your PATH and create a file
243 .sarl in your home directory.
244
24511. In Eclipse, navigate to "Run->Run Configurations... Create a new
246 JUnit configuration."
247 Name it "CIVL Regression Tests". Select "Run all tests in the
248 selected project..." and navigate to the folder "test/regress"
249 in the CIVL project. The Test runner should be JUnit 4. Under the
250 Arguments tab, type "-ea" (without the quotes) in the VM arguments
251 area (to enable assertion checking).
252
25312. An example of how to set up a single test from within Eclipse:
254 create a new Run Configuration via the Run->Run
255 Configurations... menu. Create a new "Java Application"
256 configuration. Call it "CIVL barrier2". The Project is CIVL. The
257 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
258 set the Program arguments to
259
260 verify examples/concurrency/barrier2.cvl
261
262 Modify the VM arguments as in the step above. You should now be
263 able to run the test by clicking "Run".
264
265
266
Note: See TracBrowser for help on using the repository browser.