Convert_wa Utility
The Statemate distribution kit offers an external utility,"convert_wa" that can remove descriptive data from the model (short/long descriptions, notes, links to external files), change element names to generic names, and convert behavioral expressions (mini-specs, transition labels, static-reactions) to primitive rd()/wr() expressions, according to the usage in the original expression (for instance, the expression [COND1]/NUIM=99 will be converted to /rd!(COND1);wr!(NUM);)
The convert_wa utility creates a copy of the charts.data file in the workarea, named charts.data.renamed, and all changes are done on that copy. The original charts.data file remains untouched. To open and see the converted workarea, copy the charts.data.renamed file to a newly created workarea, on top of the original charts.data file, and then open that workarea with Statemate.
The command flags below allow the user to control which parts of the model will be converted.
%STM_ROOT%\bin\convert_wa <Project> <WorkArea> [-log <filename>] [-logmem] [-params [continue] [deletions] [names] [states] [activities] [transitions] [actions]]
Project: Statemate project name
WorkArea: Statemate workarea to convert
-log <filename>: Log conversion operations into <filename>
-logmem: Log additional memory information
-params: convert model by following parameterscontinue: continue conversion on top of existing charts.data.renamed
deletions: do the convert_wa deletions (procedural charts, combinational-assignments, truth-tables, transition notes, Subroutine implementations)
names: convert element names
states:convert static-reations and flowchart action-boxes
activities: convert mini-specs
transitions: convert transition labels
actions: convert action definitionsRunning convert_wa with just <Project> and <WorkArea> (with or without -log and -logmem) will convert all the mentioned parts of the model.