build_dependency_graph

Function build_dependency_graph 

Source
pub fn build_dependency_graph(
    doc: &LemmaDoc,
    documents: &HashMap<String, LemmaDoc>,
) -> LemmaResult<HashMap<RulePath, HashSet<RulePath>>>
Expand description

Build dependency graph for all reachable rules

Starting from the document being evaluated, discovers all rules (local + rules from documents referenced by facts) and extracts dependencies in a single traversal.

Returns: RulePath -> Set of RulePaths it depends on