                        Input/Output File Formats
                        -------------------------
 
This section describes the input/output file formats used by decada.

FSM File
--------
 
The first line of the file is a number representing the total number of states in
the state machine.  Next, each state of the FSM along with its transitions is specified.  The initial state is listed first while the remaining states can be entered in any order.  Below is a guideline for creating FSM files:
 
Number of states in the FSM
 
Initial State Name    Marked/Unmarked    Number of Transitions out of this State
Transition Name       Resultant State Name
Transition Name       Resultant State Name
...                   ...
 
State Name            Marked/Unmarked    Number of Transitions out of this State
Transition Name       Resultant State Name
...                   ...
 
Below is an example FSM file:
 
3
 
p0     0      2
a      p0
b      p2
 
p1     0      1
a      p2
 
p2     1      2
b      p0
c      p2
 
The above file represents an FSM with 3 states.  The initial state is p0.  This state has two transitions.  Event “a” results in a transition to state p0.  Event “b” results in a transition to state p2.  p2 is a final or “marked” state.
 
Controllability/Masking File:
 
Observer and Controllability related functions of this library require information
which is supplied through another input file.  This file is related to the plant FSM.  When calling functions that require this information the Controllability/Masking file defaults to the input plant filename with “_events” concatenated to the end eg: input plant.data requires plant.data_events to be specified.

The first line of the file has a number representing the total number of supervisors for the plant.  Following is the number of events in the plant. Next, each event name is listed followed by a 0 or 1 for Controllable/Uncontrollable. This boolean is followed by :: and the masked event name.  This repeats for each supervisor for each event.   Below is a guideline for creating Controllability/Masking files.

Number of Supervisors    Number of Events
Transition Name	Controllable/UnControllable::Masked Transition Name ...
Transition Name	Controllable/UnControllable::Masked Transition Name ...
...

Below is an example Controllability/Masking file:
 
2	3
a	1::b  0::a
b	1::b  1::*
c	0::*  1::c

The above represents a Controllability/Masking file that defines there are two supervisors with 3 events.  For supervisor 1 event “a” is controllable and is observed as event “b”.  For supervisor 2 event “a” is uncontrollable and is observed as event “a”. 

Other Files:
For the completion function there is a different input file.  This input file contains a list of events to complete the FSM with eg: see completion_events.data.
