pub struct ConstraintAnalysis { /* private fields */ }
Expand description
This analysis computes the transitive closure of the constraint relation. (Note that the resulting relation will be symmetric, but not reflexive in general.)
Implementations§
Source§impl ConstraintAnalysis
impl ConstraintAnalysis
Sourcepub fn get_definition(&self, var: &VariableName) -> Option<VariableUse>
pub fn get_definition(&self, var: &VariableName) -> Option<VariableUse>
Get the variable use corresponding to the definition of the variable.
pub fn definitions(&self) -> impl Iterator<Item = &VariableUse>
Sourcepub fn get_declaration(&self, var: &VariableName) -> Option<VariableUse>
pub fn get_declaration(&self, var: &VariableName) -> Option<VariableUse>
Get the variable use corresponding to the declaration of the variable.
pub fn declarations(&self) -> impl Iterator<Item = &VariableUse>
Sourcepub fn single_step_constraint(
&self,
source: &VariableName,
) -> HashSet<VariableName>
pub fn single_step_constraint( &self, source: &VariableName, ) -> HashSet<VariableName>
Returns variables constrained in a single step by source
.
Sourcepub fn multi_step_constraint(
&self,
source: &VariableName,
) -> HashSet<VariableName>
pub fn multi_step_constraint( &self, source: &VariableName, ) -> HashSet<VariableName>
Returns variables constrained in one or more steps by source
.
Sourcepub fn constrains_any(
&self,
source: &VariableName,
sinks: &HashSet<VariableName>,
) -> bool
pub fn constrains_any( &self, source: &VariableName, sinks: &HashSet<VariableName>, ) -> bool
Returns true if the source constrains any of the sinks.
Sourcepub fn constrained_variables(&self) -> HashSet<VariableName>
pub fn constrained_variables(&self) -> HashSet<VariableName>
Returns the set of variables occurring in a constraint together with at least one other variable.
Trait Implementations§
Source§impl Clone for ConstraintAnalysis
impl Clone for ConstraintAnalysis
Source§fn clone(&self) -> ConstraintAnalysis
fn clone(&self) -> ConstraintAnalysis
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 Default for ConstraintAnalysis
impl Default for ConstraintAnalysis
Source§fn default() -> ConstraintAnalysis
fn default() -> ConstraintAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ConstraintAnalysis
impl RefUnwindSafe for ConstraintAnalysis
impl Send for ConstraintAnalysis
impl Sync for ConstraintAnalysis
impl Unpin for ConstraintAnalysis
impl UnwindSafe for ConstraintAnalysis
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