draw_astg(1cad)

NAME
draw_astg    - draw a Petri net (or a Signal Transition Graph)

SYNOPSIS
draw_astg [options]* [infile]

DESCRIPTION
draw_astg is a tool that draws a Petri net from a description is astg format (SIS compatible). It can generate descriptions in different formats: PostScript, MIF (FrameMaker graphics), HPGL (HP pen plotters), PCL (Laserjet printers, GIF (bitmap graphics) and DOT (graph format for dot). In case the input file describes a state graph or a Petri net with only 1-token state machine, draw_astg can depict a state graph (nodes and labeled arcs). draw_astg calls dot, a preprocessor designed at AT&T for drawing directed graphs.

OPTIONS

-h  Help mode, prints the usage.

-v  Print version only.

-ip Show implicit (1-fanin 1-fanout) places.

-sg Depict the net as a state graph. It only works if the specification is a state graph or a Petri net with only a 1-token state machine.

-bin
    Depict the net as a state graph with binary encoding of the signals and shadowed states with CSC conflicts. This option only works when the input file has been generated with write_sg -bin.

-bw Output a black-and-white picture. Recommended for black-and-white printers.

-nonames
    Do not show place names and transition indices in Petri nets and do not show state names in state graphs.

-noinfo
    Suppress information about signals in the caption of the figure.

-cn Assume the net is a Context Net (with self-loop places) and depict context arcs as dotted arcs.

-Tfmt
    Select the output graphic format. Valid values for fmt are ps (PostScript), mif (FrameMaker graphics), hpgl (HP pen plotters), pcl (Laserjet printers), gif (bitmap graphics) and dot (dot format). If the -T option is not used, draw_astg generates PostScript format.

-TB Generate a top-bottom-oriented layout (default).

-LR Generate a left-right-oriented layout.

-a4 Generate a layout for an A4-sized sheet (default).

-a3 Generate a layout for an A3-sized sheet.

-letter
    Generate a layout for a letter-sized sheet.

-landscape
    Rotate layout 90 degrees.

-nobox
    Show transitions with no boxes (only labels).

-x[cm]n
    Define the maximum width of the layout (in cm).

-y[cm]n
    Define the maximum height of the layout (in cm).

-xinn
    Define the maximum width of the layout (in inches).

-yinn
    Define the maximum height of the layout (in inches).

-o outfile
    Write the output to outfile. Otherwise, the result is written to stdout.

ADVANCED OPTIONS

-nofold
    Do not fold layout. If this option is not specified, the layout is folded to reduce its height. This option is suggested as an alternative way of generating the layout to improve its planarity.

EXAMPLES
draw_astg graph.g -o graph.ps

generates a PostScript file for the Petri net described in graph.g.

draw_astg graph.g -x10.5 -y12 | ghostview -

generates a 10.5cm x 12cm layout in Postscript format. The output is displayed through ghostview.

petrify graph.in | draw_astg -Tmif -o graph.mif

generates a picture of the STG generated by petrify in MIF format and writes the output into the file graph.mif.

write_sg -bin graph.g | draw_astg -bin -noinfo -o graph.ps

generates a state graph from the STG described in graph.g and generates a picture with information about binary codes and CSC conflicts. Caption on signal information is suppressed.

BUGS
What are you talking about ?

AUTHOR
Jordi Cortadella
Department of Software
Universitat Politecnica de Catalunya
Barcelona, Spain
(jordic@lsi.upc.es)

STATUS
Use at your own risk. Bug reports are welcomed, as well as success stories.