Skip to main content

Module dependency

Module dependency 

Source
Expand description

Value-free guard dependency analysis for runtime and symbolic cell graphs.

Register all cell keys, add every authored method direction, then add guard dependencies in diagnostic priority order. Method-only cycles are legal; a guard must not depend on a cell it governs. No values or callbacks are needed. Validate imported references before inserting trusted edges here. Validate ordinary relationship structure with check_relationship_edges.

§Examples

use adam_rs::dependency::{DependencyGraph, DependencyHop};

let mut graph = DependencyGraph::new(["input", "output"]);
graph.add_method("copy", &["input"], &["output"]);
assert_eq!(graph.analyze().unwrap().guard_depth("output"), 0);
graph.add_guard("output", "input");
let path = graph.analyze().unwrap_err();
assert_eq!(path.cells, ["input", "output"]);
assert_eq!(path.hops, [DependencyHop::Method("copy")]);

Structs§

DependencyGraph
An owning graph of cell identities, method dependencies, and ordered guards.
DependencyOrder
An owned snapshot of each cell’s longest dependency path measured in guard edges.
DependencyPath
An ordered governed-cell-to-guard path that witnesses a guard cycle.
DependencyProjection
A shared forest of nonempty boundary paths returned by DependencyGraph::project.
DependencyStep
One cell and its optional incoming edge in a projection’s shared path forest.
ProjectedDependency
One nonempty boundary dependency and its representative path.

Enums§

DependencyHop
The provenance of one dependency edge.