Class ResourceLeakTransfer
java.lang.Object
org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
org.checkerframework.framework.flow.CFAbstractTransfer<AccumulationValue,AccumulationStore,AccumulationTransfer>
org.checkerframework.common.accumulation.AccumulationTransfer
org.checkerframework.checker.calledmethods.CalledMethodsTransfer
org.checkerframework.checker.resourceleak.ResourceLeakTransfer
- All Implemented Interfaces:
ForwardTransferFunction<AccumulationValue,
,AccumulationStore> TransferFunction<AccumulationValue,
,AccumulationStore> NodeVisitor<TransferResult<AccumulationValue,
AccumulationStore>, TransferInput<AccumulationValue, AccumulationStore>>
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<AccumulationValue, AccumulationStore> 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<AccumulationValue, AccumulationStore> input) visitObjectCreation
(ObjectCreationNode node, TransferInput<AccumulationValue, AccumulationStore> input) visitSwitchExpressionNode
(SwitchExpressionNode node, TransferInput<AccumulationValue, AccumulationStore> input) visitTernaryExpression
(TernaryExpressionNode node, TransferInput<AccumulationValue, AccumulationStore> input) Methods inherited from class org.checkerframework.checker.calledmethods.CalledMethodsTransfer
accumulate, isWpiEnabledForRLC, shouldPerformWholeProgramInference, shouldPerformWholeProgramInference
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, visitDeconstructorPattern, visitEqualTo, visitExpressionStatement, visitFieldAccess, visitInstanceOf, visitLambdaResultExpression, visitLocalVariable, visitNarrowingConversion, visitNode, visitNotEqual, visitReturn, 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<AccumulationValue,AccumulationStore> visitTernaryExpression(TernaryExpressionNode node, TransferInput<AccumulationValue, AccumulationStore> input) - Specified by:
visitTernaryExpression
in interfaceNodeVisitor<TransferResult<AccumulationValue,
AccumulationStore>, TransferInput<AccumulationValue, AccumulationStore>> - Overrides:
visitTernaryExpression
in classCFAbstractTransfer<AccumulationValue,
AccumulationStore, AccumulationTransfer>
-
visitSwitchExpressionNode
public TransferResult<AccumulationValue,AccumulationStore> visitSwitchExpressionNode(SwitchExpressionNode node, TransferInput<AccumulationValue, AccumulationStore> input) - Specified by:
visitSwitchExpressionNode
in interfaceNodeVisitor<TransferResult<AccumulationValue,
AccumulationStore>, TransferInput<AccumulationValue, AccumulationStore>> - Overrides:
visitSwitchExpressionNode
in classCFAbstractTransfer<AccumulationValue,
AccumulationStore, AccumulationTransfer>
-
visitMethodInvocation
public TransferResult<AccumulationValue,AccumulationStore> visitMethodInvocation(MethodInvocationNode node, TransferInput<AccumulationValue, AccumulationStore> input) - Specified by:
visitMethodInvocation
in interfaceNodeVisitor<TransferResult<AccumulationValue,
AccumulationStore>, TransferInput<AccumulationValue, AccumulationStore>> - Overrides:
visitMethodInvocation
in classCalledMethodsTransfer
-
visitObjectCreation
public TransferResult<AccumulationValue,AccumulationStore> visitObjectCreation(ObjectCreationNode node, TransferInput<AccumulationValue, AccumulationStore> input) - Specified by:
visitObjectCreation
in interfaceNodeVisitor<TransferResult<AccumulationValue,
AccumulationStore>, TransferInput<AccumulationValue, AccumulationStore>> - Overrides:
visitObjectCreation
in classCFAbstractTransfer<AccumulationValue,
AccumulationStore, AccumulationTransfer>
-
updateStoreWithTempVar
public void updateStoreWithTempVar(TransferResult<AccumulationValue, AccumulationStore> 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. 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
-