pub struct ProgramDependencyGraph {
pub function_name: String,
pub file_path: String,
pub nodes: HashMap<usize, PdgNode>,
pub edges: Vec<PdgEdge>,
pub cfg: Option<ControlFlowGraph>,
pub dfg: Option<DataFlowGraph>,
}Fields§
§function_name: String§file_path: String§nodes: HashMap<usize, PdgNode>§edges: Vec<PdgEdge>§cfg: Option<ControlFlowGraph>§dfg: Option<DataFlowGraph>Implementations§
Source§impl ProgramDependencyGraph
impl ProgramDependencyGraph
pub fn new(function_name: String, file_path: String) -> Self
pub fn from_cfg_and_dfg(cfg: ControlFlowGraph, dfg: DataFlowGraph) -> Self
pub fn add_node(&mut self, node: PdgNode)
pub fn add_edge( &mut self, from: usize, to: usize, dependency_type: DependencyType, label: Option<String>, )
pub fn program_slice(&self, criterion_node: usize) -> HashSet<usize>
pub fn forward_slice(&self, criterion_node: usize) -> HashSet<usize>
pub fn find_parallel_opportunities(&self) -> Vec<Vec<usize>>
pub fn find_tainted_nodes(&self, taint_source: usize) -> HashSet<usize>
pub fn to_dot(&self) -> String
Trait Implementations§
Source§impl Clone for ProgramDependencyGraph
impl Clone for ProgramDependencyGraph
Source§fn clone(&self) -> ProgramDependencyGraph
fn clone(&self) -> ProgramDependencyGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProgramDependencyGraph
impl Debug for ProgramDependencyGraph
Source§impl<'de> Deserialize<'de> for ProgramDependencyGraph
impl<'de> Deserialize<'de> for ProgramDependencyGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProgramDependencyGraph
impl RefUnwindSafe for ProgramDependencyGraph
impl Send for ProgramDependencyGraph
impl Sync for ProgramDependencyGraph
impl Unpin for ProgramDependencyGraph
impl UnsafeUnpin for ProgramDependencyGraph
impl UnwindSafe for ProgramDependencyGraph
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more