Thomas Huining Feng  

Contents

COPYRIGHT

Introduction to SVM

Introduction to SCC

Features

Screen Shots

Change History

Documentation

Download (Current Version 0.3beta3)

SVM nightly source (tarred and CVS)

SVM Python source for Win32, Unix and Linux

SVM Win32 binary

SVM RedHat9 binary

SVM FreeBSD binary

jSVM Jython source for all systems

jSVM Java .jar compiled package for all systems

PyGame

A special note on RedHat 9

Syntax highlighting for statechart description files

XEmacs

Emacs

Vim

UltraEdit

JCreator

jEdit


COPYRIGHT

SVM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

SVM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Introduction to SVM

SVM is short for Statechart Virtual Machine, a fully functional interpreter for UML statecharts. This project is initiated in 2002, whose 0.1 version is a statechart model implementing a CD player with a simplified statechart interpreter. From version 0.2, it is no longer a domain specific simulator but a generalized virtual machine capable of executing all-purpose statechart models.

Introduction to SCC

SCC (StateChart Compiler) generates efficient Java source code from statechart descriptions. It reuses the interpretation engine of SVM and statically optimize extended statechart models (by flattening, numbering events and states, and so on). The generated code can be compiled and plugin to different interfaces and simulation environments. In particular, the generated code will be able to communicate with components that is simulated in SVM.

An on-line demonstration and documentation of SCC is available here.

Features

Semantic elements of the statechart meta-model, including states and their properties (default, concurrent/orthogonal, final, enter actions and exit actions), transitions and their properties (events, sources, destinations, guards and output), state hierarchy, history (H) and deep history (H*), and so on, are completely supported.

Extensions are introduced to enrich the underlying language. Complex systems are more easily described. These extensions include (but not limited in) submodel importation, tunable transition priority to solve conflicts, and parameterized model templates.

Models are self-contained from version 0.2. Specific initializer and finalizer can be defined to setup a model-specific simulation environment; interactor can be defined to provide model users with a model-specific interface.

Unlike many other statechart implementations, though assumptions are made and extensions are introduced (which is indispensable), modularity, substitutability and reusability are strictly guaranteed.

An integrated interpreter, simulation environment and debugger is provided, which allows designers to test their models at an early time. A default graphical interface is provided to enable the execution and debugging of virtually any valid model. The debugger is powerful enough for the designers to look at every detail inside the model and also the meta-model.

The execution of a model can be snapshotted at any time. Then the execution can be resumed on another machine later, without any loss of information.

Screen Shots

running Integer model in graphical interface
command: SVM DataTypes/Integer.des

running Integer model in textual interface
command: SVM -t DataTypes/Integer.des

running CDPlayer model in model-specific interface
command: SVM CDPlayer/CDPlayer.des

graphical debugger

textural debugger

Change History

Version 0.3beta3 (Bugfix + Compatibility)

Even more important bugfixes since 0.3beta2.

C++ code generated by SCC can now be compiled with Visual C++ and Python for Windows.

A set of automatic tests is provided (in test/autotests/).

Version 0.3beta2 (Bugfix Release)

Several important bugfixes since 0.3beta.

Script "py2des" added to the AToM3 plugin.

FreeBSD binary included in the releases.

Version 0.3beta (Happy Easter!)

Much more support added to SCC, which should now be able to synthesize code with strictly preserved behavior.

4 target-languages are supported by SCC: Java (default), C++, C# and Python.

SVM now adhere to David Harel's statecharts semantics by default. Some old models that do not conform to this semantics must explicitly set the "Harel" global option to 0.

An MP3 player model is added.

Lots of bugfixes.

Version 0.3alpha

SCC (StateChart Compiler) joins the family. (experimental)

Rudimental support for distributed simulation (via PVM) is added. (experimental)

A plugin is added which integrates SVM into AToM3.

Performance is improved by limiting use of threads.

Distributed with a GPL license.

Startup scripts now automatically search for source files in the PATH.

Some of the UML 2.0 extensions are added (i.e., ports).

Lots of bugfixes.

Linux curses support is added.

Version 0.23

jSVM (Jython implementation of SVM) joins the family.

Bugs in syntax highlighting in the run-time debugger fixed.

Placement of the windows at startup improved.

Version 0.22

Bugs in orthogonal components fixed.

README file briefly explaining the usage.

Version 0.21

Syntax highlighting for the debugger.

A number of bugs fixed, including the bug in tab-in.

Version 0.2

A reusable and generalized statechart simulator.

Documentation

The preliminary version of my master's thesis is available, which serves as a complete documentation on SVM and the DCharts formalism that it supports.

There is a tutorial on the installation and usage of SVM and SCC here.

Download (Current Version 0.3beta3)

SVM nightly source (tarred and CVS)

