pub struct SccGraph {
pub order: Vec<BTreeSet<DefinitionId>>,
pub depends_on: BTreeMap<DefinitionId, BTreeSet<DefinitionId>>,
pub member_of: BTreeMap<DefinitionId, DefinitionId>,
}Expand description
scc_graph’s output: the dependency-ordered component membership plus
the condensation DAG’s adjacency, keyed by each component’s stable id —
its own minimum member (FG-2, issue #631’s scc_membership() query;
SccId is a plain DefinitionId in brink-db’s query layer, per the
design doc’s “already the sort key in graph.rs” note).
PartialEq/Eq: the salsa cutoff for scc_membership_query — an edit
that leaves the call graph’s SCC partition and condensation identical
leaves this equal, so every solve_scc_query backdates.
Fields§
§order: Vec<BTreeSet<DefinitionId>>Every component, in the same dependency order [topo_order]
returns: a component appears after every other component it calls.
depends_on: BTreeMap<DefinitionId, BTreeSet<DefinitionId>>component id -> { other component ids it calls } — the condensation
adjacency. solve_scc(S) reads solve_scc(T) for each T in
depends_on[S]; the condensation is a DAG (SCCs are maximal by
construction), so this recursion is always acyclic — no salsa cycles
(Fork 1 ruling, design doc §8).
member_of: BTreeMap<DefinitionId, DefinitionId>def -> its component's id — the reverse index inferred_signature(def)
/ infer_body(def) use to find which solve_scc result to read.
Trait Implementations§
impl Eq for SccGraph
impl StructuralPartialEq for SccGraph
Auto Trait Implementations§
impl Freeze for SccGraph
impl RefUnwindSafe for SccGraph
impl Send for SccGraph
impl Sync for SccGraph
impl Unpin for SccGraph
impl UnsafeUnpin for SccGraph
impl UnwindSafe for SccGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.