dk.brics.string.intermediate.operations
Class AliasInfo

java.lang.Object
  extended by dk.brics.string.intermediate.operations.AliasInfo

public class AliasInfo
extends Object

Alias and corruption information for a specific program point.


Method Summary
 boolean definitelyAliases(Variable a, Variable b)
          Returns whether the two variables are the same, or are definitely aliases.
 Set<Variable> getAliasesForExclusive(Variable v, boolean onlyDefinite)
          Returns a set variables containing all possible aliases of the specified variable, optionally including only definite aliases.
 Set<Variable> getAliasesForInclusive(Variable v, boolean onlyDefinite)
          Returns a set variables containing all possible aliases of the specified variable, optionally including only definite aliases.
 AliasStatus getAliasStatus(UnorderedPair<Variable> pair)
          Returns the aliasing relation between two variables at this program point.
 AliasStatus getAliasStatus(Variable a, Variable b)
          Returns the aliasing relation between two variables at this program point.
 boolean isAnyCorrupt(Collection<? extends Variable> variables)
          Returns whether at least one of the specified variables are corrupt.
 boolean isCorrupt(Variable v)
          Returns whether or not the given variable is corrupt.
 boolean mightBeAliases(Variable a, Variable b)
          Returns whether the two variables are the same, or might be aliases.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

definitelyAliases

public boolean definitelyAliases(Variable a,
                                 Variable b)
Returns whether the two variables are the same, or are definitely aliases.


getAliasesForExclusive

public Set<Variable> getAliasesForExclusive(Variable v,
                                            boolean onlyDefinite)
Returns a set variables containing all possible aliases of the specified variable, optionally including only definite aliases. The variable itself is never included in the set.

Parameters:
v - the variable to get aliases for
onlyDefinite - if true, only definite aliases of v are included (except v itself).
Returns:
a newly created set, that is modifiable and independant of the AliasInfo object.

getAliasesForInclusive

public Set<Variable> getAliasesForInclusive(Variable v,
                                            boolean onlyDefinite)
Returns a set variables containing all possible aliases of the specified variable, optionally including only definite aliases. The variable itself is always included in the set.

Parameters:
v - the variable to get aliases for
onlyDefinite - if true, only definite aliases of v are included (this also includes v itself).
Returns:
a newly created set, that is modifiable and independant of the AliasInfo object.

getAliasStatus

public AliasStatus getAliasStatus(UnorderedPair<Variable> pair)
Returns the aliasing relation between two variables at this program point. The variables must be live, or the result is undefined.

Parameters:
pair - a pair of live variables
Returns:
an AliasStatus, never null.

getAliasStatus

public AliasStatus getAliasStatus(Variable a,
                                  Variable b)
Returns the aliasing relation between two variables at this program point. The variables must be live, or the result is undefined.

Parameters:
a - a live variable
b - a live variable
Returns:
an AliasStatus, never null.

isAnyCorrupt

public boolean isAnyCorrupt(Collection<? extends Variable> variables)
Returns whether at least one of the specified variables are corrupt.


isCorrupt

public boolean isCorrupt(Variable v)
Returns whether or not the given variable is corrupt.


mightBeAliases

public boolean mightBeAliases(Variable a,
                              Variable b)
Returns whether the two variables are the same, or might be aliases. Different from using getAliasesForInclusive(Variable, boolean), because this returns true if the two variables are the same.


toString

public String toString()
Overrides:
toString in class Object


Copyright © 2003-2009 Anders Møller, Aske Simon Christensen, Asger Feldthaus.