backhopper_xref_graph/lib.rs
1// Copyright (C) 2026 Michael S. Klishin and Contributors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// See LICENSE-APACHE and LICENSE-MIT for details.
4
5//! Whole-program call-graph primitives for `backhopper-xref`.
6//!
7//! This crate has no Erlang knowledge. It provides:
8//!
9//! * [`Vertex`] and [`FunctionRef`]: entities the graph tracks
10//! * [`VertexSet`] and [`Relation`]: finite sets and binary relations with
11//! the operators a call-graph analysis needs (`union`, `intersection`,
12//! `compose`, `image`, `transitive_closure`, …)
13//! * [`CallGraph`]: the aggregate, parameterised on a mode marker
14//! ([`Functions`] vs [`Modules`]) and a phase marker ([`Building`]
15//! vs [`Built`]) so misuses become compile errors
16
17pub mod call;
18pub mod errors;
19pub mod graph;
20pub mod loc;
21pub mod relation;
22pub mod state;
23pub mod vertex;
24
25pub use call::{
26 CallKind, CallTarget, FunctionRef, FunctionSig, LocalFunctionRef, UnresolvedCallSite,
27};
28pub use errors::GraphError;
29pub use graph::{CallGraph, Deprecation, DeprecationTier, ModuleSummary};
30pub use loc::{Loc, PathId, PathInterner, Position};
31pub use relation::{Relation, VertexSet};
32pub use state::{Building, Built, Functions, Mode, Modules, Phase};
33pub use vertex::Vertex;