Download   Maillist   CVS   Installation Doc   Sourceforge Page   Support

compilerMonitor: a CAUSE tool for javac.exe

Goals

The compilerMonitor is a research tool that helps to answer these questions. One hypothesis is that it takes too long time (perhaps months) to transition from being a novice to an experienced compiler user. Better error messages from the compiler could provide significant productivity gains.

What is the compilerMonitor?

The compilerMonitor is a CAUSE (Computer Aided USability Engineering) tool that monitors the developer's interaction with Sun Microsystem's javac.exe compiler (versions 1.3 and 1.4). The program is an executable (javacM.exe) that behaves just like javac.exe. In fact, javacM.exe passes all parameters straight through to javac.exe. You can even configure your favorite IDE (or ANT) to use javacM instead of javac.exe.

Specifically, the compilerMonitor persists a record of all javac error messages and the sources that caused/fixed the errors.

Data Generated by compilerMonitor

The compilerMonitor creates a directory named 'archive' directly beneath the installation directory. All of the developer-javac interactions recorded by the compilerMonitor are stored downstream from this archive directory. You will find text files that contain the developer's compiler errors and copies of selected source files. The textfiles' timestamps indicate when the compiler errors were coded, discovered (as a result of compiling) and ultimately fixed (or perhaps not). To save on disk space, the compilerMonitor only stores a copy of a source file if the file contained a compiler error or if a source file contained a fix for a compiler error.

Don't monkey with the archive/compilationDb directory. The compilerMonitor stores zero-byte text files in this directory to indicate whether a particular file compiled with errors on the previous invocation. It uses this information to determine if a successfully compiled file is a fix (and thus stored in the archive) or not.

Strategy for collecting compilerMonitor Data

To answer the above questions in the 'Goals' section, it seems that we'll need two things:
  1. A sufficiently clear picture of the main patterns of developer-compiler interacation
  2. Time trials for how long it takes for developers of different experience levels to work through each pattern.
The patterns could be established by analyzing and collecting data from developers' daily coding. Sequences of particular errors would be readily visible from this data. For instance, if a developers changes a method signature and 'breaks' a number of invocations, the trail of compiler error messages will show how he/she went about fixing all the inconsistencies. Perhaps we can use something like Weka to analyze the data.

The second thing we'll need is the data for the time-trials. Unlike the pattern data, this will require a more controlled setting. Real-world interruptions (like trips to the john and conversations with one's neighbor) would cloud any 'timed' data taken directly from the field. So, one tact would be to create sample source code that generates particular compiler errors that emulate the discovered patterns. Then, developers of different levels of experience would be asked to work through the compiler errors in the sample source code, uninterrupted.

What are CAUSE tools?

CAUSE tools help usability professionals analyze the interaction between humans and machines. CAUSE stands for Computer Aided USability Engineering.
  1. Perhaps a shrinking average amount of time between a compiler error and a corresponding fix suggests increasing productivity.
  2. Perhaps few errors for a given time period suggests increasing productivity.

Installation

note: Currently, only Win2k is supported -- I could use some help porting to other platforms.

To install compilerMonitor:

  1. Unzip files from compilerMonitor-bin-???.zip into a blank directory. Perhaps c:\compilerMonitor-0.04
  2. Tell the compilerMonitor which JDK (1.3 and 1.4 are supported) you want to compile with by setting the JDK_HOME environment variable, like this:
             set JDK_HOME=c:\j2sdk1.4.1
             
  3. Instead of using javac.exe, use javacM.exe
  4. Optionally, add the new directory to your PATH environment variable -- this is for your convenience in using javacM.exe.
  5. You can configure your favorite IDE to use javacM.exe instead of plain old javac.exe.

Use the compilerMonitor to monitor ANT <javac> activity.

If you want to monitor javac activity from ANT <javac> compile tasks, follow these steps:
  1. Tell ANT about the directory where you unzipped compilerMonitor-bin-???.zip, by setting this environment variable:
  2.               set ANT_OPTS=-Dcompilermonitor.home=c:\myDir
  3. Put compilerMonitor-???.jar, regexp-1.2.jar and junit3.7.jar in your computer's CLASSPATH. Once I figure out how to dynamically 'update' the classpath, this last step will no longer be a requirement.
  4. Drop the jar file compilermonitor-ant-???.jar into the lib directory under %ANT_HOME%.

    NOTE: this jar must precede the ant.jar in the same directory, because I hijacked org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFacory. One way to do this is to make sure the compilermonitor-ant-???.jar has a newer time stamp than ant.jar.

CVS

Sorry, I haven't yet loaded the source into CVS. To get the source,
download compilerMonitor-all-???.zip.

License

compilerMonitor is licensed under the GNU GPL. .

Platform

compilerMonitor is developed mostly in java. It includes a small JVM launcher (javacM.exe) that was written in 'C' and works only on Win32. I made an attempt to isolate the Win32-specific stuff into overrideable classes. I'm interested in seeing how good a job I did. .

Support

Feel free to email me (
Erik Ostermueller) or just hop on the maillist.

SourceForge.net Logo

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.