PyModel Commands PyModel provides three main commands: pma, PyModel analyzer: generates a finite state machine (FSM) and computes properties by exploring a model program, FSM, test suite, or a product of these. pmg, PyModel graphics: generates a file of graphic commands from an FSM, that can be processed by the Graphviz dot command to produce graphics files in various formats including .svg, .pdf, and .ps pmt, PyModel tester: displays traces, generates tests offline, executes offline tests, or generates and executes tests on-the-fly. There is also a fourth program: pmv, PyModel viewer: invokes pma, pmg, and the Graphiz dot command (to display the graphics generated by pmg). The pmv program provides brevity and convenience, so analysis and display can be accomplished by a single command. For more about each of these programs, type the command to display its built-in help, for example: pma --help, or pma -h, or just pma (with no arguments). This will print a brief description of the program and a list of its command line options. (For convenience, this built-in help output appears in this directory in pma.txt etc.) Use pma, pmg, and dot (or pmv) to visualize and preview the behavior of pmt. Every path through the graph created by pma (and drawn by pmg) is a trace (test run) that may be generated by pmt, when pma and pmt are invoked with the same arguments. PyModel also provides these programs and scripts: dotsvg: converts dot file output from pmg to SVG file that can be displaye in a browser. dotps: converts dot file output from pmg to PostScript file that can be printed or displayed in PostScript viewer. dotpdf: converts dot file output from pmg to PDF file that can be printed or displayed in a PDF viewer. (The pmv command invokes one of these dot commands) wsgirunner: runs WSGI-compliant web applications (for example webapp.py in the WebApplication sample) on localhost trun: runs sample demonstrations and scripts that test PyModel itself. tdiff: works with trun to execute and check regression tests on PyModel. clogdiff: same as tdiff, used in PyModel versions before 1.0, retained for backwards compatibility, but now deprecated tclean: removes output files from test scripts in the current directory To prepare to use the programs, put the PyModel/bin directory on your execution path. Put the Pymodel/pymodel directory and the the current directory on the Python path. To achieve all this, execute the PyModel/bin/pymodel_paths command, or put the commands it contains in your .profile or .bashrc. (If you install PyModel so the commands and modules are put in some standard place, this may not be necessary.) Invoke the four PyModel programs on the command line or in scripts by name, without using the .py extension (pmt not pmt.py). You can also include the .py extension (pmt.py not just pmt); some older scripts you may still have used this form. BUT to use this form, you must put PyModel/pymodel on your execution path (not just your Python path). For usage examples with many combinations of options and arguments, see the test*.py test script modules in the samples directories. Revised Apr 2013