Skip to content

State Machine Analysis Data Structure

Rob Bocchino edited this page Jul 28, 2024 · 36 revisions

The State machine analysis data structure represents the results of source analysis on an FPP state machine. It contains the following members.

  • Nested scope: A state machine nested scope object that represents the current position in a scope traversal.

  • Parent symbol map: A map from state machine symbols to their parent state machine symbols. For example, the symbol for a state definition appearing inside a state definition S is mapped to the symbol S.

  • Scope name list: A list of unqualified names representing the enclosing scopes, with the innermost name at the head of the list. The scope name list operates in the same way as the scope name list for the analysis data structure.

  • Symbol-scope map: A map from state machine symbols to their state machine scopes.

  • Use-def map: A map from uses (identifiers and qualified identifiers that refer to definitions of state machine symbols) to the state machine symbols representing their definitions.

  • Transition graph: The transition graph for the state machine.

  • Enter expression type map: A map from node identifiers representing enter expressions to type options.

  • Flattened initial transition: An optional initial transition representing the initial transition in the flattened state machine. This transition goes to a leaf state or junction, and it records all the actions implied by the entry actions and initial transition specifiers in the state machine. The initial value is None.

  • Flattened state transition map: A map from state definition symbols to signal-transition maps. The keys in the map are leaf states. For each key S, the corresponding signal-transition map records, for each signal s, the transition out of S on signal s in the flattened state machine. Each transition records all the entry and exit actions implied by the state hierarchy.

  • Flattened junction transition map: A map from enter expression nodes to transitions. The keys in the map are enter expressions appearing in junctions. For each key e, the corresponding transition is the transition represented by e in the flattened state machine. Each transition records all the entry and exit actions implied by the state hierarchy.

Clone this wiki locally