Class NullnessStore
java.lang.Object
org.checkerframework.framework.flow.CFAbstractStore<V,S>
org.checkerframework.checker.initialization.InitializationStore<NullnessValue,NullnessStore>
org.checkerframework.checker.nullness.NullnessStore
- All Implemented Interfaces:
Store<NullnessStore>
,org.plumelib.util.UniqueId
Behaves like
InitializationStore
, but additionally tracks whether PolyNull
is
known to be NonNull
or Nullable
(or not known to be either).-
Nested Class Summary
Nested classes/interfaces inherited from interface org.checkerframework.dataflow.analysis.Store
Store.FlowRule, Store.Kind
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
Fields inherited from class org.checkerframework.checker.initialization.InitializationStore
initializedFields, invariantFields
Fields inherited from class org.checkerframework.framework.flow.CFAbstractStore
analysis, arrayValues, classValues, fieldValues, localVariableValues, methodValues, sequentialSemantics, thisValue
-
Constructor Summary
ConstructorDescriptionCreate a NullnessStore (copy constructor).NullnessStore
(CFAbstractAnalysis<NullnessValue, NullnessStore, ?> analysis, boolean sequentialSemantics) Create a NullnessStore. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Adds a representation of the internal information of this Store to visualizerviz
.boolean
boolean
leastUpperBound
(NullnessStore other) Compute the least upper bound of two stores.void
setPolyNullNonNull
(boolean isPolyNullNonNull) void
setPolyNullNull
(boolean isPolyNullNull) protected boolean
Returns true iff thisCFAbstractStore
contains a superset of the map entries of the argumentCFAbstractStore
.Methods inherited from class org.checkerframework.checker.initialization.InitializationStore
addInitializedField, addInitializedField, getAnalysis, insertValue, isFieldInitialized, updateForMethodCall
Methods inherited from class org.checkerframework.framework.flow.CFAbstractStore
canAlias, canInsertJavaExpression, clearValue, computeNewValueAndInsert, copy, equals, getFieldValue, getFieldValues, getUid, getValue, getValue, getValue, getValue, getValue, getValue, hashCode, initializeMethodParameter, initializeThisValue, insertOrRefine, insertOrRefine, insertOrRefinePermitNondeterministic, insertThisValue, insertValue, insertValue, insertValuePermitNondeterministic, insertValuePermitNondeterministic, isMonotonicUpdate, isSideEffectFree, newFieldValueAfterMethodCall, newMonotonicFieldValueAfterMethodCall, removeConflicting, removeConflicting, removeConflicting, replaceValue, shouldInsert, toString, updateForArrayAssignment, updateForAssignment, updateForFieldAccessAssignment, updateForLocalVariableAssignment, visualize, widenedUpperBound
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.plumelib.util.UniqueId
getClassAndUid
-
Field Details
-
isPolyNullNonNull
protected boolean isPolyNullNonNull -
isPolyNullNull
protected boolean isPolyNullNull
-
-
Constructor Details
-
NullnessStore
public NullnessStore(CFAbstractAnalysis<NullnessValue, NullnessStore, ?> analysis, boolean sequentialSemantics) Create a NullnessStore.- Parameters:
analysis
- the analysis class this store belongs tosequentialSemantics
- should the analysis use sequential Java semantics (i.e., assume that only one thread is running at all times)?
-
NullnessStore
Create a NullnessStore (copy constructor).- Parameters:
s
- a store to copy
-
-
Method Details
-
leastUpperBound
Description copied from interface:Store
Compute 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:
leastUpperBound
in interfaceStore<NullnessStore>
- Overrides:
leastUpperBound
in classInitializationStore<NullnessValue,
NullnessStore>
- Does not change
-
supersetOf
Description copied from class:CFAbstractStore
Returns true iff thisCFAbstractStore
contains a superset of the map entries of the argumentCFAbstractStore
. Note that we test the entry keys and values by Java equality, not by any subtype relationship. This method is used primarily to simplify the equals predicate.- Overrides:
supersetOf
in classInitializationStore<NullnessValue,
NullnessStore>
-
internalVisualize
Description copied from class:CFAbstractStore
Adds a representation of the internal information of this Store to visualizerviz
.- Overrides:
internalVisualize
in classInitializationStore<NullnessValue,
NullnessStore> - Parameters:
viz
- the visualizer- Returns:
- a representation of the internal information of this
Store
-
isPolyNullNonNull
public boolean isPolyNullNonNull() -
setPolyNullNonNull
public void setPolyNullNonNull(boolean isPolyNullNonNull) -
isPolyNullNull
public boolean isPolyNullNull() -
setPolyNullNull
public void setPolyNullNull(boolean isPolyNullNull)
-