public class LiveVarStore extends Object implements Store<LiveVarStore>
Store.FlowRule, Store.Kind| Constructor and Description |
|---|
LiveVarStore()
Create a new LiveVarStore.
|
LiveVarStore(Set<LiveVarValue> liveVarValueSet)
Create a new LiveVarStore.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUseInExpression(Node expression)
Add the information of live variables in an expression to the live variable set.
|
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). |
LiveVarStore |
copy()
Returns an exact copy of this store.
|
boolean |
equals(@Nullable Object obj) |
int |
hashCode() |
void |
killLiveVar(LiveVarValue variable)
Remove the information of a live variable from the live variable set.
|
LiveVarStore |
leastUpperBound(LiveVarStore other)
Compute the least upper bound of two stores.
|
void |
putLiveVar(LiveVarValue variable)
Add the information of a live variable into the live variable set.
|
String |
toString() |
String |
visualize(CFGVisualizer<?,LiveVarStore,?> viz)
Delegate visualization responsibility to a visualizer.
|
LiveVarStore |
widenedUpperBound(LiveVarStore previous)
It should not be called since it is not used by the backward analysis.
|
public LiveVarStore()
public LiveVarStore(Set<LiveVarValue> liveVarValueSet)
liveVarValueSet - a set of live variable abstract valuespublic void putLiveVar(LiveVarValue variable)
variable - a live variablepublic void killLiveVar(LiveVarValue variable)
variable - a live variablepublic void addUseInExpression(Node expression)
expression - a nodepublic LiveVarStore copy()
Storecopy in interface Store<LiveVarStore>public LiveVarStore leastUpperBound(LiveVarStore other)
StoreImportant: This method must fulfill the following contract:
this.
other.
this, even if the signature is
more permissive.
leastUpperBound in interface Store<LiveVarStore>public LiveVarStore widenedUpperBound(LiveVarStore previous)
widenedUpperBound in interface Store<LiveVarStore>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<LiveVarStore>public String visualize(CFGVisualizer<?,LiveVarStore,?> viz)
Storevisualize in interface Store<LiveVarStore>viz - the visualizer to visualize this store