Skip to main content

backward_slice

Function backward_slice 

Source
pub fn backward_slice(
    shape: ProgramGraphShape,
    frontier_in: &str,
    frontier_out: &str,
) -> Program
Expand description

Build one reverse-BFS step. Caller invokes this Program in a host loop until the slice bitset stops growing (same fixpoint driver pattern as DF-2 reaching, DF-3 points-to).

Buffer contract: frontier_in is the current slice bitset (seed is one bit set - the sink node). frontier_out is the expanded bitset after one reverse-edge traversal. The caller-supplied ProgramGraph buffers are bound at the canonical pg_* names (callgraph ∪ reach ∪ dom merged via three-way fuse_programs).

PHASE6_DATAFLOW HIGH: previous 5-arg entry hardcoded ProgramGraphShape::new(1, 1) and ignored the reach, callgraph, dom buffer arguments - i.e. it produced a 1-node-grid kernel for any real CFG, silently losing every dependency edge. The 5-arg shim is now #[deprecated] and delegates with a pessimistic shape that surfaces the bug. Callers MUST use the explicit-shape entry below.