Class LockTransfer
- java.lang.Object
-
- org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
-
- org.checkerframework.framework.flow.CFAbstractTransfer<CFValue,LockStore,LockTransfer>
-
- org.checkerframework.checker.lock.LockTransfer
-
- All Implemented Interfaces:
ForwardTransferFunction<CFValue,LockStore>,TransferFunction<CFValue,LockStore>,NodeVisitor<TransferResult<CFValue,LockStore>,TransferInput<CFValue,LockStore>>
public class LockTransfer extends CFAbstractTransfer<CFValue,LockStore,LockTransfer>
LockTransfer handles constructors, initializers, synchronized methods, and synchronized blocks.
-
-
Field Summary
-
Fields inherited from class org.checkerframework.framework.flow.CFAbstractTransfer
analysis, sequentialSemantics
-
-
Constructor Summary
Constructors Constructor Description LockTransfer(LockAnalysis analysis, LockChecker checker)Create a transfer function for the Lock Checker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LockStoreinitialStore(UnderlyingAST underlyingAST, java.util.List<LocalVariableNode> parameters)The initial store maps method formal parameters to their currently most refined type.protected voidmakeLockHeld(LockStore store, Node node)Sets a givenNodeto @LockHeld in the givenstore.protected voidmakeLockHeld(TransferResult<CFValue,LockStore> result, Node node)protected voidmakeLockPossiblyHeld(LockStore store, Node node)Sets a givenNodeto @LockPossiblyHeld in the givenstore.protected voidmakeLockPossiblyHeld(TransferResult<CFValue,LockStore> result, Node node)TransferResult<CFValue,LockStore>visitSynchronized(SynchronizedNode n, TransferInput<CFValue,LockStore> p)-
Methods inherited from class org.checkerframework.framework.flow.CFAbstractTransfer
addInformationFromPreconditions, createTransferResult, finishValue, finishValue, getNarrowedValue, getValueFromFactory, getWidenedValue, insertIntoStores, isNotFullyInitializedReceiver, moreSpecificValue, processCommonAssignment, processConditionalPostconditions, processPostconditions, recreateTransferResult, setFixedInitialStore, splitAssignments, strengthenAnnotationOfEqualTo, usesSequentialSemantics, visitArrayAccess, visitAssignment, visitCase, visitClassName, visitConditionalNot, visitDeconstructorPattern, visitEqualTo, visitExpressionStatement, visitFieldAccess, visitInstanceOf, visitLambdaResultExpression, visitLocalVariable, visitMethodInvocation, visitNarrowingConversion, visitNode, visitNotEqual, visitObjectCreation, visitReturn, visitStringConversion, visitSwitchExpressionNode, visitTernaryExpression, visitThis, visitVariableDeclaration, visitWideningConversion
-
Methods inherited from class org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor
visitArrayCreation, visitArrayType, visitAssertionError, visitBitwiseAnd, visitBitwiseComplement, visitBitwiseOr, visitBitwiseXor, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitConditionalAnd, visitConditionalOr, visitDoubleLiteral, visitExplicitThis, visitFloatingDivision, visitFloatingRemainder, visitFloatLiteral, visitGreaterThan, visitGreaterThanOrEqual, visitImplicitThis, visitIntegerDivision, visitIntegerLiteral, visitIntegerRemainder, visitLeftShift, visitLessThan, visitLessThanOrEqual, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitNumericalAddition, visitNumericalMinus, visitNumericalMultiplication, visitNumericalPlus, visitNumericalSubtraction, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitSignedRightShift, visitStringConcatenate, visitStringLiteral, visitSuper, visitThrow, visitTypeCast, visitUnsignedRightShift, visitValueLiteral
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.checkerframework.dataflow.cfg.node.NodeVisitor
visitArrayCreation, visitArrayType, visitAssertionError, visitBitwiseAnd, visitBitwiseComplement, visitBitwiseOr, visitBitwiseXor, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitConditionalAnd, visitConditionalOr, visitDoubleLiteral, visitExplicitThis, visitFloatingDivision, visitFloatingRemainder, visitFloatLiteral, visitGreaterThan, visitGreaterThanOrEqual, visitImplicitThis, visitIntegerDivision, visitIntegerLiteral, visitIntegerRemainder, visitLeftShift, visitLessThan, visitLessThanOrEqual, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitNumericalAddition, visitNumericalMinus, visitNumericalMultiplication, visitNumericalPlus, visitNumericalSubtraction, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitSignedRightShift, visitStringConcatenate, visitStringLiteral, visitSuper, visitThrow, visitTypeCast, visitUnsignedRightShift
-
-
-
-
Constructor Detail
-
LockTransfer
public LockTransfer(LockAnalysis analysis, LockChecker checker)
Create a transfer function for the Lock Checker.- Parameters:
analysis- the analysis this transfer function belongs tochecker- the type-checker this transfer function belongs to
-
-
Method Detail
-
makeLockHeld
protected void makeLockHeld(LockStore store, Node node)
Sets a givenNodeto @LockHeld in the givenstore.- Parameters:
store- the store to updatenode- the node that should be @LockHeld
-
makeLockPossiblyHeld
protected void makeLockPossiblyHeld(LockStore store, Node node)
Sets a givenNodeto @LockPossiblyHeld in the givenstore.- Parameters:
store- the store to updatenode- the node that should be @LockPossiblyHeld
-
makeLockHeld
protected void makeLockHeld(TransferResult<CFValue,LockStore> result, Node node)
-
makeLockPossiblyHeld
protected void makeLockPossiblyHeld(TransferResult<CFValue,LockStore> result, Node node)
-
initialStore
public LockStore initialStore(UnderlyingAST underlyingAST, java.util.List<LocalVariableNode> parameters)
Description copied from class:CFAbstractTransferThe initial store maps method formal parameters to their currently most refined type.- Specified by:
initialStorein interfaceForwardTransferFunction<CFValue,LockStore>- Overrides:
initialStorein classCFAbstractTransfer<CFValue,LockStore,LockTransfer>- Parameters:
underlyingAST- an abstract syntax treeparameters- a list of local variable nodes representing formal parameters (if any)- Returns:
- the initial store
-
visitSynchronized
public TransferResult<CFValue,LockStore> visitSynchronized(SynchronizedNode n, TransferInput<CFValue,LockStore> p)
- Specified by:
visitSynchronizedin interfaceNodeVisitor<TransferResult<CFValue,LockStore>,TransferInput<CFValue,LockStore>>- Overrides:
visitSynchronizedin classAbstractNodeVisitor<TransferResult<CFValue,LockStore>,TransferInput<CFValue,LockStore>>
-
-