Struct rupta::pts_set::pt_data::BasePTData
source · pub struct BasePTData<K, KS, D, DS> { /* private fields */ }Expand description
Basic points-to data structure.
Given a key (variable/condition variable), return its points-to data (pts/context-sensitve pts). It is designed flexible for different context, heap and path sensitive analysis.
- Context Insensitive: Key –> Pointer, DataSet –> PointsTo
- Context sensitive: Key –> CSPointer, DataSet –> CSPointsTo
- K (Key): “owning” variable of a points-to set.
- KS (KeySet): collection of keys.
- D (Data): elements in points-to sets.
- DS (DataSet): the points-to set; a collection of Data.
Implementations§
source§impl<K, D, DS> BasePTData<K, HashSet<K>, D, DS>
impl<K, D, DS> BasePTData<K, HashSet<K>, D, DS>
pub fn new() -> BasePTData<K, HashSet<K>, D, DS>
sourcepub fn get_pts_map(&self) -> &HashMap<K, DS>
pub fn get_pts_map(&self) -> &HashMap<K, DS>
Return Points-to map
pub fn clear(&mut self)
pub fn get_mut_pts(&mut self, var: K) -> Option<&mut DS>
sourcepub fn get_rev_pts(&self, elem: D) -> Option<&HashSet<K>>
pub fn get_rev_pts(&self, elem: D) -> Option<&HashSet<K>>
Get reverse points-to set of a elem.
sourcepub fn add_pts(&mut self, var: K, elem: D) -> bool
pub fn add_pts(&mut self, var: K, elem: D) -> bool
Adds element to the points-to set associated with var.
sourcepub fn union_pts(&mut self, dst_var: K, src_var: K) -> bool
pub fn union_pts(&mut self, dst_var: K, src_var: K) -> bool
Performs pts(dst_var) = pts(dst_var) U pts(src_var).
sourcepub fn union_pts_to(&mut self, dst_var: K, src_ds: &DS) -> bool
pub fn union_pts_to(&mut self, dst_var: K, src_ds: &DS) -> bool
Performs pts(dst_var) = pts(dst_var) U src_dataset.
sourcepub fn remove_pts_elem(&mut self, var: K, elem: D) -> bool
pub fn remove_pts_elem(&mut self, var: K, elem: D) -> bool
Removes element from the points-to set of var.
sourcepub fn dump_pt_data(&self)
pub fn dump_pt_data(&self)
Dump stored keys and points-to sets.
Trait Implementations§
Auto Trait Implementations§
impl<K, KS, D, DS> RefUnwindSafe for BasePTData<K, KS, D, DS>
impl<K, KS, D, DS> Send for BasePTData<K, KS, D, DS>
impl<K, KS, D, DS> Sync for BasePTData<K, KS, D, DS>
impl<K, KS, D, DS> Unpin for BasePTData<K, KS, D, DS>
impl<K, KS, D, DS> UnwindSafe for BasePTData<K, KS, D, DS>
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