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§
- Dependency
Graph - An owning graph of cell identities, method dependencies, and ordered guards.
- Dependency
Order - An owned snapshot of each cell’s longest dependency path measured in guard edges.
- Dependency
Path - An ordered governed-cell-to-guard path that witnesses a guard cycle.
- Dependency
Projection - A shared forest of nonempty boundary paths returned by
DependencyGraph::project. - Dependency
Step - One cell and its optional incoming edge in a projection’s shared path forest.
- Projected
Dependency - One nonempty boundary dependency and its representative path.
Enums§
- Dependency
Hop - The provenance of one dependency edge.