pub struct UnifiedCallGraph {
pub static_calls: Vec<MirCall>,
pub runtime_calls: Vec<CallEdge>,
}Expand description
Static MIR candidates plus calls observed in one live run. 静态 MIR 候选边与一次运行中真实观察到的调用边。
Fields§
§static_calls: Vec<MirCall>Calls the static MIR parse proposed, none of them confirmed as executed. 静态 MIR 解析提出的调用,均未确认为已执行。
runtime_calls: Vec<CallEdge>Calls actually observed during the live run, i.e. confirmed evidence. 实时运行中真正观察到的调用,即已确认的证据。
Implementations§
Source§impl UnifiedCallGraph
impl UnifiedCallGraph
Sourcepub fn new(static_graph: &MirGraph, trace: &CallTrace) -> Self
pub fn new(static_graph: &MirGraph, trace: &CallTrace) -> Self
Pair one static MIR graph with one live trace into a single evidence set; neither input is mutated. 将一个静态 MIR 图与一次实时 trace 配对为一份证据集合;两侧输入都不被修改。
Sourcepub fn topology(&self) -> CallGraph
pub fn topology(&self) -> CallGraph
Delegate topology queries to the petgraph-backed adapter. 将拓扑查询委托给基于 petgraph 的适配层。
Sourcepub fn relations(&self) -> Vec<CallRelation>
pub fn relations(&self) -> Vec<CallRelation>
Merge all known edges into one evidence-aware relation list. 将所有已知边合并为一份带证据等级的关系列表。
Live edges win over MIR candidates with the same logical symbols. A
static candidate that was not observed remains visible as Mir, so a
missing branch is not silently mistaken for a successful call.
逻辑符号相同的边以 Live 证据为准。未被观察到的静态候选仍保留为
Mir,不会把未执行分支误报成已经成功调用。
Trait Implementations§
Source§impl Clone for UnifiedCallGraph
impl Clone for UnifiedCallGraph
Source§impl Debug for UnifiedCallGraph
impl Debug for UnifiedCallGraph
Source§impl Default for UnifiedCallGraph
impl Default for UnifiedCallGraph
impl Eq for UnifiedCallGraph
Source§impl PartialEq for UnifiedCallGraph
impl PartialEq for UnifiedCallGraph
impl StructuralPartialEq for UnifiedCallGraph
Auto Trait Implementations§
impl Freeze for UnifiedCallGraph
impl RefUnwindSafe for UnifiedCallGraph
impl Send for UnifiedCallGraph
impl Sync for UnifiedCallGraph
impl Unpin for UnifiedCallGraph
impl UnsafeUnpin for UnifiedCallGraph
impl UnwindSafe for UnifiedCallGraph
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.