To grab SVM from CVS (hosted by Savannah), use the following commands:

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

Nightly tar ball of SVM is available here.

The nightly version is not meant to work all the time, especially for the new features, which may not have been completed. If it does not work for you, try the latest stable version below.

SVM Python source for Win32, Unix and Linux

Requirements: Python 2.2 or higher.

Dependencies: PVM for Windows (optional). Pygame is required for the CDPlayer model (CDPlayer.des in the CDPlayer directory). Pygame also requires SDL, SDL_image, SDL_ttf, SDL_mixer, SMPEG, Numeric.

Download servers:

SVM Win32 binary

Requirements: Windows 98/2000/NT/XP

Dependencies: PVM (optional)

Download servers:

SVM RedHat9 binary

Requirements: RedHat 9 Linux

Dependencies: None

Download servers:

SVM FreeBSD binary

Requirements: FreeBSD 4.8 or above

Dependencies: None

Download servers:

jSVM Jython source for all systems (0.23)

Requirements: Jython 2.0 or higher, JRE 1.3 or higher.

Dependencies: None

Download servers:

jSVM Java .jar compiled package for all systems (0.23)

Requirements: JRE 1.3 or higher.

Dependencies: None

Download servers:

PyGame

PyGame source 1.5.6 with source of other required packages, a recipe for compiling from these sources is also included. (Don't scare!)

PyGame 1.5.6 binary RPM for RedHat 9.0

PyGame 1.5.6 source RPM

A special note on RedHat 9

Since RedHat 9 Linux uses a new threading model called NPTL, it is quite possible that SVM blocks on this system while executing SOME models. If this happens to you, please set the following environment variable before running SVM (you may want to add a line to your .cshrc or .bash_profile file):

export LD_ASSUME_KERNEL=2.4.1

or,

 setenv LD_ASSUME_KERNEL 2.4.1

Syntax highlighting for statechart description files

XEmacs: save the SVM mode file (right click on the link and choose "save") to any directory (i.e., home directory ~/), and add the following lines to your .emacs file:

(setq load-path (append load-path '("D:\\Workshop\\svm-mode")))
(setq auto-mode-alist                                          
     (cons '("\\.[Dd][Ee][Ss]$" . svm-mode) auto-mode-alist))  
(autoload 'svm-mode "svm-mode"                                 
     "Statechart description mode for SVM" t)                  

Accordingly change the path in the first line to the place where you saved the SVM mode file.

Note: In UNIX, .emacs file is located in your home directory ~/. If it doesn't exist, you should create one. In Windows, the file is not called .emacs but init.el in the .xemacs subdirectory of your XEmacs directory (by default, it is C:\Program Files\XEmacs\XEmacs-21.4.11\i586-pc-win32 for XEmacs v21.4 patch 11). Also be aware that in Windows paths are separater by "\", so you should use "\\" in the load-path to escape the character.

Emacs: for Unix, it is the same as XEmacs; for Windows, it is also the same except that, instead of init.el, the modified init file is in the bin subdirectory of the Emacs directory (i.e., C:\emacs-21.2\bin) called _emacs.

Vim: save the Vim syntax file (right click on the link and choose "save") to any directory (i.e., home directory ~/), and add the following lines to your .vimrc file:

augroup svm                                                    
au! BufNewFile,BufReadPost *.des                               
au BufNewFile,BufReadPost *.des so D:\Workshop\svm-mode\svm.vim
augroup END                                                    

Accordingly change the path in the third line to the place where you saved the Vim syntax file.

Note: In UNIX, .vimrc file is located in your home directory ~/. If it doesn't exist, you should create one. In Windows, the file is not called .vimrc but _vimrc in the your Vim directory (for instance, C:\Vim).

UltraEdit: append the following contents to the end of your wordfile.txt (in the UltraEdit installation directory), accordingly change the number /L20 at the beginning if necessary.

JCreator: save the syntax file (right click on the link and choose "save") to the JCreator syntax directory (by default, C:\Program Files\Xinox Software\JCreator Pro\Syntax). Run JCreator and close all opened files and projects. Choose "Options..." from "Configure" menu. Click on "Document" in the left panel and press the "New..." button. When prompted, enter "svm" as the label and then "Next >". Enter "des" as extension and choose svm.syn from the dropdown list, "Next >". Then press "Finish" and "OK" to confirm.

jEdit: save the syntax file (right click on the link and choose "save") to the jEdit mode directory (run jEdit and from the "Utilities" menu you can see the jEdit Home directory; the mode directory is in the modes subdirectory). Then open the catalog file in the modes directory and add the following few lines to it (between "<MODES>" and "</MODES>"):

<MODE NAME="svm"   FILE="svm.xml"           
                   FILE_NAME_GLOB="*.des" />

Maintained by Thomas Feng, Winter 2002