source: CIVL/INSTALL@ eba7953

1.23 2.0 acw/focus-triggers main test-branch
Last change on this file since eba7953 was eba7953, checked in by Manchun Zheng <zmanchun@…>, 13 years ago

Update INSTALL instruction; adding build.properties.linux since the default workspace directory of linux is different from osx.

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

  • Property mode set to 100644
File size: 6.2 KB
Line 
1 CIVL Installation Instructions
2
3------------------------- Binary Distribution -------------------------
4
5For most users, this will be the easiest way to install and use CIVL.
6
71. Install a Java 7 SDK if you have not already. Go to
8http://www.oracle.com/technetwork/java/javase/downloads/ for the
9latest from Oracle. On linux, you can optionally sudo apt-get install
10openjdk-7-jdk.
11
122. Download the approrpriate complete binary distribution from
13http://vsl.cis.udel.edu/civl.
14
153. Unzip and untar the downloaded file if this does not happen
16automatically. This should result in a folder named
17CIVL-TAG, where TAG is some version id string. This folder
18contains the following:
19
20 - README : this file
21 - bin : containing one executable sh script called "civl"
22 - lib : containing civl-TAG.jar and native libraries
23 used by CIVL
24 - doc : containing some documentation about CIVL
25 - licenses : licenses for CIVL and included libraries
26 - examples : some example CIVL programs
27
284. For OS X, move the CIVL-TAG folder into /Applications. For
29linux, move it into /usr/local.
30
315. Put the civl script in your path however you like to put things
32in your path. Either move it to a directory in your path,
33or create a symlink to it, or edit your .profile or equivalent
34to put it in your path.
35
36Now you should be able to run CIVL from the command line by
37typing "civl <filename>". Type just "civl" for usage information.
38
39------------------------- Source Installation -------------------------
40
41We recommend using the Eclipse IDE for Java/EE developers.
42
431. Install prerequisite projects ABC, SARL and GMC.
44 Make sure that the three projects are put in the workspace
45 directory where CIVL will be put.
46
47 a. Install the C front-end ABC, http://vsl.cis.udel.edu/abc,
48 following the instructions in its INSTALL file for Eclipse
49 installation. This should result in a project named ABC
50 in your Eclipse workspace. Build the abc.jar from within
51 Eclipse by right-clicking (or ctrl-clicking on OS X) on the
52 build.xml file and selecting Run As->Ant Build.
53
54 b. Install the symbolic algebra and reasoning library SARL,
55 http://vsl.cis.udel.edu/sarl, following the instructions in
56 its INSTALL file for Eclipse installation. This should
57 result in a project named SARL in your Eclipse workspace.
58 Build the sarl.jar from within Eclipse by right-clicking (or
59 ctrl-clicking) on the build.xml file and selecting
60 Run As->Ant Build.
61
62 c. Install the generic model checking utilities package GMC,
63 http://vsl.cis.udel.edu/gmc in Eclipse. This one is pure
64 Java, so is easy. This should result in a project named GMC
65 in your Eclipse workspace. Build the gmc.jar from within Eclipse
66 by right-clicking (or ctrl-clicking) on the build.xml file and
67 selecting Run As->Ant Build.
68
692. From within Eclipse, select New Project...from SVN. The archive is
70svn://vsl.cis.udel.edu/civl. After entering that, open it up and
71select the "trunk". (It is simplest to just check out the trunk for
72the Eclipse project.)
73
743. Check out the trunk, and create the project using the New Java
75Project Wizard as usual, naming it "CIVL". The .project, .classpath,
76and other Eclipse meta-data are already in the SVN archive, saving you
77a bunch of work.
78
794. Download the tgz archive of VSL dependencies from
80 http://vsl.cis.udel.edu/tools/vsl_depend,
81 choosing the right .tgz according to your platform:
82
83 vsl_linux32-1.0.tgz - 32-bit linux
84 vsl_linux64-1.0.tgz - 64-bit linux
85 vsl_osx64-1.0.tgz - 64-bit osx
86
87 Unzip the .tgz file and you will have the folder vsl.
88 Move vsl to /opt (you might need to use “sudo” for this.
89 Also, if you don't already have a directory called /opt,
90 you will have to create it with mkdir /opt).
91
92 Suppose that you put the .tgz file (or .tar file if your browser
93 unzipped it automatically to a .tar file) in the directory $Download.
94 You can use the following commands:
95
96 $ cd $Download
97 $ tar xzf YourTgzOrTarFile vsl
98 $ sudo mv vsl /opt
99
100 Now you can type "ls /opt/vsl", and the output should be
101
102 README.txt lib licenses src
103
1045. Create a file build.properties in the directory where build.xml is in.
105 Copy and paste the content from properties/build.properties.osx or
106 properties/build.properties.linux depending on your platform.
107 If your workspace directory is the default setting of Eclipse,
108 i.e., HOME/Documents/workspace for osx or HOME/workspace for linux,
109 then you dont have to anything.
110 Otherwise, you need to edit the entry "workspace" to point to the
111 corresponding directory where you put the projects ABC, SARL and GMC.
112
1136. Navigate to Preferences -> Java -> Build Path -> ClassPath
114 Variables, and then select “New…” to create a classpath variable VSL,
115 and specify its value to be /opt/vsl. Navigate to Preferences -> Run/Debug
116 -> String Substitution -> New…, and then define an entry vsl_lib and
117 set its value to be /opt/vsl/lib.
118
1197. Do a clean build. Everything should compile. Generate the civl.jar
120 by right-clicking (or ctrl-click on OS X) the build.xml file and
121 Run As->Ant Build.
122
1238. Go to Run->Run Configurations.... Create a new JUnit configuration.
124 Name it CIVL Tests. Select "Run all tests in the selected project..."
125 and navigate to the folder "test" in the CIVL project.
126 The Test runner should be JUnit 4. Under the Arguments tab, type
127 "-ea" (without the quotes) in the VM arguments area (to enable assertion
128 checking). Under the Environment tab, create an entry
129 DYLD_LIBRARY_PATH (OS X) or LD_LIBRARY_PATH (linux),
130 specify its value by clicking Variables… and choose vsl_lib from the list,
131 or you may type ${vsl_lib} in the value entry.
132
1339. An example of how to set up a single test from within Eclipse:
134 create a new Run Configuration via the Run->Run
135 Configurations... menu. Create a new "Java Application"
136 configuration. Call it "CIVL barrier2". The Project is CIVL. The
137 main class is edu.udel.cis.vsl.civl.CIVL. Under the Arguments tab,
138 set the Program arguments to "examples/barrier2.cvl" (without the
139 quotes). Modify the VM arguments and the Environment as in the step
140 above. You should now be able to run the test by clicking "Run".
Note: See TracBrowser for help on using the repository browser.