Skip to content

Check Port Definitions

Robert L. Bocchino Jr. edited this page Apr 18, 2024 · 3 revisions

This algorithm traverses the source model and checks port definitions.

Input

  1. A list tul of translation units.

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

Output

  1. The analysis a if the check passes; otherwise an error.

Procedure

  1. 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.

Port Definitions

  1. For each port definition d, check that the parameter names in d are unique.

  2. Return a as the result.