Class ConstantPropagationStore
java.lang.Object
org.checkerframework.dataflow.constantpropagation.ConstantPropagationStore
- All Implemented Interfaces:
Store<ConstantPropagationStore>
A store that records information about constant values.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.analysis.Store
Store.FlowRule, Store.Kind -
Constructor Summary
ConstructorsModifierConstructorDescriptionCreates a new ConstantPropagationStore.protectedConstantPropagationStore(Map<Node, Constant> contents) -
Method Summary
Modifier and TypeMethodDescriptionbooleanCan the objectsaandbbe aliases? Returns a conservative answer (i.e., returnstrueif not enough information is available to determine aliasing).copy()Returns an exact copy of this store.booleanReturns true if this is equal to the given argument.inthashCode()Compute the least upper bound of two stores.voidmergeInformation(Node n, Constant val) voidsetInformation(Node n, Constant val) toString()visualize(CFGVisualizer<?, ConstantPropagationStore, ?> viz) Delegate visualization responsibility to a visualizer.widenedUpperBound(ConstantPropagationStore previous) Compute an upper bound of two stores that is wider than the least upper bound of the two stores.
-
Constructor Details
-
ConstantPropagationStore
public ConstantPropagationStore()Creates a new ConstantPropagationStore. -
ConstantPropagationStore
-
-
Method Details
-
getInformation
-
mergeInformation
-
setInformation
-
copy
Description copied from interface:StoreReturns an exact copy of this store.- Specified by:
copyin interfaceStore<ConstantPropagationStore>- Returns:
- an exact copy of this store
-
leastUpperBound
Description copied from interface:StoreCompute the least upper bound of two stores.Important: This method must fulfill the following contract:
- Does not change
this. - Does not change
other. - Returns a fresh object which is not aliased yet.
- Returns an object of the same (dynamic) type as
this, even if the signature is more permissive. - Is commutative.
- Specified by:
leastUpperBoundin interfaceStore<ConstantPropagationStore>
- Does not change
-
widenedUpperBound
Description copied from interface:StoreCompute an upper bound of two stores that is wider than the least upper bound of the two stores. Used to jump to a higher abstraction to allow faster termination of the fixed point computations inAnalysis.previousmust 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:
- Does not change
this. - Does not change
previous. - Returns a fresh object which is not aliased yet.
- Returns an object of the same (dynamic) type as
this, even if the signature is more permissive. - Is commutative.
- Specified by:
widenedUpperBoundin interfaceStore<ConstantPropagationStore>- Parameters:
previous- must be the previous store
- Does not change
-
equals
Description copied from interface:StoreReturns true if this is equal to the given argument.- Specified by:
equalsin interfaceStore<ConstantPropagationStore>- Overrides:
equalsin classObject- Parameters:
o- the object to compare against this- Returns:
- true if this is equal to the given argument
-
hashCode
public int hashCode() -
toString
-
canAlias
Description copied from interface:StoreCan the objectsaandbbe aliases? Returns a conservative answer (i.e., returnstrueif not enough information is available to determine aliasing).- Specified by:
canAliasin interfaceStore<ConstantPropagationStore>
-
visualize
Description copied from interface:StoreDelegate visualization responsibility to a visualizer.- Specified by:
visualizein interfaceStore<ConstantPropagationStore>- Parameters:
viz- the visualizer to visualize this store- Returns:
- the String representation of this store
-