raesl.compile.instantiating.graph_building#

Functions for instantiating the component tree.

Module Contents#

Classes#

GraphFactory

Graph factory class.

class raesl.compile.instantiating.graph_building.GraphFactory(diag_store: raesl.compile.diagnostics.DiagnosticStore, spec: raesl.compile.ast.specification.Specification | None = None)#

Graph factory class.

Converts a specification into a graph containing a node hierarchy and edges for derived dependencies between nodes.

Parameters:

diag_store – Storage for found diagnostics during the process.

node_factory#

Factory that parses spec into Node objects.

edge_factory#

Factory that derives edges from found Node objects.

make_graph(spec: raesl.compile.ast.specification.Specification | None = None) ragraph.graph.Graph | None#

Instantiate the tree defined in the specification, and build a graph for it.

Parameters:

spec – Specification object holding parsed ESL data.

Returns:

None if no root is available, else the constructed graph.

Note

Problems may be reported during instantiation and added to self.diag_store.