When executed without any command-line parameter, SVM prints out the following messages to the console:
========================================================= | Python Implementation of Statechart Virtual Machine | | Version 0.3 | | Presented by Thomas Feng, Nov. 2003 | ========================================================= Usage: svm [options...] <.des|.snp file> [parameters...] options: -c: force curses interface (Linux) -t: force textual interface -i <file>: include a file (to the head) -I <file>: include a file (to the tail) parameters: "name=value"
The meaning of the accepted command-line parameters is explained below:
For example, the users may run the HelloWorld example with the following command:
svm -c HelloWorld.des
For example, the users may run the HelloWorld example with the following command:
svm -t HelloWorld.des
Multiple text files can be inserted with multiple -i parameters on the command-line. For example, a1.des contains the following content:
STATECHART:a2.des contains the following content:
A [DS]And a3.des contains the following content:
BTo combine those descriptions and simulate the model in SVM, the user should execute the following command:
svm -i a1.des -i a2.des a3.des(Note: there must be exactly one main file on the command-line which is not preceded by the -i parameter, in this case, a3.des.) The resulting model is equivalent to the following:
STATECHART: A [DS] B(It is a model with two states but without transition.)
svm -I a2.des -I a3.des a1.des
For example, DUMP is a predefined macro (discussed later) used in the HelloWorld example. The example prints ``Hello World!'' when event e is received. To override this macro on the SVM command-line, the user may execute the following command:
svm -t HelloWorld.des 'DUMP(msg)=print "example:", [msg]'When event e is received, instead of printing ``Hello World!'' the model prints ``example: Hello World!''