Set up

To use the various tools for this course, add /cs/fac/bin/6431 to your PATH. For example, if you are using csh, you can add this line at the end of your .cshrc:

setenv PATH ${PATH}:/cs/fac/bin/6431

You will also need to declare a new environment variable called SWAGKIT_PATH and set it to /cs/fac/bin/6431/swagkit

Then, add /cs/fac/bin/6431/swagkit/bin to your PATH variable. For csh, you can add these two lines at the end of your .cshrc

setenv SWAGKIT_PATH /cs/fac/bin/6431/swagkit
setenv PATH ${PATH}:${SWAGKIT_PATH}/bin

You will have to adjust these, if you are using other shells.

You can test that all this has worked, by logging out, logging in again, and typing the following command.

javex

You should see a lot of output, rather than "Command not found".

Fact extraction

Download the following small program: Area.java.

To extract facts from it, run the following command:

javex -j `which javac` Area.java > area.ta

The file area.ta contains all the extracted facts expressed in the TA format. You can learn more about the TA format here.

The manual for Javex describes a host of other options to use when extracting facts.

Extracting facts from a larger system

Download the TAB2PS system.

Untar with: tar xvf tab2ps.tar

Enter the TAB2PS directory with cd TAB2PS.

To extract facts, run the following command:

javex tab2ps/*.class tab2pstest/*.class > tab2ps.ta

Note the size of the tab2ps.ta file.

To extract facts from systems with more complicated directory structure, it is best to compile them, and then use the -i option in javex.