Thomas Huining Feng

This page is under heavy construction. Please check back for more examples and interesting demonstrations.

Documentation

HTML

PS

PDF

Subprojects

Timewarp. Distributed timewarp simulation theory.

SVMDCP. SVM Distributed CheckPointing. A mechanism for Java checkpointing, using JavaCC to automatically parse Java source code and AspectJ to intercept checkpoints for the change of each instance and attribute at runtime. It is built on top of the net layers subproject and is thus able to make use to multiple network technologies such as PVM, MPI, CORBA and Java sockets.

Model Design

A sample model is designed to demonstrate the following features, which are supported by both SVM and SCC: state hierarchy, orthogonal components, submodel importation, history and transition priority that solves conflicts. (The model itself has no meaning at all.)

Model Specification

The following description is written in the SVM format (.des file). It can be interpreted by SVM. However, now it is used as the input for the SCC compiler. In theory, the execution result of the generated Java code is exactly the same as the simulation result given by SVM. (sample.des)

Code Generation

SCC takes the above input and generates efficient Java code. As the ultimate goal of a compilation, performance is the most important factor. SCC employs such a scheme that space (memory, disk storage, and so on) is sacrifized for performance. (sample.java)

Java Applet (JRE 1.3.1 or higher required)

This is the Java applet that executes the above model. It uses the class files that are generated automatically by SCC as the underlying logic. The interface is completely rewritten by the designer. Another version that enables rollback is available on the SVMDCP website.

You can try the following things on this applet (reload the page after trying each time so the the model returns to its initial state):

When loaded, the model is in state "S1.S6". This is the default state in the state hierarchy, as defined in the "STATECHART" part of the model specification (.des file).

Send event "to S2". The model changes to the orthogonal state "S1.S2" (and then further change to its substates). When the model is in such a state, its state string is a tuple.

After it changes to "S1.S2", a submodel is imported, which has the same definition. The loaded submodel is placed in "S1.S2.S5". This means, everything (including states and transitions) are copied to its inside. As a result, more hierarchical levels are found.

As event "to S2" is raised for multiple times, the model loops into lower levels accordingly. This is because whenever a model is imported, it is in "S1.S6" (this path is relative to the state where it is imported), the state that accepts event "to S2".

Since "InnerTransitionFirst" property is set to 1, transition from the lowest level is fired whenever there is a conflict. Hence, if "to S7" is raised, it is catched by the lowest "S2" state.

In state "S7", event "to S1 hs" causes the model returns to the last history of state "S1" (at the lowest level). As a contrast, "to S1" changes the model to the default substate of "S1" (that is, "S6").


For those who are interested in the applet interface, the hand-written code is included here. (svmapplet.java)

Download

Grab a nightly version of SVM and SCC from CVS:

export CVS_RSH="ssh"                                          
cvs -z3 -d:ext:anoncvs@savannah.nongnu.org:/cvsroot/svm co svm

A complete package with all the generated Java code, class files and this HTML page.

Nightly tarball of the SCC compiler. A nightly version of SVM is distributed along with SCC`in this package. The source of this demonstration is located at "svm/test/applet/".


Maintained by Thomas Feng, Winter 2002