Skip to main content

propagate_taint_backward_with_progress

Function propagate_taint_backward_with_progress 

Source
pub fn propagate_taint_backward_with_progress<F>(
    graph: &SqliteGraph,
    sink: i64,
    sources: &[i64],
    progress: &F,
) -> Result<TaintResult, SqliteGraphError>
Expand description

Propagates taint backward with progress tracking.

Same algorithm as propagate_taint_backward but reports progress during execution.

§Arguments

  • graph - The graph to analyze
  • sink - The sink node ID to trace back from
  • sources - Source node IDs to check for influence
  • progress - Progress callback for reporting execution status

§Returns

TaintResult with affecting sources and ancestors.

§Progress Reporting

The callback receives:

  • current: Always 1 (single operation)
  • total: Always 1
  • message: “Backward taint propagation: from sink {sink}, {affecting} sources found”

§Example

use sqlitegraph::{
    algo::propagate_taint_backward_with_progress,
    progress::ConsoleProgress
};

let progress = ConsoleProgress::new();
let result = propagate_taint_backward_with_progress(&graph, sink, &sources, &progress)?;
// Output: Backward taint propagation: from sink 10, 2 sources found