|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cmu.cs.crystal.simple.TupleLatticeElement<K,LE>
K
- The type of things that individual lattice elements are tracked for.LE
- The element type of the underlying lattice.public class TupleLatticeElement<K,LE>
Represents a lattice element that is a tuple of lattice elements for an underlying lattice.
Conceptually, this is a map from keys to individual lattice elements for each key.
Keys can be parameterized, but common keys are ASTNode
s and 3-address code Variable
s.
The representation is optimized: a default element is the assumed value for every key
that has not been explicitly set.
To use the TupleLatticeElement, create a TupleLatticeOperations.
This lattice is mutable; the put(Object, Object)
operation can be used to
change its value.
Constructor Summary | |
---|---|
TupleLatticeElement(LE b,
LE d)
Deprecated. |
Method Summary | |
---|---|
LE |
get(K n)
Retrieves the lattice information for a given key. |
Set<K> |
getKeySet()
Returns the set of keys for which lattice information was previously stored. |
LE |
put(K n,
LE l)
Sets an element in the tuple. |
LE |
remove(K n)
Removes an element from the tuple. |
String |
toString()
Prints the lattice element as a map. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
@Deprecated public TupleLatticeElement(LE b, LE d)
b
- The bottom value for the underlying latticed
- The default lattice value for the underlying latticeTupleLatticeOperations#getDefault()}
Method Detail |
---|
public LE get(K n)
n
- The key for which lattice information is requested.
public LE put(K n, LE l)
n
- The Variable for which we are setting the valuel
- The value to set
public LE remove(K n)
n
- Element to be removed
null
if element wasn't in the tuple.public String toString()
toString
in class Object
public Set<K> getKeySet()
null
but may be empty.Map.keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |