Skip to main content

build_reference_graph

Function build_reference_graph 

Source
pub fn build_reference_graph(view: &TrustedGraphView<'_>) -> Vec<ReferenceEdge>
Expand description

Normalize existing trusted relationships into reference edges. Never invents new relationships: every edge traces to one trusted fact.

Mapping (actual predicates from scc_core::predicates):

  • calls/invokes/handles_callback → Call
  • reads → Read; writes → Write
  • owns (state/reactive entity) → Write
  • implements/implemented_by → Implement
  • inherits → Extend
  • registers/publishes/subscribes → Register
  • imports → Import; exports → Export
  • decorates/annotates → Decorate

Confidence passes through from the relationship (default 1.0); locations are the evidence file/line when available. Deterministic: the trusted view returns relationships sorted by id.