Installing UTJML

This page contains instructions for UTJML developers to download and install UTJML packages. If you are not a UTJML developer but interested in trying out early prototypes of UTJML tools, click here instead.

1. Background

UTJML tools are being implemented as an extension to the JML tools (see Figure 1). The JML tools depends on MultiJava tools that add some new features to the Java programming language, such as open classes and multiple dispatch. This means that you need to have both JML and MultiJava packages installed on your machine. In addition, you also need to have such utilities packages as ANTLR, GNU getopt, and JUnit.

Tool Dependency
Figure 1. Tool dependency

In sum, you need to install the following packages to develop UTJML tools.

  1. Utility packages such as ANTLR, GNU getopt, and JUnit
  2. MultiJava pacakges
  3. JML pacakges
  4. UTJML pacakges

In the rest of this document you will find how to download and organize these packages.

2. Directory Structure

The following directory strucure is suggested to organize different packages necessary to develop UTJML tools. The recommended place is to put them under your home directory.

UTJML - UTJML packages
JML2  - JML packages
MJ    - MultiJava packages
PLSL  - Utility packages such as ANTLR, GNU getopt, and JUnit

Note that the top directories of JML and MultiJava packages are named JML2 and MJ, respectively.

The names and relative positions of UTJML, JML, and MJ are important because some makefiles depend on them. However, the name and location of utility packages are not important as long as they are included in the CLASSPATH.

3. Installing Utility Packages

The following packages are used by UTJML, JML, and MultiJava tools.

These packages can be downloaded and installed individually, or you can get them all in a single zip file.

To download a single zip file containing all these packages, click here. The zip file was originally created by PLSL lab of Iowa State University and contains only .class files. To intall it, simply unzip it under your home directory.

Make sure to add to your CLASSPATH the PLSL directory or whatever directories you installed the utility packages.

4. Installing MultiJava and JML Packages

Both MultiJava and JML packages are available from SourceForge.net. It is recommended to download and install the latest source code from the CVS repository, not the binary distributions. The latest sources, updated daily, are available using the CVS protocol.

4.1 Downloading MultiJava

To download the latest source code of MultiJava, go to your home directory and execute the following commands:
cvs -d:pserver:anonymous@@multijava.cvs.sourceforge.net:/cvsroot/multijava login
cvs -z3 -d:pserver:anonymous@multijava.cvs.sourceforge.net:/cvsroot/multijava co MJ
If asked for a password, you can simply hit the enter key. The commands will check out the CVS module MJ and create a directory named MJ under the current working directory.

4.2 Downloading JML

To download the latest source code of JML, go to your home directory and execute the following commands:
cvs -d:pserver:anonymous@jmlspecs.cvs.sourceforge.net:/cvsroot/jmlspecs login
cvs -z3 -d:pserver:anonymous@jmlspecs.cvs.sourceforge.net:/cvsroot/jmlspecs co JML2
If asked for a password, simply hit the enter key. The commands will check out the CVS module JML2 and create a directory named JML2 under the current working directory.

4.3 Compiling MultiJava and JML

To compile both MultiJava and JML sources, you first need to set several environment variables. The easiest way to do this is to source one of the sample shell scripts found in the JML2/bin-for-developers directory. For example, if you are on Cygwin, do the following:

source JML2/bin-for-developers/example-developers-sourceme-cygwin.sh

The JML sourceme files set environment variables for both JML and MultiJava; that is, you shouldn't source MultiJava sourceme files separatley. You need to source the sourceme file only once even if you compile the source code multiple times, so it is a good idea put the above command into your shell initialization or startup file (e.g., .bashrc).

To compile MultiJava sources, do the following:

cd MJ
make rebuild-all

To compile JML sources, do the following:

cd  JML2
make rebuild-all

To run all the tests shipped with MultiJava or JML, do the following under the top directory, i.e., MJ or JML2:

make runtests

4.4 Tips for JML Developers

Refer to the Tips for JML Developers; this file is also found in JML2/docs/developer-tips.html. Some of the tips are also applicable to UTJML developers.

5. Installing UTJML

UTJML sources are stored in the CVS repository of SSV lab. To download the latest UTJML source code, refer to the Accessing CVS Repository page; you can use either the Web interface or any CVS client programs.

To build UTJML, you first need to add the UTJML directory to your CLASSPATH.

To actually build UTJML, go to the top directory (i.e., UTJML) and do the following:

make rebuild-all

To run all the tests, do the following:

make runtests


Last modified: $Id: installing-utjml.html,v 1.1 2006/06/22 16:42:24 cheon Exp $