Module graph

Source
Expand description

Graph representation stages for DFIR graphs.

Modules§

graph_algorithms
General graph algorithm utility functions
ops
DFIR’s operators

Structs§

DfirGraph
An abstract “meta graph” representation of a DFIR graph.
DiMulGraph
A directed multigraph where an vertex’s inbound and outbound edges are indexed.
FlatGraphBuilder
Wraper around DfirGraph to build a flat graph from AST code.
GraphEdgeId
ID to identify an edge.
GraphLoopId
ID to identify a loop block in DfirGraph.
GraphNodeId
ID to identify a node (operator or handoff) in DfirGraph.
GraphSubgraphId
ID to identify a subgraph in DfirGraph.
OpInstGenerics
Operator generic arguments, split into specific categories.
OperatorInstance
Meta-data relating to operators which may be useful throughout the compilation process.
WriteConfig
Configuration for writing graphs.

Enums§

Color
Push, Pull, Comp, or Hoff polarity.
GraphNode
A node, corresponding to an operator or a handoff.
PortIndexValue
Helper struct for PortIndex which keeps span information for elided ports.
WriteGraphType
Enum for choosing between mermaid and dot graph writing.

Functions§

build_hfcode
The main function of this module. Compiles a DfirCode AST into a DfirGraph and source code, or Diagnostic errors.
eliminate_extra_unions_tees
Removes missing unions and tees. Must be applied BEFORE subgraph partitioning, i.e. on a flat graph.
get_operator_generics
Gets the generic arguments for the operator.
partition_graph
Main method for this module. Partions a flat DfirGraph into one with subgraphs.