Skip to content

Dictionary Construction

Justine West edited this page Jan 8, 2024 · 29 revisions

Input

  1. An analysis data structure

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. Check to see if a valid analysis is returned, if not then raise an error

      3. If the analysis is valid, return the analysis' used symbol set

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

    3. For each entry in the used symbol, create 3 subsets consisting of only array symbols, enumeration symbols, and struct symbols

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

    1. Build the resolved identifier to dictionary element map:

      1. Get map from the component and for each element in the map

        1. Retrieve the identifier from the element and add it to the base ID of the component instance to create the resolved ID

        2. Add the resolved ID to mapping from resolved ID to dictionary element

Clone this wiki locally