Class LockStore
java.lang.Object
org.checkerframework.framework.flow.CFAbstractStore<CFValue,LockStore>
 
org.checkerframework.checker.lock.LockStore
The Lock Store behaves like CFAbstractStore but requires the ability to insert exact annotations.
 This is because we want to be able to insert @LockPossiblyHeld to replace @LockHeld, which
 normally is not possible in CFAbstractStore since @LockHeld is more specific.
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.checkerframework.dataflow.analysis.StoreStore.FlowRule, Store.Kind
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected booleanIf true, indicates that the store refers to a point in the code inside a constructor or initializer.Fields inherited from class org.checkerframework.framework.flow.CFAbstractStoreanalysis, arrayValues, classValues, fieldValues, localVariableValues, methodValues, sequentialSemantics, thisValue
- 
Constructor SummaryConstructorsConstructorDescriptionLockStore(LockAnalysis analysis, boolean sequentialSemantics) LockStore(LockAnalysis analysis, CFAbstractStore<CFValue, LockStore> other) Copy constructor.
- 
Method SummaryModifier and TypeMethodDescriptiongetValue(JavaExpression expr) Returns the current abstract value of a Java expression, ornullif no information is available.voidvoidinsertValue(JavaExpression je, @Nullable CFValue value, boolean permitNondeterministic) protected StringAdds a representation of the internal information of this Store to visualizerviz.leastUpperBound(LockStore other) Compute the least upper bound of two stores.voidvoidupdateForMethodCall(MethodInvocationNode n, AnnotatedTypeFactory atypeFactory, CFValue val) Remove any information that might not be valid any more after a method call, and add information guaranteed by the method.Methods inherited from class org.checkerframework.framework.flow.CFAbstractStorecanAlias, canInsertJavaExpression, clearValue, computeNewValueAndInsert, copy, equals, getFieldValue, getFieldValues, getUid, getValue, getValue, getValue, getValue, getValue, hashCode, initializeMethodParameter, initializeThisValue, insertOrRefine, insertOrRefine, insertOrRefinePermitNondeterministic, insertThisValue, insertValue, insertValue, insertValuePermitNondeterministic, insertValuePermitNondeterministic, isMonotonicUpdate, isSideEffectFree, removeConflicting, removeConflicting, removeConflicting, replaceValue, shouldInsert, supersetOf, toString, updateForArrayAssignment, updateForAssignment, updateForFieldAccessAssignment, updateForLocalVariableAssignment, visualize, widenedUpperBoundMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueIdgetClassAndUid
- 
Field Details- 
inConstructorOrInitializerprotected boolean inConstructorOrInitializerIf true, indicates that the store refers to a point in the code inside a constructor or initializer. This is useful because constructors and initializers are special with regard to the set of locks that is considered to be held. For example, 'this' is considered to be held inside a constructor.
 
- 
- 
Constructor Details- 
LockStore
- 
LockStoreCopy constructor.
 
- 
- 
Method Details- 
leastUpperBoundDescription 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 interface- Store<LockStore>
- Overrides:
- leastUpperBoundin class- CFAbstractStore<CFValue,- LockStore> 
 
- Does not change 
- 
insertLockPossiblyHeld
- 
setInConstructorOrInitializerpublic void setInConstructorOrInitializer()
- 
getValueDescription copied from class:CFAbstractStoreReturns the current abstract value of a Java expression, ornullif no information is available.- Overrides:
- getValuein class- CFAbstractStore<CFValue,- LockStore> 
- Returns:
- the current abstract value of a Java expression, or nullif no information is available
 
- 
internalVisualizeDescription copied from class:CFAbstractStoreAdds a representation of the internal information of this Store to visualizerviz.- Overrides:
- internalVisualizein class- CFAbstractStore<CFValue,- LockStore> 
- Parameters:
- viz- the visualizer
- Returns:
- a representation of the internal information of this Store
 
- 
updateForMethodCallpublic void updateForMethodCall(MethodInvocationNode n, AnnotatedTypeFactory atypeFactory, CFValue val) Description copied from class:CFAbstractStoreRemove any information that might not be valid any more after a method call, and add information guaranteed by the method.- If the method is side-effect-free (as indicated by SideEffectFreeorPure), then no information needs to be removed.
- Otherwise, all information about field accesses a.fneeds to be removed, except if the methodncannot modifya.f(e.g., ifais a local variable orthis, andfis final).
- Furthermore, if the field has a monotonic annotation, then its information can also be kept.
 valin the store.- Overrides:
- updateForMethodCallin class- CFAbstractStore<CFValue,- LockStore> 
- Parameters:
- n- method whose information is being updated
- atypeFactory- AnnotatedTypeFactory of the associated checker
- val- abstract value of the method call
 
- If the method is side-effect-free (as indicated by 
- 
insertValueDescription copied from class:CFAbstractStoreHelper method forCFAbstractStore.insertValue(JavaExpression, CFAbstractValue)andCFAbstractStore.insertValuePermitNondeterministic(org.checkerframework.dataflow.expression.JavaExpression, javax.lang.model.element.AnnotationMirror).Every overriding implementation should start with if (!shouldInsert) { return; }- Overrides:
- insertValuein class- CFAbstractStore<CFValue,- LockStore> 
- Parameters:
- je- the expression to insert in the store
- value- the value of the expression
- permitNondeterministic- if false, does nothing if- expris nondeterministic; if true, permits nondeterministic expressions to be placed in the store
 
 
-