
		    Termgraph
		    =========

Termgraph is a tool for drawing  Petri  Nets  from
agents [caution : the petri nets have no standard
semantics].

Termgraph is a  subsystem of GraphEd,  and has its
own  control panel.  The   control panel has  four
different  modes  :  'Commands', 'Agent   Editor',
'Redaction' and 'Closed'. The  cycle in  the upper
left of the  control  panel switches between these
modes.

Most messages are   written  to GraphEd's  message
window.

Commands
--------

Agent (dir|file|data) :
A text field to input a
- directory or a
- file name or an
- agent (data).
Most of the  following  items take the contents of
this field as their input.

List :
List the directory given in "Agent".

Show :
Browse through the files given in "Agent".

Select as Path :
       as File :
       as Data :
Select the path|file|data given in agent.

Clear :
Clear the "Agent" field.

Term --> Graph :
Convert the agent into a graph.

Switch :
Small Petri Net simulator.


At the bottom of  the  control panel,  there is  a
shell subwindow. The  output of  "List" and "Show"
goes to that window.


Agent Editor :
--------------

The agent editor is a standard SunView text editor
with additional 'Load' and 'Store' buttons.


Redaction :
-----------

This mode is for fine-tuning the layout.

The switches 'basic length', 'transition width',
'transition height', 'place width', 'place height'
are for costumizing sizes.

The cycle in the  upper right is for  setting node
and   edge attributes; use the   text field in the
upper  left  as input. Confirm  your settings with
the 'set  ...' button in the  upper  right.

1/4 turn left :
Turns graph counterclockwise for 90 degree.

Several switches :
Small petri net simulator. Node
labels  are   token   capacities.   Repeats firing
tokens up to 25 times.

Zoom :
Obsolete.

Save/ load values :
Store defaults in '.termgraph'.

Edgeline :
Control the quality of edgelines.

Get graph :
Center the selected graph.


Close :
-------

Minimum-sized control panel.




The agent syntax is as follows :

<main_ag>	::= <agent>.<substitution>  |
		    <agent>

<agent>		::= skip  |
		    <action>  |
		    <agent>;<index><agent>  |
		    <agent>||<index><agent>  |
		    <agent> or <index><agent>  |
		    <agent_id>::<agent>  |
		    <agent><sema><agent>  |
		    (<agent>)
		    
<substitution>	::= <>  |
		    <agent_id>::<agent>.  |
		    <agent_id>::<agent>.<substitution>  |
		    
<action>	::= <>  |
		    <identificator> 

<agent_id>	::= <identificator>

<sema>		::= |${<critical>,<critical>}
                    ^^
                    That is "|$", not a choice

<critical>	::= <identificator>  |
		    ||<index>  |
		    or<index>  |
		    <sema>

<identificator> ::= {<character>+}

<character>	::= a  | ...  | z  |
		    A  | ...  | Z  |
		    0  | ...  | 9  | ..
		    
<index>		::= <>  |
		    [<identificator>]
		    
---------------------------------------------------------
|  denotes choice
<> is the empty expression
+  denotes 1 to n occurences

Examples :
==========

(1)	single_action

(2)	A or B. A::C;D. C::B. B::b1||b2.

(3)	a || rec :: (b || c or rec) ; d

(4)	produce |${produce,||[0]} (consume ||[0] perhaps);x.
	perhaps :: skip.


Quick Tour
==========

(0) Set the mode to 'commands' (default)
(1) Enter the agent in the 'Agent' text field
(2) press 'as data'
(3) press 'Term --> Graph'
(4) type CTRL-G CTRL-C in GraphEd's working
    aera if the graph is not visible

Further information (in German) : 
=================================

Seisenberger Rudolf, "TERMGRAPH: Ein System    zur
zeichnerischen   Darstellung  von   strukturierten
Agenten und  Petrinetzen",  University of  Passau,
1990
