VJP's Design

VJP has three main purposes. Edit Mode Property Files, Launch JPF and to process JPF's output. These are three separate purposes that should be kept independent of one another so that the following goals are achieved:

Keeping true to these goals will allow VJP to extend its self to multiple IDEs and be flexible to different situations.

Due to the independent nature of these three goals, VJP code and design can be split into three categories:

VJP Configuration Life-Cycle

Screenshot: A look at the LaunchDialog

When the VJP button is clicked a LaunchDialog is created and displayed to the user. The LaunchDialog creates a Tree that contains all of the Java projects the JPF files found within the workspace. When a file from the tree is selected the corresponding ModePropertyConfiguration object is created. The ModePropertyConfiguration object parses the configuration file and loads the properties that it defines. A ModePropertyEditorComposite is created that displays the location of the file and the "Custom Properties" and "Default Properties" tab. The user is now free to add and modify properties as needed.

The ModePropertyConfiguration class

The ModePropertyConfiguration class deserves a little talking about. It is the work horse for VJP's configuration editing. This class takes two parameters: IFile and IJavaProject. The IFile is the configuration file that properties and loaded from and saved to. The IJavaProject is the project that is used to determine the VJP defined properties (Things like vm.classpath...) for this configuration. The configuration file is parsed during the instantiation of this class. The ModePropertyConfiguration has a static hash that contains all of the properties defined in from jpf.properties and default.properties. All instances of ModePropertyConfiguration therefore share this set of default properties. The ModePropertyConfiguration also keeps track of the contents of the configuration file so that saving and editing does little or no damage to the original formatting of the file. Only user defined properties are saved to the configuration file. (IE: VJP defined properties are not stored in the configuration files unless explicitly overridden by the user , for example, to set a custom vm.classpath)

Verify Job Life-Cycle

A VerifyJob is a type of Eclipse Job. Creating one requires the configuration file that is to be passed and the project that VJP should base its default properties from. There is a static convenience method: VerifyJob.verify(IFile file, IProject project, boolean step) that automatically creates the job and schedules it. VerifyJob creates a JPF instance with the parameters: " -c <path to configuration file>". Once the JPF instance is created VJP's default settings are applied (If they are not overridden by the configuration file). VJP then reroutes the console output to a console view and adds the VJPListener to JPF. After that JPF is free to verify.

The VJP View

Screenshot: An Eclipse workbench containing the VJP view

In order to use the VJPView the property: 'vjp.tracelistener = true' must be added to the mode-property configuration file. The VJP view can be separated into three parts: TraceTable, TransitionView and ErrorViewer. The VJPListener is the main driver providing all of the information that the three views have. After a new state is 'heard' by the listener a new transition is added to the TraceTable. The transition can be selected from the TraceTable and looked into further detail by displaying it in the TransitionView. The TraceTable also is directly tied to the 'ControlPanel'. The ControlPanel is a Composite that contains the Step, Run, and Reset buttons. When these are selected the events are relayed to the listener that can cancel or stall the running of JPF until further notice.

VJP Topic Publisher

This is a new feature that was added to VJP and has come to take over as the main view to view JPF's results. It is an extention of the console publisher class that allows results to be sorted by topic and for results to be saved to an external file.

Plans for the future

VJP is still very young and has a lot of growth ahead of it. The best place to look for specific upcoming features is probably the sourceforge page for VJP ( http://sourceforge.net/tracker/index.php ).

As far as major upcoming changes that need to happen, there are a few. First off a better seperation needs to happen between verification and output proccesing. Looking at the code, the two look synomonous and this will cause problems if its not fixed. Also a help system needs to be implemented for VJP. VJP is supposed to make things easier than using JPF alone, but with out help files and documentation surrounding VJP there is little chance of that happening. Then last but not least, as VJP becomes an important tool for developers, its dependability becomes a major issue. Software Automated testing should probably be created to ensure that all of VJP is constantly working correctly.

Of course, this list is only a start, and there are plenty of other things that could be done for VJP. If you have an idea, or just want to help, please contact us, we would love some of your help. Remember, open source projects don't run on money, they run on time. And yours would be greatly appreciated. Thank you.