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.

  1. Context Insensitive: Key –> Pointer, DataSet –> PointsTo
  2. 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>
where K: Hash + Eq + Copy, D: Idx, DS: PointsToSet<D>,

source

pub fn new() -> BasePTData<K, HashSet<K>, D, DS>

source

pub fn get_pts_map(&self) -> &HashMap<K, DS>

Return Points-to map

source

pub fn clear(&mut self)

source

pub fn get_pts(&self, var: K) -> Option<&DS>

Get points-to set of a var.

source

pub fn get_mut_pts(&mut self, var: K) -> Option<&mut DS>

source

pub fn get_rev_pts(&self, elem: D) -> Option<&HashSet<K>>

Get reverse points-to set of a elem.

source

pub fn add_pts(&mut self, var: K, elem: D) -> bool

Adds element to the points-to set associated with var.

source

pub fn union_pts(&mut self, dst_var: K, src_var: K) -> bool

Performs pts(dst_var) = pts(dst_var) U pts(src_var).

source

pub fn union_pts_to(&mut self, dst_var: K, src_ds: &DS) -> bool

Performs pts(dst_var) = pts(dst_var) U src_dataset.

source

pub fn remove_pts_elem(&mut self, var: K, elem: D) -> bool

Removes element from the points-to set of var.

source

pub fn clear_pts(&mut self, var: K)

Fully clears the points-to set of var.

source

pub fn dump_pt_data(&self)

Dump stored keys and points-to sets.

Trait Implementations§

source§

impl<K, KS, D, DS> Debug for BasePTData<K, KS, D, DS>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

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>
where D: Send, DS: Send, K: Send, KS: Send,

§

impl<K, KS, D, DS> Sync for BasePTData<K, KS, D, DS>
where D: Sync, DS: Sync, K: Sync, KS: Sync,

§

impl<K, KS, D, DS> Unpin for BasePTData<K, KS, D, DS>
where D: Unpin, DS: Unpin, K: Unpin, KS: Unpin,

§

impl<K, KS, D, DS> UnwindSafe for BasePTData<K, KS, D, DS>
where D: UnwindSafe, DS: UnwindSafe, K: UnwindSafe, KS: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.