public class ConstantPropagationStore extends Object implements Store<ConstantPropagationStore>
Store.FlowRule, Store.Kind
Modifier | Constructor and Description |
---|---|
|
ConstantPropagationStore()
Creates a new ConstantPropagationStore.
|
protected |
ConstantPropagationStore(Map<Node,Constant> contents) |
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). |
ConstantPropagationStore |
copy()
Returns an exact copy of this store.
|
boolean |
equals(@Nullable Object o)
Returns true if this is equal to the given argument.
|
Constant |
getInformation(Node n) |
int |
hashCode() |
ConstantPropagationStore |
leastUpperBound(ConstantPropagationStore other)
Compute the least upper bound of two stores.
|
void |
mergeInformation(Node n,
Constant val) |
void |
setInformation(Node n,
Constant val) |
String |
toString() |
String |
visualize(CFGVisualizer<?,ConstantPropagationStore,?> viz)
Delegate visualization responsibility to a visualizer.
|
ConstantPropagationStore |
widenedUpperBound(ConstantPropagationStore previous)
Compute an upper bound of two stores that is wider than the least upper bound of the two
stores.
|
public ConstantPropagationStore()
public ConstantPropagationStore copy()
Store
copy
in interface Store<ConstantPropagationStore>
public ConstantPropagationStore leastUpperBound(ConstantPropagationStore other)
Store
Important: This method must fulfill the following contract:
this
.
other
.
this
, even if the signature is
more permissive.
leastUpperBound
in interface Store<ConstantPropagationStore>
public ConstantPropagationStore widenedUpperBound(ConstantPropagationStore 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<ConstantPropagationStore>
previous
- must be the previous storepublic boolean equals(@Nullable Object o)
Store
equals
in interface Store<ConstantPropagationStore>
equals
in class Object
o
- the object to compare against thispublic 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<ConstantPropagationStore>
public String visualize(CFGVisualizer<?,ConstantPropagationStore,?> viz)
value
is null
because ConstantPropagationStore
doesn't support
visualization.
visualize
in interface Store<ConstantPropagationStore>
viz
- the visualizer to visualize this store