Validation of an activity diagram representing a COBOL
program must meet certain criteria.
The activity diagram represents a single flow of control and/or
of data that represents a single thread in the program. An activity
diagram representing a COBOL program is valid if all
of the following conditions are met:
- The kinds of nodes are ActionNode, DecisionNode, MergeNode, InitialNode
and FinalNode.
- The diagram contains one and only one InitialNode.
- The initial node has one and only one outgoing edge.
- The diagram contains one and only one FinalNode.
- The final node has at least one incoming edge.
- The diagram contains no isolated node (a node with neither incoming
edge nor outgoing edge associated with it).
- The diagram contains no "fake final node" (a node with no incoming
edge associated with it, where the node is any valid node except the
final node).
- The diagram contains no "fake initial node" (a node with no incoming
edge associated with it, where the node is any valid node except the
initial node).
- Action nodes do not have multiple outgoing edges.
- Decision nodes have one and only one guard condition ("ELSE IF"
decision nodes are not handled).
- Decision nodes are always binary (IF X ... THEN Y ... ELSE Z).
As a consequence, an action node that has more than one incoming
edge represents either the first node of a cycle in the activity diagram
or a node that can be reached by multiple paths from the InitialNode.
One of the path will be considered as part of the "main" flow of control,
and any other path will be considered as GOTO statement. Other topics
discuss cycles, loops, and GOTO statements.