Next: Example usage, Previous: Introduction, Up: Top [Contents][Index]
Shortcut for the impatient: skip directly to the installation instructions for Unix/Linux/MacOSX installation, or Windows installation.
There are two main ways to install Daikon. See Complete installation, for a complete installation, in 4 easy steps, that permits you to use all of the functionality in the Daikon distribution. See Simple installation, for an even simpler 2-step installation process that is adequate for the needs of many users.
Use the complete installation instructions if you wish to detect invariants in C or Perl programs, if you wish to run certain other programs distributed with Daikon in its scripts/ directory, or if you wish to edit and recompile the source code of Daikon itself. Use the simple installation instructions if you only wish to detect invariants in Java programs, and you don’t want to set any environment variables in your startup file.
Differences from previous versions of Daikon appear in the file doc/CHANGES in the distribution. To be notified of new releases, or to join discussions about Daikon, subscribe to one of the mailing lists (see Mailing lists).
• Simple installation: | ||
• Complete installation: |
Next: Complete installation, Up: Installing Daikon [Contents][Index]
Daikon is written in Java. In order to run Daikon, all you really need is the daikon.jar file, which is included in the distribution or can be downloaded separately from http://plse.cs.washington.edu/daikon/download/daikon.jar. Place daikon.jar on your classpath so that Java can find it. You are now ready to use Daikon!
There are two additional requirements. You must have a Java 7 (or later) JVM (Java Virtual Machine). The tools.jar file that comes with your JVM must also be on your classpath.
See Installing Daikon, for situations where you should follow the complete installation instructions of Complete installation. (Also, if you do not know how to add a jar file to your classpath, then use the complete installation instructions, which walks you through the process.)
Previous: Simple installation, Up: Installing Daikon [Contents][Index]
This section gives step-by-step instructions for installing Daikon.
Here is an overview of the steps. Details appear below; select the instructions for your operating system.
make
.
For more complete information on compiling Daikon, see Compiling Daikon in Daikon Developer Manual.
• Requirements: | ||
• Unix/Linux/MacOSX installation: | ||
• Windows installation: | ||
• Running Daikon under Windows: |
Next: Unix/Linux/MacOSX installation, Up: Complete installation [Contents][Index]
In order to run Daikon, you must have a Java 7 (or later) JVM (Java Virtual Machine). You must also have a Java 7 (or later) compiler.
• Optional requirements: |
Up: Requirements [Contents][Index]
All the remaining requirements listed here are optional (they enable you to perform certain additional tasks with Daikon).
If you plan to use one of Daikon’s source-based front ends,
then you need a compiler
for whatever language your target programs are written in. For
instance, if you wish to analyze C or C++ programs, you need a C or C++
compiler such as GCC
. Source code and a compiler are not necessary if
you plan to use one of Daikon’s front ends that work on binaries, such
as Chicory (see Chicory) or Kvasir (see Kvasir).
If you wish to edit the Daikon source code and re-compile Daikon, see Compiling Daikon in Daikon Developer Manual.
Next: Windows installation, Previous: Requirements, Up: Complete installation [Contents][Index]
cd daikonparent wget http://plse.cs.washington.edu/daikon/download/daikon.tar.gz tar zxf daikon.tar.gz
This creates a daikonparent/daikon/ subdirectory.
We will assume that you are using the bash shell or one of its variants. Add commands like these to your ~/.bashrc or ~/.bash_profile file:
# The full pathname of the directory that contains Daikon export DAIKONDIR=daikonparent/daikon # The full pathname of the directory that contains the Java JDK export JAVA_HOME=/usr/lib/jvm/java source $DAIKONDIR/scripts/daikon.bashrc
After editing your shell initialization file, either execute the commands you placed in it, or else log out and log back in to achieve the same effect.
You may customize them by setting environment variables, or by adding a
Makefile.user
file to directory $DAIKONDIR/java
(it is
automatically read at the beginning of the main Makefile, and prevents
you from having to edit the main Makefile directly).
make
.
Note that this step is not required if you only want to use Daikon
with its Java front end (Chicory) or its .NET front end (Celeriac).
This step is required for using
Daikon with its C/C++ front end (Kvasir), and for other tools.
cd $DAIKONDIR make
This builds the various executables used by Daikon, such as the C/C++ front end Kvasir (see Installing Kvasir) and the JDK for use with DynComp (see Instrumenting the JDK with DynComp). If you need more information about compiling Daikon, see Compiling Daikon in Daikon Developer Manual. If you have trouble compiling the C/C++ front end Kvasir, see See Installing Kvasir.
Note that running this make command may take 20 minutes or more, depending on your computer.
Optionally, download other executables, such as the Simplify theorem prover (see Installing Simplify).
Next: Running Daikon under Windows, Previous: Unix/Linux/MacOSX installation, Up: Complete installation [Contents][Index]
To perform a complete install on Windows, it is necessary to install the Cygwin toolset. After you have installed Daikon, you can run it using either Cygwin or the regular Windows shell (see Running Daikon under Windows).
The Cygwin toolset (available at http://cygwin.com/) contains everything you need to compile and run Linux programs under Windows. You can install Cygwin by running the appropriate setup program; either http://cygwin.com/setup-x86.exe or http://cygwin.com/setup-x86_64.exe, as determined by your machine type. The default installation of Cygwin is sufficient for installing Daikon.
cd daikonparent wget http://plse.cs.washington.edu/daikon/download/daikon.tar.gz tar zxf daikon.tar.gz
This creates a daikonparent/daikon/ subdirectory.
# The full pathname of the directory that contains Daikon export DAIKONDIR=daikonparent/daikon # The full Linux pathname of the directory that contains the Java JDK export JAVA_HOME=/cygdrive/c/Program Files/Java/jdk1.7.0_45 source $DAIKONDIR/scripts/daikon.bashrc
Use the Cygwin/Linux path style (e.g., /cygdrive/c/daikon
) rather than the
windows path style (C:\daikon
).
Some users have reported problems when using pathnames
with spaces. You can avoid the problem by using the ln
command to add a
symbolic link without spaces to Program Files
.
cd /cygdrive/c ln -s "Program Files" program_files
and then the JAVA_HOME line becomes:
export JAVA_HOME=/cygdrive/c/program_files/Java/jdk1.7.0_45
After editing your shell initialization file, either execute the commands you placed in it, or else log out and log back in to achieve the same effect.
You may customize them by setting environment variables, or by adding a Makefile.user file to directory $DAIKONDIR/java (it is automatically read at the beginning of the main Makefile, and prevents you from having to edit the main Makefile directly).
The one variable you must customize is
to define the OSTYPE
variable to be ‘cygwin’.
OSTYPE = cygwin
make
.
Note that this step is not required if you only want to use Daikon
with its Java front end (Chicory). This step is required for using
Daikon with its C/C++ front end (Kvasir), and for other tools.
cd $DAIKONDIR make
This builds the various executables used by Daikon, such as the JDK for use with DynComp (see Instrumenting the JDK with DynComp). If you need more information about compiling Daikon, see Compiling Daikon in Daikon Developer Manual. If you have trouble compiling the C/C++ front end Kvasir, see See Installing Kvasir. Note that Kvasir does not work under Cygwin.
Note that running this make command may take 20 minutes or more,
depending on your computer.
On Windows, running make
requires
that Cygwin be installed.
Optionally, download other executables, such as the Simplify theorem prover (see Installing Simplify).
Previous: Windows installation, Up: Complete installation [Contents][Index]
After you have installed Daikon under Windows (see Windows installation), you can run it either using native Windows utilities, or using the Cygwin environment — it’s your choice.
Daikon is a command-line application (and so are its related programs, such as Chicory). You should invoke them from a command shell — either a Windows command shell or a Cygwin command shell — rather than by double-clicking their icons. In any event, double-clicking would not supply the proper arguments to the program.
First, a little background/review. Java on Linux separates its
CLASSPATH
entries using the colon (‘:’) while Java on Windows
separates the entries with a semi-colon (‘;’). There is a good reason
for this; on Windows the colon would have been impractical as it is
used in file paths (c:\); on Linux the semi-colon is impractical,
as it is used to end a command line. The tricky bit is that Cygwin
provides a Linux like environment on top of Windows. So Cygwin mainly
wants colon separators but java
is a Windows application, so it wants
semi-colons. Another point is that when a Cygwin shell starts up,
it copies the Windows environment into its Linux like environment with
no changes - except for the PATH
variable. This it converts
to Linux format (with colons) and adds "/usr/local/bin:/usr/bin:" to
the front. Hence, it is all set to run both Cygwin and existing
Windows applications.
• Windows command line: | ||
• Cygwin shell: |
Next: Cygwin shell, Up: Running Daikon under Windows [Contents][Index]
The first option is to run Daikon using native Windows utilities.
The is done in the normal fashion. However, getting the correct
value for CLASSPATH
can be confusing. As noted above, it
must be
specified in Windows format (Windows paths and semicolon separators).
It must include either $DAIKONDIR/daikon.jar or
$DAIKONDIR/java (if you
have recompiled the Daikon source). A typical example for
CLASSPATH
might be:
C:\cygwin64\home\user\invariants\daikon\daikon.jar;.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip;C:\Program Files\Java\jdk1.7.0_45\ jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar
With this done, one may enter: java daikon.Daikon
in any
directory and Daikon should start up correctly.
Previous: Windows command line, Up: Running Daikon under Windows [Contents][Index]
The second option for Windows (and the one we recommend) is to run Daikon using the Cygwin toolset (available at http://cygwin.com/), which contains everything you need to compile and run Linux programs under Windows. You can install Cygwin by simply running one of the setup programs (based on your machine type) found at http://cygwin.com/.
As noted above, when running any Java program (such as Daikon or Chicory),
the CLASSPATH
must be specified in Windows format. Your initial
install of the Java JDK will have set the basics for the CLASSPATH
.
When you installed Daikon, you were instructed to place into your
shell initialization file commands to set DAIKONDIR
and JAVA_HOME
and then source $DAIKONDIR/scripts/daikon.bashrc
. This will
set CLASSPATH
properly each time you start a Bash shell. The
result should be a value for CLASSPATH
that looks something like:
C:\cygwin64\home\user\invariants\daikon\daikon.jar;.;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip;C:\Program Files\Java\jdk1.7.0_45\ jre\lib\rt.jar;C:\Program Files\Java\jdk1.7.0_45\lib\tools.jar
If you wish to override CLASSPATH
by using the -classpath
(or -cp) option, you need to remember that the result must be
in Windows format. This can get confusing because the Cygwin
bash interpreter is going to process the command line prior to handing it
off to java
. Hence:
java -cp c:\cygwin64\home\user\invariants\daikon\daikon.jar daikon.Daikon
will fail as the backslash ‘\’ is processed by bash and removed. Any of the following will work:
java -cp c:\\cygwin64\\home\\user\\invariants\\daikon\\daikon.jar daikon.Daikon java -cp "c:\cygwin64\home\user\invariants\daikon\daikon.jar" daikon.Daikon java -cp c:/cygwin64/home/user/invariants/daikon/daikon.jar daikon.Daikon
The last is interesting as this is almost the same as on “real” Linux. Windows
accepts either forward (‘/’) or backward (‘\’) slashes as directory separators
in paths. There are similar command parsing issues with parenthesis and blanks.
These are legal in Windows paths, but will cause bash to get confused.
In general, enclosing a valid Windows path within double quotes (‘"’)
is the preferred way to avoid these problems.
If you find it more convenient to use Linux paths, or want to use an
existing environment variable that contains a Linux path, the cygpath
tool
will do the job. Thus, instead of:
java -cp $HOME/invariants/daikon/daikon.jar daikon.Daikon
(which will fail), use
java -cp `cygpath -wp $HOME/invariants/daikon/daikon.jar` daikon.Daikon
(note the back quotes ‘`’) and everything should work as expected. Or even better:
java -cp "`cygpath -wp $HOME/invariants/daikon/daikon.jar`" daikon.Daikon
since there may be some Windows path characters contained in the environment variables.
Previous: Windows command line, Up: Running Daikon under Windows [Contents][Index]