public class BusyExprStore extends Object implements Store<BusyExprStore>
Store.FlowRule, Store.Kind
Constructor and Description |
---|
BusyExprStore()
Create a new BusyExprStore.
|
BusyExprStore(Set<BusyExprValue> busyExprValueSet)
Create a new BusyExprStore.
|
Modifier and Type | Method and Description |
---|---|
void |
addUseInExpression(Node e)
Add expressions to the store, add sub-expressions to the store recursively
|
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). |
BusyExprStore |
copy()
Returns an exact copy of this store.
|
boolean |
equals(@Nullable Object obj) |
boolean |
exprContainsVariable(Node expr,
Node var)
Return true if the expression contains variable var.
|
int |
hashCode() |
void |
killBusyExpr(Node var)
Kill expressions if they contain variable var.
|
BusyExprStore |
leastUpperBound(BusyExprStore other)
Compute the least upper bound of two stores.
|
void |
putBusyExpr(BusyExprValue e)
Add busy expression e to busy expression value set.
|
String |
toString() |
String |
visualize(CFGVisualizer<?,BusyExprStore,?> viz)
Delegate visualization responsibility to a visualizer.
|
BusyExprStore |
widenedUpperBound(BusyExprStore previous)
Compute an upper bound of two stores that is wider than the least upper bound of the two
stores.
|
public BusyExprStore(Set<BusyExprValue> busyExprValueSet)
busyExprValueSet
- a set of busy expression abstract values. The parameter is captured
and the caller should not retain an alias.public BusyExprStore()
public void killBusyExpr(Node var)
var
- a variablepublic boolean exprContainsVariable(Node expr, Node var)
.equals
is used in the
return statement to verify value equality, as the statement decides whether the two nodes
have the same value, not represent the same CFG node.expr
- the expression checkedvar
- the variablepublic void putBusyExpr(BusyExprValue e)
e
- the busy expression to be addedpublic void addUseInExpression(Node e)
e
- the expression to be addedpublic BusyExprStore copy()
Store
copy
in interface Store<BusyExprStore>
public BusyExprStore leastUpperBound(BusyExprStore other)
Store
Important: This method must fulfill the following contract:
this
.
other
.
this
, even if the signature is
more permissive.
leastUpperBound
in interface Store<BusyExprStore>
public BusyExprStore widenedUpperBound(BusyExprStore previous)
Store
Analysis
. 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<BusyExprStore>
previous
- must be the previous storepublic boolean canAlias(JavaExpression a, JavaExpression b)
Store
a
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<BusyExprStore>
public String visualize(CFGVisualizer<?,BusyExprStore,?> viz)
Store
visualize
in interface Store<BusyExprStore>
viz
- the visualizer to visualize this store