15-414 Assignments, Homework 8

Java Pathfinder

The Java Pathfinder Website

Location for using Java Pathfinder on unix.andrew.cmu.edu:

If you want to check the file Test.java first run javac on it to get Test.class. Second run Java Pathfinder as follows:
/afs/andrew.cmu.edu/usr24/mtschant/15414-f07/jpf/bin/jpf Test
in the directory that holds Test.class

Note that /afs/andrew.cmu.edu/usr24/mtschant/15414-f07/jpf/bin/jpf is a script that calls java on the correct class of Java Pathfinder. If you want to adjust the options passed to java, you might consider editing your own copy of this script. Note that this directory holds other scripts for using Java Pathfinder in other ways. I have not tested these scripts for compatibility with unix.andrew.cmu.edu.

This version of JPF is working better than the other one.


For problems 2.2 and 2.3 you must link to some of JPF's class files. To do this you must add the right location to you classpath. An example of this is:
javac -classpath /afs/andrew.cmu.edu/usr24/mtschant/15414-f07/jpf/build/jpf/ *.java

For problems 2.2 and 2.3, you are asked to create new versions of the Santa class. You are asked to put these into files named Santa1.java, Santa2.java, and Santa3.java. Feel free to also rename the classes these files hold to be Santa1, Santa2, and Santa3, respectively, since javac will not work unless the class name matches the file name. Other ways around this are also acceptable.

Memory Usage

A script for seeing the amount of memory used has been donated by Andrei. You can download it here. Run it to see usage instructions. Here's an example of using it:
./mymem "/afs/andrew.cmu.edu/usr24/mtschant/15414-f07/jpf/bin/jpf DP 3"
This script seems to be working better than the other one. Thanks, Andrei!