pub struct DiffPTData<K, D, DS> { /* private fields */ }
Expand description

Diff points-to data.

This is an optimisation on top of the base points-to data structure. The points-to information is propagated incrementally only for the different parts.

Implementations§

source§

impl<K, D, DS> DiffPTData<K, D, DS>
where K: Hash + Eq + Copy, D: Idx, DS: PointsToSet<D> + Clone + Debug, for<'a> &'a DS: IntoIterator<Item = D>,

source

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

source

pub fn clear(&mut self)

source

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

Adds element to the points-to set associated with var. Returns false if elem is already in this set

source

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

diff_pts(dst_var) = diff_pts(dst_var) U (diff_pts(src_var) - propa_pts(dst_var)).

source

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

diff_pts(dst_var) = diff_pts(dst_var) U (pts(src_var) - propa_pts(dst_var)).

source

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

Performs diff_pts(dst_var) = diff_pts(dst_var) U (src_ds - propa_pts(dst_var)).

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 get_diff_pts(&self, var: K) -> Option<&DS>

Get diff points to.

source

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

Returns a mutable reference to the diff points to set.

source

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

Get propagated points to.

source

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

Returns a mutable reference to the propa points to set.

source

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

Sets all diff elems to propa elems.

source

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

Fully clears the points-to set of var.

source

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

Clear propagated points-to set of var.

source

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

Clear propagated points-to set of var.

source

pub fn dump_pt_data(&self)

Dump stored keys and points-to sets.

Trait Implementations§

source§

impl<K, D, DS> Debug for DiffPTData<K, D, DS>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<K, D, DS> RefUnwindSafe for DiffPTData<K, D, DS>

§

impl<K, D, DS> Send for DiffPTData<K, D, DS>
where D: Send, DS: Send, K: Send,

§

impl<K, D, DS> Sync for DiffPTData<K, D, DS>
where D: Sync, DS: Sync, K: Sync,

§

impl<K, D, DS> Unpin for DiffPTData<K, D, DS>
where D: Unpin, DS: Unpin, K: Unpin,

§

impl<K, D, DS> UnwindSafe for DiffPTData<K, D, DS>
where D: UnwindSafe, DS: UnwindSafe, K: 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.