tip.cfg.dfa
Class ConstantPropagationAnalysis.ConstLattice

java.lang.Object
  extended by tip.cfg.dfa.ConstantPropagationAnalysis.ConstLattice
All Implemented Interfaces:
Lattice<ConstantPropagationAnalysis.Const>, Equalitor<ConstantPropagationAnalysis.Const>
Enclosing class:
ConstantPropagationAnalysis

public static class ConstantPropagationAnalysis.ConstLattice
extends Object
implements Lattice<ConstantPropagationAnalysis.Const>


Constructor Summary
ConstantPropagationAnalysis.ConstLattice()
           
 
Method Summary
 boolean equals(ConstantPropagationAnalysis.Const a, ConstantPropagationAnalysis.Const b)
          Returns true if the elements a and b are equal according to this {link Equalitor}.
 ConstantPropagationAnalysis.Const getLeastUpperBound(ConstantPropagationAnalysis.Const a, ConstantPropagationAnalysis.Const b)
          Returns the least upper bound of the lattice elements a and b.
 ConstantPropagationAnalysis.Const getSmallestElement()
          Returns the smallest element of the lattice.
 int hashCode(ConstantPropagationAnalysis.Const a)
          Returns the hashcode for the element a according to this Equalitor.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantPropagationAnalysis.ConstLattice

public ConstantPropagationAnalysis.ConstLattice()
Method Detail

getSmallestElement

public ConstantPropagationAnalysis.Const getSmallestElement()
Description copied from interface: Lattice
Returns the smallest element of the lattice. Beware that if the lattice elements are mutable, getSmallestElement must return a cloned element.

Specified by:
getSmallestElement in interface Lattice<ConstantPropagationAnalysis.Const>
Returns:
the smallest element of the lattice

getLeastUpperBound

public ConstantPropagationAnalysis.Const getLeastUpperBound(ConstantPropagationAnalysis.Const a,
                                                            ConstantPropagationAnalysis.Const b)
Description copied from interface: Lattice
Returns the least upper bound of the lattice elements a and b. Beware that if the lattice elements are mutable, getLeastUpperBound must return a cloned or new element. The method must handle the case where a or b are null.

Specified by:
getLeastUpperBound in interface Lattice<ConstantPropagationAnalysis.Const>
Parameters:
a - the first element
b - the second element
Returns:
the least upper bound of the first and second element

equals

public boolean equals(ConstantPropagationAnalysis.Const a,
                      ConstantPropagationAnalysis.Const b)
Description copied from interface: Equalitor
Returns true if the elements a and b are equal according to this {link Equalitor}. If the elements are equal, then we must have hashCode(a) == hashCode(b). The method must handle the case where a or b is null. The equality relation must atleast be reflexive in the object reference, i.e. for all elements e we must have equals(e,e)==true.

Specified by:
equals in interface Equalitor<ConstantPropagationAnalysis.Const>
Parameters:
a - the first element
b - the second element
Returns:
true if a and b are equal

hashCode

public int hashCode(ConstantPropagationAnalysis.Const a)
Description copied from interface: Equalitor
Returns the hashcode for the element a according to this Equalitor. If Equalitor.equals(Object,Object) returns true, for two elements a and b, then for hashCode we must have hashCode(a) == hashCode(b). The method must handle the case where a is null.

Specified by:
hashCode in interface Equalitor<ConstantPropagationAnalysis.Const>
Parameters:
a - the element
Returns:
the hashcode of a.