-
Notifications
You must be signed in to change notification settings - Fork 33
Check Topology Definitions
This algorithm traverses the source model and checks topology definitions.
-
A list tul of translation units.
-
An analysis data structure a representing the results of analysis so far.
An updated analysis a' with the topology map filled in if the check passes; otherwise an error.
Visit each translation unit in tul with input a, yielding either a' or an error.
Each method accepts an analysis data structure a as input and yields either an updated analysis data structure a' or an error as output.
For each topology definition d that has not yet been resolved:
-
Visit each member m of d with input a, building up a topology data structure t. Check each member for semantic validity as much as possible. For example, ensure that the types of the port connections match.
-
Resolve t to a partially numbered topology consisting of (a) a list of instances and (b) a mapping between connection graph names and lists of connections. The connection end points have port numbers if and only if those numbers are present in the model source.
-
Visit all topologies imported into t, ensuring that they are resolved.
-
Determine the set of all instances in t, consisting of (a) all instances specified in t and (b) public instances specified in topologies imported into t.
-
Resolve pattern specifiers in t to direct specifiers.
-
For each connection graph name g appearing in t or in an imported topology, determine the set of all connections in g, with multiplicity (two or more connections between the same pairs of unnumbered ports are allowed).
-
Include all connections directly specified in t, after resolving patterns. Check that all connections are between instances present in t. If not, throw an error.
-
Include all connections from imported topologies that go between instances present in t.
-
Check that no pair of connections connects to the same output port at the same port number.
-
-
-
Apply automatic numbering to t. This step fills in missing port numbers, preserving any numbers specified in the model source.
-
General numbering
-
Matched numbering
-
-
Check for unused ports in t that are not in the unused port list.
-
Construct the unique topology symbol s for d.
-
Map s to t in the component map of a.
-
Return a as the result.