Class ResourceLeakTransfer
java.lang.Object
org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
org.checkerframework.framework.flow.CFAbstractTransfer<CFValue,CFStore,CFTransfer>
org.checkerframework.framework.flow.CFTransfer
org.checkerframework.common.accumulation.AccumulationTransfer
org.checkerframework.checker.calledmethods.CalledMethodsTransfer
org.checkerframework.checker.resourceleak.ResourceLeakTransfer
- All Implemented Interfaces:
ForwardTransferFunction<CFValue,
,CFStore> TransferFunction<CFValue,
,CFStore> NodeVisitor<TransferResult<CFValue,
CFStore>, TransferInput<CFValue, CFStore>>
The transfer function for the resource-leak extension to the called-methods type system.
-
Field Summary
Fields inherited from class org.checkerframework.common.accumulation.AccumulationTransfer
atypeFactory
Fields inherited from class org.checkerframework.framework.flow.CFAbstractTransfer
analysis, sequentialSemantics
-
Constructor Summary
ConstructorDescriptionResourceLeakTransfer
(ResourceLeakAnalysis analysis) Create a new resource leak transfer function. -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateStoreWithTempVar
(TransferResult<CFValue, CFStore> result, Node node) This method either creates or looks up the temp var t for node, and then updates the store to give t the same type as node.visitMethodInvocation
(MethodInvocationNode node, TransferInput<CFValue, CFStore> input) visitObjectCreation
(ObjectCreationNode node, TransferInput<CFValue, CFStore> input) visitSwitchExpressionNode
(SwitchExpressionNode node, TransferInput<CFValue, CFStore> input) visitTernaryExpression
(TernaryExpressionNode node, TransferInput<CFValue, CFStore> input) Methods inherited from class org.checkerframework.checker.calledmethods.CalledMethodsTransfer
accumulate
Methods inherited from class org.checkerframework.framework.flow.CFAbstractTransfer
addInformationFromPreconditions, createTransferResult, finishValue, finishValue, getNarrowedValue, getValueFromFactory, getWidenedValue, initialStore, insertIntoStores, isNotFullyInitializedReceiver, moreSpecificValue, processCommonAssignment, processConditionalPostconditions, processPostconditions, recreateTransferResult, setFixedInitialStore, splitAssignments, strengthenAnnotationOfEqualTo, usesSequentialSemantics, visitArrayAccess, visitAssignment, visitCase, visitClassName, visitConditionalNot, visitEqualTo, visitFieldAccess, visitInstanceOf, visitLambdaResultExpression, visitLocalVariable, visitNarrowingConversion, visitNode, visitNotEqual, visitReturn, visitStringConcatenateAssignment, visitStringConversion, 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, visitSynchronized, 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, visitSynchronized, visitThrow, visitTypeCast, visitUnsignedRightShift
-
Constructor Details
-
ResourceLeakTransfer
Create a new resource leak transfer function.- Parameters:
analysis
- the analysis. Its type factory must be aResourceLeakAnnotatedTypeFactory
.
-
-
Method Details
-
visitTernaryExpression
public TransferResult<CFValue,CFStore> visitTernaryExpression(TernaryExpressionNode node, TransferInput<CFValue, CFStore> input) - Specified by:
visitTernaryExpression
in interfaceNodeVisitor<TransferResult<CFValue,
CFStore>, TransferInput<CFValue, CFStore>> - Overrides:
visitTernaryExpression
in classCFAbstractTransfer<CFValue,
CFStore, CFTransfer>
-
visitSwitchExpressionNode
public TransferResult<CFValue,CFStore> visitSwitchExpressionNode(SwitchExpressionNode node, TransferInput<CFValue, CFStore> input) - Specified by:
visitSwitchExpressionNode
in interfaceNodeVisitor<TransferResult<CFValue,
CFStore>, TransferInput<CFValue, CFStore>> - Overrides:
visitSwitchExpressionNode
in classCFAbstractTransfer<CFValue,
CFStore, CFTransfer>
-
visitMethodInvocation
public TransferResult<CFValue,CFStore> visitMethodInvocation(MethodInvocationNode node, TransferInput<CFValue, CFStore> input) - Specified by:
visitMethodInvocation
in interfaceNodeVisitor<TransferResult<CFValue,
CFStore>, TransferInput<CFValue, CFStore>> - Overrides:
visitMethodInvocation
in classCalledMethodsTransfer
-
visitObjectCreation
public TransferResult<CFValue,CFStore> visitObjectCreation(ObjectCreationNode node, TransferInput<CFValue, CFStore> input) - Specified by:
visitObjectCreation
in interfaceNodeVisitor<TransferResult<CFValue,
CFStore>, TransferInput<CFValue, CFStore>> - Overrides:
visitObjectCreation
in classCFAbstractTransfer<CFValue,
CFStore, CFTransfer>
-
updateStoreWithTempVar
This method either creates or looks up the temp var t for node, and then updates the store to give t the same type as node. Temporary variables are supported for expressions throughout this checker (and the Must Call Checker) to enable refinement of their types. See the documentation ofMustCallConsistencyAnalyzer
for more details.- Parameters:
node
- the node to be assigned to a temporary variableresult
- the transfer result containing the store to be modified
-