Skip to content

Check State Machine Definitions

Rob Bocchino edited this page Jul 17, 2024 · 5 revisions

This algorithm traverses the source model and checks state machine definitions.

Input

  1. A list tul of translation units.

  2. An analysis data structure a representing the results of analysis so far.

Output

An updated analysis a' with the state machine map filled in if the check passes; otherwise an error.

Procedure

Visit each translation unit in tul with input a, yielding either a' or an error.

AST Visitor Methods

Each method accepts an analysis data structure a as input and yields either an updated analysis data structure a' or an error as output.

Translation Units

For each translation unit tu, visit each state machine definition appearing in tu.

State Machine Definitions

For each state machine definition d

  1. Check state machine semantics for d.

  2. Use the state machine analysis data structure sma resulting from step 1 to create a new state machine m.

  3. Construct the unique state machine symbol s for d.

  4. Map s to m in the state machine map of a.

  5. Return a as the result.

Clone this wiki locally