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
41
42
43
44
45
46
47
48
49
50
51
//! Graph extractors — source (SCIP / manifests) and binary (ELF) — feeding the
//! one `G = (V, E)` model.
//!
//! Each node/edge an extractor emits carries a [`Provenance`] tag so a consumer
//! (release-doctor blast-radius, modgunn, the viz) knows whether the fact was
//! reconstructed from **source** or from a compiled **binary** — the two graphs
//! coexist in one warehouse and a binary-derived edge is (necessarily) coarser
//! than a source-derived one.
/// The warehouse provenance marker for a node/edge reconstructed from a compiled
/// ELF artefact (as opposed to from source). EPIC item 8 calls for exactly this
/// tag so a node/edge "knows whether it came from source or binary".
pub const BINARY_GRAPH_PROVENANCE: &str = "binary_graph";
/// The provenance marker for a node/edge extracted from source (manifests / SCIP
/// / the syn symbol pass). The counterpart of [`BINARY_GRAPH_PROVENANCE`].
pub const SOURCE_GRAPH_PROVENANCE: &str = "source_graph";
/// Which extractor produced a graph node/edge. Persisted as its
/// [`as_str`](Provenance::as_str) form (the `binary_graph` / `source_graph`
/// warehouse markers) so the two graphs can share one `G` yet stay
/// distinguishable.