Skip to main content

constrained_path

Function constrained_path 

Source
pub fn constrained_path(
    blueprint: &AuditBlueprint,
    must_visit: &[String],
    preconditions: &HashMap<String, Vec<String>>,
) -> ConstrainedPathResult
Expand description

Compute the shortest paths for a constrained set of procedures.

Starting from must_visit, the function expands the required set by following preconditions transitively (DFS / BFS over the precondition graph). It then delegates to analyze_shortest_paths for the full blueprint and returns only the entries that belong to the required set.

ยงArguments

  • blueprint โ€“ The audit blueprint to analyse.
  • must_visit โ€“ Procedure ids that must be covered.
  • preconditions โ€“ Map from procedure id to its direct preconditions.