Class ValueTransfer
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.value.ValueTransfer
- All Implemented Interfaces:
- ForwardTransferFunction<CFValue,,- CFStore> - TransferFunction<CFValue,,- CFStore> - NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
The transfer class for the Value Checker.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final ValueAnnotatedTypeFactoryThe Value type factory.protected final QualifierHierarchyThe Value qualifier hierarchy.Fields inherited from class org.checkerframework.framework.flow.CFAbstractTransferanalysis, sequentialSemantics
- 
Constructor SummaryConstructorsConstructorDescriptionValueTransfer(CFAbstractAnalysis<CFValue, CFStore, CFTransfer> analysis) Create a new ValueTransfer.
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidprocessConditionalPostconditions(MethodInvocationNode n, ExecutableElement methodElement, ExpressionTree tree, CFStore thenStore, CFStore elseStore) Add information from the conditional postconditions of a method to the stores after an invocation.protected TransferResult<CFValue,CFStore> strengthenAnnotationOfEqualTo(TransferResult<CFValue, CFStore> transferResult, Node firstNode, Node secondNode, CFValue firstValue, CFValue secondValue, boolean notEqualTo) Refine the annotation ofsecondNodeif the annotationsecondValueis less precise thanfirstValue.stringConcatenation(Node leftOperand, Node rightOperand, TransferInput<CFValue, CFStore> p, TransferResult<CFValue, CFStore> result) Reverse the role of the 'thenStore' and 'elseStore'.visitFieldAccess(FieldAccessNode node, TransferInput<CFValue, CFStore> in) Methods inherited from class org.checkerframework.framework.flow.CFAbstractTransferaddInformationFromPreconditions, createTransferResult, finishValue, finishValue, getNarrowedValue, getValueFromFactory, getWidenedValue, initialStore, insertIntoStores, isNotFullyInitializedReceiver, moreSpecificValue, processCommonAssignment, processPostconditions, recreateTransferResult, setFixedInitialStore, splitAssignments, usesSequentialSemantics, visitArrayAccess, visitAssignment, visitCase, visitClassName, visitExpressionStatement, visitInstanceOf, visitLambdaResultExpression, visitLocalVariable, visitNarrowingConversion, visitNode, visitObjectCreation, visitReturn, visitStringConversion, visitSwitchExpressionNode, visitTernaryExpression, visitThis, visitVariableDeclaration, visitWideningConversionMethods inherited from class org.checkerframework.dataflow.cfg.node.AbstractNodeVisitorvisitArrayCreation, visitArrayType, visitAssertionError, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitDoubleLiteral, visitExplicitThis, visitFloatLiteral, visitImplicitThis, visitIntegerLiteral, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitStringLiteral, visitSuper, visitSynchronized, visitThrow, visitTypeCast, visitValueLiteralMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.checkerframework.dataflow.cfg.node.NodeVisitorvisitArrayCreation, visitArrayType, visitAssertionError, visitBooleanLiteral, visitCharacterLiteral, visitClassDeclaration, visitDoubleLiteral, visitExplicitThis, visitFloatLiteral, visitImplicitThis, visitIntegerLiteral, visitLongLiteral, visitMarker, visitMemberReference, visitMethodAccess, visitNullChk, visitNullLiteral, visitPackageName, visitParameterizedType, visitPrimitiveType, visitShortLiteral, visitStringLiteral, visitSuper, visitSynchronized, visitThrow, visitTypeCast
- 
Field Details- 
atypeFactoryThe Value type factory.
- 
qualHierarchyThe Value qualifier hierarchy.
 
- 
- 
Constructor Details- 
ValueTransferCreate a new ValueTransfer.- Parameters:
- analysis- the corresponding analysis
 
 
- 
- 
Method Details- 
visitFieldAccesspublic TransferResult<CFValue,CFStore> visitFieldAccess(FieldAccessNode node, TransferInput<CFValue, CFStore> in) - Specified by:
- visitFieldAccessin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitFieldAccessin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
 
