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.
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.
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.
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.
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.
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.
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.
Bugs in orthogonal components fixed.
README file briefly explaining the usage.
Syntax highlighting for the debugger.
A number of bugs fixed, including the bug in tab-in.
A reusable and generalized statechart simulator.
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.
To grab SVM from CVS (hosted by Savannah), use the following commands:
export CVS_RSH="ssh" cvs -z3 -d:ext:firstname.lastname@example.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.
Requirements: Python 2.2 or higher.
Requirements: Windows 98/2000/NT/XP
Dependencies: PVM (optional)
Requirements: RedHat 9 Linux
Requirements: FreeBSD 4.8 or above
Requirements: JRE 1.3 or higher.
PyGame 1.5.6 binary RPM for RedHat 9.0
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):
setenv LD_ASSUME_KERNEL 2.4.1
(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.
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).
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