Previous Up Next

8  The display_graph utility

The sf2lus distribution includes a utility program called display_graph. This parses a Stateflow model file exactly as sf2lus itself and dumps out the internal data structure as a dot file. This is useful to help understanding the Lustre output from sf2lus since it can annotate the states and links with id numbers.

The potentially unlimited complexity of Stateflow charts and the nature of Graphviz's plotting algorithms limits the size of chart which can be displayed. Also, Graphviz cannot implement inner transitions so they are represented by synthesized nodes standing for the parent node.


Figure 7: Sample output from display_graph


Figure 7 (DisplayGraph1.mdl) shows a sample output from display_graph for a simple test model. This shows most features of the output, dotted boxes are parallel states, solid boxes exclusive states, circles are junctions and points are the tails for default transitions. The transition labelled dummy has been synthesized by the parser and the diamond-shaped node labelled C is the proxy for the inner transition. Inter-level transitions are handled by Graphviz. The command line options are reasonably self-explanatory, see Appendix B.


Previous Up Next