source: CIVL/README@ af133a3

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since af133a3 was 3e9b0c2, checked in by Ziqing Luo <ziqing@…>, 8 years ago

commit release 1.16

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

  • Property mode set to 100644
File size: 11.0 KB
RevLine 
[c7a0783]1 CIVL: The Concurrency Intermediate Verification Language
[3e9b0c2]2 v1.16
[c7a0783]3
4------------------------------ Overview -------------------------------
5
[3783023]6CIVL is a framework encompassing...
[c7a0783]7
8 * a programming language, CIVL-C, which adds to C a number of
[9e3a674]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,
[dcde04a]13 such as MPI, OpenMP, Pthread, CUDA, and Chapel. CIVL-C also
14 provides a number of primitives supporting verification.
[9e3a674]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.
[c7a0783]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
[c7cef4b]26Active Developers:
[5af87592]27Matthew B. Dwyer
[9381b33]28Mitchell Gerrard
[5af87592]29Ziqing Luo
[c7a0783]30Stephen F. Siegel
[c7cef4b]31Wenhao Wu
32Yihao Yan
33
34Inactive Developers:
35John Edenhofner
36Andre Marianiello
37Michael Rogers
[5af87592]38Timothy K. Zirkel
[8a2a9d2]39Si Li
40Manchun Zheng
[c7a0783]41
[8d0a007]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
[d5bcd36]49
[3e9b0c2]50-------------------------- Updates from v1.15.1 -------------------------
51-- CIVL functionalities
52 - enable CIVL to parse ACSL expressions (“a<b<c”) correctly
53 - ACSL annotations requires pragma ACSL
54 - improve the handling on symbolic constants with pointer type
55-- CIVL output
56 - improve the printing of source file names.
57 - improve the printing of errors related with bundle data.
58-- Stability
59 - handle exceptions caused by missing source files
60 - handle exceptions related with incomplete struct
61 - handle exceptions related with incorrect macro definitions
62 - handle JVM Out-Of-Memory-Error exceptions
63-- Misc.
64 - fix SARL internal defects
65 - fix CIVL internal defects
66 - fix loop invariants transformer
67 - fix the grammar of ACSL-FORALL expressions
68 - fix the grammar of range structure
[26bb514]69
[ae48dce]70
[8d0a007]71------------------------- Binary Installation -------------------------
[c7a0783]72
[be6d877]73For most users, this will be the easiest way to install and
74use CIVL. Developers should instead follow the instructions for
[bb733f2]75"Source Installation" below.
[583119f]76
[be6d877]771. Install at least one of the theorem provers below.
[536af01]78The more provers you install, the more precise CIVL analysis will
[be6d877]79be. Note that CIVL only requires the binary executable
80version of each prover; you can ignore the libraries, various
81API bindings, etc. You just need to ensure that
82each binary executable is in your PATH when you run
83"civl config". The currently supported provers are:
[bb733f2]84
[be6d877]85 - CVC3, http://www.cs.nyu.edu/acsys/cvc3/download.html
86 download the latest, optimized build with static library
87 and executable for your OS. Place the executable file
88 "cvc3" in your PATH. You can discard everything else.
89 Alternatively, on some linux systems, CVC3 can be installed
90 using the package manager via "sudo apt-get install cvc3".
91 This will place cvc3 in /usr/bin.
92
93 - CVC4, http://cvc4.cs.nyu.edu/downloads/
94
95 - Z3, http://z3.codeplex.com/SourceControl/latest
[bb733f2]96
[20b16d5]972. Install a Java 8 SDK if you have not already. Go to
[bb733f2]98
99 http://www.oracle.com/technetwork/java/javase/downloads/
100
101for the latest from Oracle. On linux, you can instead use
102the package manager:
103
[20b16d5]104 sudo apt-get install openjdk-8-jdk
[bb733f2]105
[be6d877]1063. Download the CIVL distribution from http://vsl.cis.udel.edu/civl.
[bb733f2]107
[be6d877]1084. Unzip and untar the CIVL distribution file if this
109does not happen automatically. This should result in a
110folder named CIVL-TAG, where TAG is some version ID string.
111This folder contains the following:
[c7a0783]112
[6f2b49d]113 - README : this file
114 - bin : containing one executable sh script called "civl"
115 - lib : containing civl-TAG.jar
116 - doc : containing the manual and the tutorial of CIVL
[bb733f2]117 - emacs : CIVL-C emacs mode and its installation instructions
[c7a0783]118 - licenses : licenses for CIVL and included libraries
119 - examples : some example CIVL programs
120
[536af01]1215. You can move the CIVL folder wherever you want.
122The JAR file in the lib directory is all you need to run CIVL.
123You may also move this jar file wherever you want. You
124run CIVL by typing a command that begins
125"java -jar /path/to/civl-TAG.jar ...". For convenience
126you may instead use the shell script "civl" in bin,
127which allows you to replace "java -jar /path/to/civl-TAG.jar"
128with just "civl" on the command line. Simply edit the civl script
129to reflect the path to civl-TAG.jar and place the script
130somewhere in your PATH. Alternatively, you can just define
131an alias in your .profile, .bash_profile, or equivalent, such as
[583119f]132
[536af01]133alias civl='java -jar /path/to/civl-TAG.jar'
[583119f]134
[536af01]135In the following, we will assume that you have defined
136a command "civl" in one these ways.
137
1386. Type "civl config". This should report that it found
[be6d877]139the theorem provers you installed (and are in your PATH).
140It should create a file called ".sarl" in your home directory
141which you can also edit by hand.
[bb733f2]142
143
[8d0a007]144------------------------- Source Installation -------------------------
145
146We recommend using the Eclipse IDE for Java/EE developers.
147
[be6d877]1480. Install theorem provers following the directions above.
[bb733f2]149Install Eclipse IDE for Java/EE developers if you have not already
150done so.
151
[83c054c]1521. Install an SVN plugin in Eclipse (such as Subversive) if you have
153 not already.
154
1552. Install prerequisite projects ABC, SARL and GMC.
[8d0a007]156 Make sure that the three projects are put in the workspace
[536af01]157 directory where CIVL will be created. Specifically:
[8d0a007]158
[ae48dce]159 a. Install the symbolic algebra and reasoning library SARL.
160 In Eclipse, select New Project...from SVN, use the archive
161 svn://vsl.cis.udel.edu/sarl. After entering that, open it
162 up and select the "trunk". After checking out trunk, name
163 the project "SARL". Then follow the instructions in the INSTALL
164 file for Eclipse installation. Build the sarl.jar from within
165 Eclipse by right-clicking (or ctrl-clicking) on the build.xml
166 file and selecting Run As->Ant Build.
167
168 b. Install the C front-end ABC. In Eclipse,
[8d0a007]169 select New Project...from SVN, use the archive
170 svn://vsl.cis.udel.edu/abc. After entering that, open it
171 up and select the "trunk". After checking out trunk, name
172 the project "ABC". Then follow the instructions in the INSTALL
173 file for Eclipse installation. Build the abc.jar from within
174 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
175 build.xml file and selecting Run As->Ant Build.
176
[ae48dce]177 c. Install the generic model checking utilities package GMC.
[8d0a007]178 In Eclipse, select New Project...from SVN, use the archive
179 svn://vsl.cis.udel.edu/gmc. After entering that, open it
180 up and select the "trunk". After checking out trunk, name
181 the project "GMC". Build the gmc.jar from within Eclipse
182 by right-clicking (or ctrl-clicking) on the build.xml file and
183 selecting Run As->Ant Build.
184
[83c054c]1853. From within Eclipse, select New Project...from SVN. The archive is
[148cbce]186 svn://vsl.cis.udel.edu/civl. After entering that, open it up and
187 select the "trunk". (It is simplest to just check out the trunk for
188 the Eclipse project.)
[8d0a007]189
[83c054c]1904. Check out the trunk, and create the project using the New Java
[148cbce]191 Project Wizard as usual, naming it "CIVL". The .project, .classpath,
[be6d877]192 and other Eclipse meta-data are already in the SVN archive,
193 saving you a bunch of work.
[8d0a007]194
[83c054c]1955. If you already have the VSL dependencies library, you may
[be6d877]196 skip this step. Otherwise, download the tgz archive of VSL
[003a8b3]197 dependencies from http://vsl.cis.udel.edu/lib/tools/vsl_depend
[8d0a007]198 Unzip the .tgz file and you will have the folder vsl.
[536af01]199 Move vsl to /opt.
200 Note: you probably will need to use sudo for this.
[8d0a007]201 Also, if you don't already have a directory called /opt,
[536af01]202 you will have to create it with "mkdir /opt". Also, if you
203 don't want to use /opt for some reason, you can use any
204 directory you want; just modify the instructions below
205 accordingly.
[8d0a007]206
207 Suppose that you put the .tgz file (or .tar file if your browser
[85b7e48]208 unzipped it automatically to a .tar file) in the directory DOWNLOAD.
[8d0a007]209 You can use the following commands:
210
[85b7e48]211 $ cd DOWNLOAD
[8d0a007]212 $ tar xzf YourTgzOrTarFile vsl
213 $ sudo mv vsl /opt
214
[be6d877]215 (Leave out the "x" in the tar command if the file was already
216 unzipped.) Now you can type "ls /opt/vsl", and the output
217 should be
[8d0a007]218
219 README.txt lib licenses src
220
[83c054c]2216. If default_build.properties matches the configuration of your system,
[c1c00b6]222 then you can skip this step. Otherwise, you may need to create a file
[be6d877]223 build.properties in the directory containing build.xml.
[c1c00b6]224 Copy and paste the content from any file under properties, edit each
225 entry with the path configured in your system. The newly created file
[536af01]226 build.properties will automatically be used by ant to to build the
227 .jar file.
[8d0a007]228
[83c054c]2297. Navigate to Preferences -> Java -> Build Path -> ClassPath
[8d0a007]230 Variables, and then select New to create a classpath variable VSL,
[be6d877]231 and specify its value to be /opt/vsl.
[8d0a007]232
[83c054c]2338. Do a clean build. Everything should compile. Generate the civl.jar
[8d0a007]234 by right-clicking (or ctrl-click on OS X) the build.xml file and
[be6d877]235 Run As->Ant Build.
236
[e8576bf]2379. Shortcuts for running CIVL
238
239 Somewhere on your system, create a plain text file containing
[be6d877]240 exactly the following two lines:
241
242#!/bin/sh
243java -jar /Path/To/Your/workspace/CIVL/civl.jar $@
244
245 where "/Path/To/Your/workspace" is replaced with the path
246 to your Eclipse workspace directory. Name this file "civl",
247 put it in your PATH, and make it executable (chmod ugo+x civl).
248
24910. From a terminal window, execute "civl config". This should
250 find the theorem provers in your PATH and create a file
251 .sarl in your home directory.
252
25311. In Eclipse, navigate to "Run->Run Configurations... Create a new
254 JUnit configuration."
255 Name it "CIVL Regression Tests". Select "Run all tests in the
256 selected project..." and navigate to the folder "test/regress"
257 in the CIVL project. The Test runner should be JUnit 4. Under the
258 Arguments tab, type "-ea" (without the quotes) in the VM arguments
259 area (to enable assertion checking).
260
26112. An example of how to set up a single test from within Eclipse:
[8d0a007]262 create a new Run Configuration via the Run->Run
263 Configurations... menu. Create a new "Java Application"
264 configuration. Call it "CIVL barrier2". The Project is CIVL. The
265 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
[be6d877]266 set the Program arguments to
267
268 verify examples/concurrency/barrier2.cvl
269
270 Modify the VM arguments as in the step above. You should now be
271 able to run the test by clicking "Run".
[536af01]272
[a6d2043]273
274
Note: See TracBrowser for help on using the repository browser.