Skip to content

Check System Definitions

Rob Bocchino edited this page Jul 13, 2026 · 5 revisions

This algorithm traverses the source model and checks system definitions.

Input

  1. A list tul of translation units.

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

Output

The analysis a 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 a or an error as output.

Translation Units

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

System Definitions

For each system definition d

  1. If the system option in a is already defined, then raise an error (duplicate system definition).

  2. Otherwise

    1. Look up the topology definition t referred to by d in the use-def map.

    2. Look up the dictionary D for t in the dictionary map.

    3. Use d, t, and D to construct a system s.

    4. Store s in the system option for a.

    5. Return a as the result.

Clone this wiki locally