- 
visitMethodInvocationpublic TransferResult<CFValue,CFStore> visitMethodInvocation(MethodInvocationNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitMethodInvocationin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitMethodInvocationin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
 
- 
visitStringConcatenatepublic TransferResult<CFValue,CFStore> visitStringConcatenate(StringConcatenateNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitStringConcatenatein interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitStringConcatenatein class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
stringConcatenationpublic TransferResult<CFValue,CFStore> stringConcatenation(Node leftOperand, Node rightOperand, TransferInput<CFValue, CFStore> p, TransferResult<CFValue, CFStore> result) 
- 
visitNumericalAdditionpublic TransferResult<CFValue,CFStore> visitNumericalAddition(NumericalAdditionNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNumericalAdditionin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNumericalAdditionin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitNumericalSubtractionpublic TransferResult<CFValue,CFStore> visitNumericalSubtraction(NumericalSubtractionNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNumericalSubtractionin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNumericalSubtractionin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitNumericalMultiplicationpublic TransferResult<CFValue,CFStore> visitNumericalMultiplication(NumericalMultiplicationNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNumericalMultiplicationin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNumericalMultiplicationin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitIntegerDivisionpublic TransferResult<CFValue,CFStore> visitIntegerDivision(IntegerDivisionNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitIntegerDivisionin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitIntegerDivisionin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitFloatingDivisionpublic TransferResult<CFValue,CFStore> visitFloatingDivision(FloatingDivisionNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitFloatingDivisionin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitFloatingDivisionin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitIntegerRemainderpublic TransferResult<CFValue,CFStore> visitIntegerRemainder(IntegerRemainderNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitIntegerRemainderin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitIntegerRemainderin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitFloatingRemainderpublic TransferResult<CFValue,CFStore> visitFloatingRemainder(FloatingRemainderNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitFloatingRemainderin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitFloatingRemainderin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitLeftShiftpublic TransferResult<CFValue,CFStore> visitLeftShift(LeftShiftNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitLeftShiftin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitLeftShiftin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitSignedRightShiftpublic TransferResult<CFValue,CFStore> visitSignedRightShift(SignedRightShiftNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitSignedRightShiftin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitSignedRightShiftin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitUnsignedRightShiftpublic TransferResult<CFValue,CFStore> visitUnsignedRightShift(UnsignedRightShiftNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitUnsignedRightShiftin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitUnsignedRightShiftin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitBitwiseAndpublic TransferResult<CFValue,CFStore> visitBitwiseAnd(BitwiseAndNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitBitwiseAndin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitBitwiseAndin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitBitwiseOrpublic TransferResult<CFValue,CFStore> visitBitwiseOr(BitwiseOrNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitBitwiseOrin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitBitwiseOrin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitBitwiseXorpublic TransferResult<CFValue,CFStore> visitBitwiseXor(BitwiseXorNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitBitwiseXorin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitBitwiseXorin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitNumericalMinuspublic TransferResult<CFValue,CFStore> visitNumericalMinus(NumericalMinusNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNumericalMinusin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNumericalMinusin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitNumericalPluspublic TransferResult<CFValue,CFStore> visitNumericalPlus(NumericalPlusNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNumericalPlusin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNumericalPlusin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitBitwiseComplementpublic TransferResult<CFValue,CFStore> visitBitwiseComplement(BitwiseComplementNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitBitwiseComplementin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitBitwiseComplementin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitLessThanpublic TransferResult<CFValue,CFStore> visitLessThan(LessThanNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitLessThanin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitLessThanin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitLessThanOrEqualpublic TransferResult<CFValue,CFStore> visitLessThanOrEqual(LessThanOrEqualNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitLessThanOrEqualin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitLessThanOrEqualin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitGreaterThanpublic TransferResult<CFValue,CFStore> visitGreaterThan(GreaterThanNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitGreaterThanin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitGreaterThanin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitGreaterThanOrEqualpublic TransferResult<CFValue,CFStore> visitGreaterThanOrEqual(GreaterThanOrEqualNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitGreaterThanOrEqualin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitGreaterThanOrEqualin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
strengthenAnnotationOfEqualToprotected TransferResult<CFValue,CFStore> strengthenAnnotationOfEqualTo(TransferResult<CFValue, CFStore> transferResult, Node firstNode, Node secondNode, CFValue firstValue, CFValue secondValue, boolean notEqualTo) Description copied from class:CFAbstractTransferRefine the annotation ofsecondNodeif the annotationsecondValueis less precise thanfirstValue. This is possible, ifsecondNodeis an expression that is tracked by the store (e.g., a local variable or a field). Clients usually call this twice withfirstNodeandsecondNodereversed, to refine each of them.Note that when overriding this method, when a new type is inserted into the store, CFAbstractTransfer.splitAssignments(org.checkerframework.dataflow.cfg.node.Node)should be called, and the new type should be inserted into the store for each of the resulting nodes.- Overrides:
- strengthenAnnotationOfEqualToin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
- Parameters:
- transferResult- the previous result
- firstNode- the node that might be more precise
- secondNode- the node whose type to possibly refine
- firstValue- the abstract value that might be more precise
- secondValue- the abstract value that might be less precise
- notEqualTo- if true, indicates that the logic is flipped (i.e., the information is added to the- elseStoreinstead of the- thenStore) for a not-equal comparison.
- Returns:
- the conditional transfer result (if information has been added), or res
 
- 
processConditionalPostconditionsprotected void processConditionalPostconditions(MethodInvocationNode n, ExecutableElement methodElement, ExpressionTree tree, CFStore thenStore, CFStore elseStore) Description copied from class:CFAbstractTransferAdd information from the conditional postconditions of a method to the stores after an invocation.- Overrides:
- processConditionalPostconditionsin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
- Parameters:
- n- a method call
- methodElement- the method being called
- tree- the tree for the method call
- thenStore- the "then" store; is side-effected by this method
- elseStore- the "else" store; is side-effected by this method
 
- 
visitEqualTopublic TransferResult<CFValue,CFStore> visitEqualTo(EqualToNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitEqualToin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitEqualToin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
 
- 
visitNotEqualpublic TransferResult<CFValue,CFStore> visitNotEqual(NotEqualNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitNotEqualin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitNotEqualin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
 
- 
visitConditionalNotpublic TransferResult<CFValue,CFStore> visitConditionalNot(ConditionalNotNode n, TransferInput<CFValue, CFStore> p) Description copied from class:CFAbstractTransferReverse the role of the 'thenStore' and 'elseStore'.- Specified by:
- visitConditionalNotin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitConditionalNotin class- CFAbstractTransfer<CFValue,- CFStore, - CFTransfer> 
 
- 
visitConditionalAndpublic TransferResult<CFValue,CFStore> visitConditionalAnd(ConditionalAndNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitConditionalAndin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitConditionalAndin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
- 
visitConditionalOrpublic TransferResult<CFValue,CFStore> visitConditionalOr(ConditionalOrNode n, TransferInput<CFValue, CFStore> p) - Specified by:
- visitConditionalOrin interface- NodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
- Overrides:
- visitConditionalOrin class- AbstractNodeVisitor<TransferResult<CFValue,- CFStore>, - TransferInput<CFValue, - CFStore>> 
 
 
-