1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! Shared DAG helpers for the verify family.
//!
//! `transitive_ancestors` + `ordered` were copied near-verbatim in
//! [`crate::transaction`] and [`crate::infoflow`]; both derive ordering from the
//! *same* [`car_ir::dependency_edges`] the executor sequences on, so the notion
//! of "ordered" stays identical to the runtime by construction. Keeping one copy
//! here removes the drift risk of two.
use ;
use HashSet;
/// Transitive ancestors of each action in the executor's dependency graph.
/// `ancestors[i]` is every action that must complete before `i` runs.
/// Built from [`car_ir::dependency_edges`] — the *same* edges
/// [`car_ir::build_dag`] sequences on — so the checker's notion of "ordered" is
/// identical to the runtime's by construction (neo review C1: a re-derivation
/// drifts from the DAG and suppresses real races / invents false ones).
/// Are actions `i` and `j` sequenced by a (transitive) dependency — i.e. is one
/// a DAG ancestor of the other? If so a shared access is an ordered step, not a
/// race.