pub struct ConstraintAnalysis { /* private fields */ }Expand description
This analysis computes the transitive closure of the constraint relation. (Note that the resulting relation will not be reflexive in general.)
Implementations
sourceimpl 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
sourceimpl Clone for ConstraintAnalysis
impl Clone for ConstraintAnalysis
sourcefn clone(&self) -> ConstraintAnalysis
fn clone(&self) -> ConstraintAnalysis
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Default for ConstraintAnalysis
impl Default for ConstraintAnalysis
sourcefn default() -> ConstraintAnalysis
fn default() -> ConstraintAnalysis
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for ConstraintAnalysis
impl Send for ConstraintAnalysis
impl Sync for ConstraintAnalysis
impl Unpin for ConstraintAnalysis
impl UnwindSafe for ConstraintAnalysis
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more