public class ReachingDefinitionStore extends Object implements Store<ReachingDefinitionStore>
Store.FlowRule, Store.Kind| Constructor and Description |
|---|
ReachingDefinitionStore()
Create a new ReachDefinitionStore.
|
ReachingDefinitionStore(LinkedHashSet<ReachingDefinitionNode> reachingDefSet)
Create a new ReachDefinitionStore.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canAlias(JavaExpression a,
JavaExpression b)
Can the objects
a and b be aliases? Returns a conservative answer (i.e.,
returns true if not enough information is available to determine aliasing). |
ReachingDefinitionStore |
copy()
Returns an exact copy of this store.
|
boolean |
equals(@Nullable Object obj) |
int |
hashCode() |
void |
killDef(Node defTarget)
Remove the information of a reaching definition from the reaching definition set.
|
ReachingDefinitionStore |
leastUpperBound(ReachingDefinitionStore other)
Compute the least upper bound of two stores.
|
void |
putDef(ReachingDefinitionNode def)
Add a reaching definition to the reaching definition set.
|
String |
toString() |
String |
visualize(CFGVisualizer<?,ReachingDefinitionStore,?> viz)
Delegate visualization responsibility to a visualizer.
|
ReachingDefinitionStore |
widenedUpperBound(ReachingDefinitionStore previous)
Compute an upper bound of two stores that is wider than the least upper bound of the two
stores.
|
public ReachingDefinitionStore()
public ReachingDefinitionStore(LinkedHashSet<ReachingDefinitionNode> reachingDefSet)
reachingDefSet - a set of reaching definition nodes. The parameter is captured and the
caller should not retain an alias.public void killDef(Node defTarget)
defTarget - target of a reaching definitionpublic void putDef(ReachingDefinitionNode def)
def - a reaching definitionpublic ReachingDefinitionStore copy()
Storecopy in interface Store<ReachingDefinitionStore>public ReachingDefinitionStore leastUpperBound(ReachingDefinitionStore other)
StoreImportant: This method must fulfill the following contract:
this.
other.
this, even if the signature is
more permissive.
leastUpperBound in interface Store<ReachingDefinitionStore>public ReachingDefinitionStore widenedUpperBound(ReachingDefinitionStore previous)
StoreAnalysis. previous must be the previous store.
A particular analysis might not require widening and should implement this method by calling leastUpperBound.
Important: This method must fulfill the following contract:
this.
previous.
this, even if the signature is
more permissive.
widenedUpperBound in interface Store<ReachingDefinitionStore>previous - must be the previous storepublic boolean canAlias(JavaExpression a, JavaExpression b)
Storea and b be aliases? Returns a conservative answer (i.e.,
returns true if not enough information is available to determine aliasing).canAlias in interface Store<ReachingDefinitionStore>public String visualize(CFGVisualizer<?,ReachingDefinitionStore,?> viz)
Storevisualize in interface Store<ReachingDefinitionStore>viz - the visualizer to visualize this store