edu.cmu.cs.crystal.analysis.alias
Class SingleObjectAliasOps

java.lang.Object
  extended by edu.cmu.cs.crystal.analysis.alias.SingleObjectAliasOps
All Implemented Interfaces:
IAbstractLatticeOperations<AliasLE,ASTNode>, ILatticeOperations<AliasLE>

public class SingleObjectAliasOps
extends Object
implements ILatticeOperations<AliasLE>

Lattice operations for AliasLE.

Since:
Crystal 3.4.1
Author:
Kevin Bierhoff

Method Summary
 boolean atLeastAsPrecise(AliasLE info, AliasLE reference, ASTNode node)
          Compares analysis information for precision; more precisely, determines whether the first argument is at least as precise as the second.
 AliasLE bottom()
          Responsible for returning a lattice that represents no knowledge.
 AliasLE copy(AliasLE original)
          Creates a new deep copy of the given analysis information.
static SingleObjectAliasOps getAliasOps()
          Returns the singleton instance of this class.
 AliasLE join(AliasLE someInfo, AliasLE otherInfo, ASTNode node)
          Carries out a join on this lattice and another lattice.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAliasOps

public static SingleObjectAliasOps getAliasOps()
Returns the singleton instance of this class.

Returns:
the singleton instance of this class.

atLeastAsPrecise

public boolean atLeastAsPrecise(AliasLE info,
                                AliasLE reference,
                                ASTNode node)
Description copied from interface: IAbstractLatticeOperations
Compares analysis information for precision; more precisely, determines whether the first argument is at least as precise as the second. This method is used by the framework to compare analysis information.

Specified by:
atLeastAsPrecise in interface IAbstractLatticeOperations<AliasLE,ASTNode>
Specified by:
atLeastAsPrecise in interface ILatticeOperations<AliasLE>
Parameters:
info - Analysis information to be compared against reference
reference - the other LE to compare info with.
node - ASTNode where the two paths were originally forked apart (e.g., if, while, try, switch, etc.) or null if this comparison occurs on a "dummy" node.
Returns:
true if the first argument is at least as precise as the second; false otherwise, including if the two arguments are incomparable.

bottom

public AliasLE bottom()
Description copied from interface: IAbstractLatticeOperations
Responsible for returning a lattice that represents no knowledge.

Specified by:
bottom in interface IAbstractLatticeOperations<AliasLE,ASTNode>
Specified by:
bottom in interface ILatticeOperations<AliasLE>
Returns:
the lattice that represents "bottom"

copy

public AliasLE copy(AliasLE original)
Description copied from interface: IAbstractLatticeOperations
Creates a new deep copy of the given analysis information. "Deep copy" means that all mutable (changeable) objects referenced by the given LE must not be referenced by the returned LE.

Specified by:
copy in interface IAbstractLatticeOperations<AliasLE,ASTNode>
Specified by:
copy in interface ILatticeOperations<AliasLE>
Parameters:
original - analysis information to be copied.
Returns:
a copy of the argument that contains no references to mutable objects found in the original.

join

public AliasLE join(AliasLE someInfo,
                    AliasLE otherInfo,
                    ASTNode node)
Description copied from interface: IAbstractLatticeOperations
Carries out a join on this lattice and another lattice. This method is called by the framework to join different flows together. For example: The lattice that follows an If statement must represent the knowledge from the true and the false paths. The join is what combines the analysis of each path together. You may modify "this" and return it, or simply create a new LE and return it.

Specified by:
join in interface IAbstractLatticeOperations<AliasLE,ASTNode>
Specified by:
join in interface ILatticeOperations<AliasLE>
Parameters:
someInfo - LE to join with otherInfo.
otherInfo - The other LE to join with, do not modify.
node - ASTNode where the two paths were originally forked apart (e.g., if, while, try, switch, etc.) or null if this join occurs on a "dummy" node.
Returns:
the resulting LE that has the combined knowledge