Skip to content

Dictionary Construction

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

For implementation, see Dictionary.scala.

Input

  1. An analysis data structure

  2. The topology on which the analysis is to be performed

Output

  1. Dictionary data structure consisting of dictionary contents

  2. If dictionary construction fails, an error and no output

Procedure

  1. Populate used symbols: Traverse component instance map and for each component

    1. For all command, event, telemetry channel, parameter, record, and container maps:

      1. Get all used symbols for all entries in the map

      2. Return the analysis' used symbol set

    2. Flatten list of sets into a single set consisting of used symbols

  2. Resolve identifiers and construct maps of resolved identifiers to commands, telemetry channels, events, parameters, records, and collections: Traverse component instance map and for each dictionary element in the component (i.e., command map, telemetry channel map, event map, parameter map, record map, collection map):

    1. Build the resolved identifier to dictionary element map:

      1. Fold over all keys (component instances) in the component instance map and do the below:

        1. For each dictionary element type (command, telemetry, event, parameter, record, collection), resolve identifiers by adding the element’s identifier to the component instance base ID

        2. Add new entry to map from base ID to dictionary element (i.e., command, telemetry, event, parameter, record, collection)

Clone this wiki locally