pub struct PAG<P: PAGPath> { /* private fields */ }Implementations§
source§impl<P: PAGPath> PAG<P>
impl<P: PAGPath> PAG<P>
sourcepub fn addr_edge_iter(&self) -> IterCopied<PAGEdgeId> ⓘ
pub fn addr_edge_iter(&self) -> IterCopied<PAGEdgeId> ⓘ
Return an iterator for the address_of edges.
sourcepub fn get_node(&self, node_id: PAGNodeId) -> &PAGNode<P>
pub fn get_node(&self, node_id: PAGNodeId) -> &PAGNode<P>
Returns the node for the given node_id.
sourcepub fn get_node_mut(&mut self, node_id: PAGNodeId) -> &mut PAGNode<P>
pub fn get_node_mut(&mut self, node_id: PAGNodeId) -> &mut PAGNode<P>
Returns the node for the given node_id.
sourcepub fn get_node_id(&self, path: &P) -> Option<PAGNodeId>
pub fn get_node_id(&self, path: &P) -> Option<PAGNodeId>
Returns the node_id for the given path.
sourcepub fn get_or_insert_node(&mut self, path: &P) -> PAGNodeId
pub fn get_or_insert_node(&mut self, path: &P) -> PAGNodeId
Helper function to get a node or insert a new node if it does not exist in the map.
sourcepub fn has_edge(&self, src: &P, dst: &P, kind: &PAGEdgeEnum) -> bool
pub fn has_edge(&self, src: &P, dst: &P, kind: &PAGEdgeEnum) -> bool
Returns true if the edge from src to dst of the kind exists.
sourcepub fn contains_edge(
&self,
src: PAGNodeId,
dst: PAGNodeId,
kind: &PAGEdgeEnum
) -> bool
pub fn contains_edge( &self, src: PAGNodeId, dst: PAGNodeId, kind: &PAGEdgeEnum ) -> bool
Returns true if the edge from src to dst of the kind exists.
pub fn add_incoming_addr_edge(&mut self, node_id: PAGNodeId, in_edge: PAGEdgeId)
pub fn add_outgoing_addr_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
pub fn add_incoming_direct_edge( &mut self, node_id: PAGNodeId, in_edge: PAGEdgeId )
pub fn add_outgoing_direct_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
pub fn add_incoming_load_edge(&mut self, node_id: PAGNodeId, in_edge: PAGEdgeId)
pub fn add_outgoing_load_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
pub fn add_incoming_store_edge( &mut self, node_id: PAGNodeId, in_edge: PAGEdgeId )
pub fn add_outgoing_store_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
pub fn add_incoming_gep_edge(&mut self, node_id: PAGNodeId, in_edge: PAGEdgeId)
pub fn add_outgoing_gep_edge(&mut self, node_id: PAGNodeId, out_edge: PAGEdgeId)
pub fn add_incoming_cast_edge(&mut self, node_id: PAGNodeId, in_edge: PAGEdgeId)
pub fn add_outgoing_cast_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
pub fn add_incoming_offset_edge( &mut self, node_id: PAGNodeId, in_edge: PAGEdgeId )
pub fn add_outgoing_offset_edge( &mut self, node_id: PAGNodeId, out_edge: PAGEdgeId )
sourcepub fn add_edge(
&mut self,
src: &P,
dst: &P,
kind: PAGEdgeEnum
) -> Option<PAGEdgeId>
pub fn add_edge( &mut self, src: &P, dst: &P, kind: PAGEdgeEnum ) -> Option<PAGEdgeId>
Adds an edge from src to dst according to the edge type.
Returns the edge id if this edge is newly added to the graph.
pub fn add_addr_edge(&mut self, src: &P, dst: &P) -> Option<PAGEdgeId>
pub fn add_direct_edge(&mut self, src: &P, dst: &P) -> Option<PAGEdgeId>
pub fn add_load_edge( &mut self, src: &P, dst: &P, kind: PAGEdgeEnum ) -> Option<PAGEdgeId>
pub fn add_store_edge( &mut self, src: &P, dst: &P, kind: PAGEdgeEnum ) -> Option<PAGEdgeId>
pub fn add_gep_edge( &mut self, src: &P, dst: &P, kind: PAGEdgeEnum ) -> Option<PAGEdgeId>
pub fn add_cast_edge(&mut self, src: &P, dst: &P) -> Option<PAGEdgeId>
pub fn add_offset_edge(&mut self, src: &P, dst: &P) -> Option<PAGEdgeId>
sourcepub fn add_new_direct_edges<'tcx>(
&mut self,
acx: &mut AnalysisContext<'tcx, '_>,
src: &P,
dst: &P,
ty: Ty<'tcx>
) -> Vec<PAGEdgeId>
pub fn add_new_direct_edges<'tcx>( &mut self, acx: &mut AnalysisContext<'tcx, '_>, src: &P, dst: &P, ty: Ty<'tcx> ) -> Vec<PAGEdgeId>
Given two paths, add direct edge between them if they are both of pointer type or add direct edges between their pointer type fields if any. Return the edges added.
pub fn get_func_pag(&self, func_id: &FuncId) -> Option<&FuncPAG>
pub fn build_func_pag( &mut self, acx: &mut AnalysisContext<'_, '_>, func_id: FuncId ) -> bool
pub fn build_static_pag( &mut self, acx: &mut AnalysisContext<'_, '_>, def_id: DefId ) -> Option<FuncId>
pub fn promote_constants<'tcx>( &mut self, acx: &mut AnalysisContext<'tcx, '_>, def_id: DefId, gen_args: &Vec<GenericArgE<'tcx>> ) -> Option<HashSet<FuncId>>
Auto Trait Implementations§
impl<P> RefUnwindSafe for PAG<P>where
P: RefUnwindSafe,
impl<P> !Send for PAG<P>
impl<P> !Sync for PAG<P>
impl<P> Unpin for PAG<P>where
P: Unpin,
impl<P> UnwindSafe for PAG<P>where
P: UnwindSafe,
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