Class CFAbstractTransfer<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>,T extends CFAbstractTransfer<V,S,T>>
- java.lang.Object
 - 
- org.checkerframework.dataflow.cfg.node.AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
 - 
- org.checkerframework.framework.flow.CFAbstractTransfer<V,S,T>
 
 
 
- 
- All Implemented Interfaces:
 ForwardTransferFunction<V,S>,TransferFunction<V,S>,NodeVisitor<TransferResult<V,S>,TransferInput<V,S>>
- Direct Known Subclasses:
 AccumulationTransfer,CFTransfer,InitializationTransfer,KeyForTransfer,LockTransfer,NullnessNoInitTransfer
public abstract class CFAbstractTransfer<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>,T extends CFAbstractTransfer<V,S,T>> extends AbstractNodeVisitor<TransferResult<V,S>,TransferInput<V,S>> implements ForwardTransferFunction<V,S>
The default analysis transfer function for the Checker Framework propagates information through assignments and uses theAnnotatedTypeFactoryto provide checker-specific logic how to combine types (e.g., what is the type of a string concatenation, given the types of the two operands) and as an abstraction function (e.g., determine the annotations on literals).Design note: CFAbstractTransfer and its subclasses are supposed to act as transfer functions. But, since the AnnotatedTypeFactory already existed and performed checker-independent type propagation, CFAbstractTransfer delegates work to it instead of duplicating some logic in CFAbstractTransfer. The checker-specific subclasses of CFAbstractTransfer do implement transfer function logic themselves.
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected CFAbstractAnalysis<V,S,T>analysisThe analysis used by this transfer function.protected booleansequentialSemanticsShould the analysis use sequential Java semantics (i.e., assume that only one thread is running at all times)? 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedCFAbstractTransfer(CFAbstractAnalysis<V,S,T> analysis)Create a CFAbstractTransfer.protectedCFAbstractTransfer(CFAbstractAnalysis<V,S,T> analysis, boolean forceConcurrentSemantics)Constructor that allows forcing concurrent semantics to be on for this instance of CFAbstractTransfer. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddInformationFromPreconditions(S initialStore, AnnotatedTypeFactory factory, UnderlyingAST.CFGMethod methodAst, com.sun.source.tree.MethodTree methodDeclTree, javax.lang.model.element.ExecutableElement methodElement)Add the information from all the preconditions of a method to the initial store in the method body.protected TransferResult<V,S>createTransferResult(@Nullable V value, TransferInput<V,S> in)Creates a TransferResult.protected @Nullable VfinishValue(@Nullable V value, S store)A hook for subclasses to modify the result of the transfer function.protected @Nullable VfinishValue(@Nullable V value, S thenStore, S elseStore)A hook for subclasses to modify the result of the transfer function.protected @PolyNull VgetNarrowedValue(javax.lang.model.type.TypeMirror type, @PolyNull V annotatedValue)Returns an abstract value with the giventypeand the annotations fromannotatedValue, adapted for narrowing.protected VgetValueFromFactory(com.sun.source.tree.Tree tree, Node node)Returns the abstract value of a non-leaf treetree, as computed by theAnnotatedTypeFactory.protected @PolyNull VgetWidenedValue(javax.lang.model.type.TypeMirror type, @PolyNull V annotatedValue)Returns an abstract value with the giventypeand the annotations fromannotatedValue, adapted for widening.SinitialStore(UnderlyingAST underlyingAST, java.util.List<LocalVariableNode> parameters)The initial store maps method formal parameters to their currently most refined type.protected static voidinsertIntoStores(TransferResult<CFValue,CFStore> result, JavaExpression target, javax.lang.model.element.AnnotationMirror newAnno)Inserts newAnno as the value into all stores (conditional or not) in the result for node.protected booleanisNotFullyInitializedReceiver(com.sun.source.tree.MethodTree methodDeclTree)Returns true if the receiver of a method or constructor might not be fully initialized according toanalysis.atypeFactory.isNotFullyInitializedReceiver(methodDeclTree).VmoreSpecificValue(V value1, V value2)Returns the abstract value of(value1, value2)that is more specific.protected voidprocessCommonAssignment(TransferInput<V,S> in, Node lhs, Node rhs, S store, V rhsValue)Determine abstract value of right-hand side and update the store accordingly.protected voidprocessConditionalPostconditions(MethodInvocationNode invocationNode, javax.lang.model.element.ExecutableElement methodElement, com.sun.source.tree.ExpressionTree invocationTree, S thenStore, S elseStore)Add information from the conditional postconditions of a method to the stores after an invocation.protected voidprocessPostconditions(Node invocationNode, S store, javax.lang.model.element.ExecutableElement executableElement, com.sun.source.tree.ExpressionTree invocationTree)Add information from the postconditions of a method to the store after an invocation.protected TransferResult<V,S>recreateTransferResult(@Nullable V value, TransferResult<V,S> in)Creates a TransferResult just like the given one, but with the given value.voidsetFixedInitialStore(@Nullable S s)Set a fixed initial Store.protected java.util.List<Node>splitAssignments(Node node)Takes a node, and either returns the node itself again (as a singleton list), or if the node is an assignment node, returns the lhs and rhs (where splitAssignments is applied recursively to the rhs -- that is, it is possible that the rhs does not appear in the result, but rather its lhs and rhs do).protected TransferResult<V,S>strengthenAnnotationOfEqualTo(TransferResult<V,S> res, Node firstNode, Node secondNode, V firstValue, V secondValue, boolean notEqualTo)Refine the annotation ofsecondNodeif the annotationsecondValueis less precise thanfirstValue.booleanusesSequentialSemantics()Returns true if the transfer function uses sequential semantics, false if it uses concurrent semantics.TransferResult<V,S>visitArrayAccess(ArrayAccessNode n, TransferInput<V,S> p)TransferResult<V,S>visitAssignment(AssignmentNode n, TransferInput<V,S> in)TransferResult<V,S>visitCase(CaseNode n, TransferInput<V,S> in)A case produces no value, but it may imply some facts about switch selector expression.TransferResult<V,S>visitClassName(ClassNameNode n, TransferInput<V,S> in)TransferResult<V,S>visitConditionalNot(ConditionalNotNode n, TransferInput<V,S> p)Reverse the role of the 'thenStore' and 'elseStore'.TransferResult<V,S>visitDeconstructorPattern(DeconstructorPatternNode n, TransferInput<V,S> in)Visits a deconstructor pattern node.TransferResult<V,S>visitEqualTo(EqualToNode n, TransferInput<V,S> p)TransferResult<V,S>visitExpressionStatement(ExpressionStatementNode n, TransferInput<V,S> vsTransferInput)Visits an expression that is used as a statement.TransferResult<V,S>visitFieldAccess(FieldAccessNode n, TransferInput<V,S> p)TransferResult<V,S>visitInstanceOf(InstanceOfNode node, TransferInput<V,S> in)TransferResult<V,S>visitLambdaResultExpression(LambdaResultExpressionNode n, TransferInput<V,S> in)TransferResult<V,S>visitLocalVariable(LocalVariableNode n, TransferInput<V,S> in)Use the most specific type information available according to the store.TransferResult<V,S>visitMethodInvocation(MethodInvocationNode n, TransferInput<V,S> in)TransferResult<V,S>visitNarrowingConversion(NarrowingConversionNode n, TransferInput<V,S> p)TransferResult<V,S>visitNode(Node n, TransferInput<V,S> in)The default visitor returns the input information unchanged, or in the case of conditional input information, merged.TransferResult<V,S>visitNotEqual(NotEqualNode n, TransferInput<V,S> p)TransferResult<V,S>visitObjectCreation(ObjectCreationNode n, TransferInput<V,S> p)TransferResult<V,S>visitReturn(ReturnNode n, TransferInput<V,S> p)TransferResult<V,S>visitStringConversion(StringConversionNode n, TransferInput<V,S> p)TransferResult<V,S>visitSwitchExpressionNode(SwitchExpressionNode n, TransferInput<V,S> vsTransferInput)TransferResult<V,S>visitTernaryExpression(TernaryExpressionNode n, TransferInput<V,S> p)TransferResult<V,S>visitThis(ThisNode n, TransferInput<V,S> in)TransferResult<V,S>visitVariableDeclaration(VariableDeclarationNode n, TransferInput<V,S> p)TransferResult<V,S>visitWideningConversion(WideningConversionNode n, TransferInput<V,S> p)- 
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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
analysis
protected final CFAbstractAnalysis<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>,T extends CFAbstractTransfer<V,S,T>> analysis
The analysis used by this transfer function. 
- 
sequentialSemantics
protected final boolean sequentialSemantics
Should the analysis use sequential Java semantics (i.e., assume that only one thread is running at all times)? 
 - 
 
- 
Constructor Detail
- 
CFAbstractTransfer
protected CFAbstractTransfer(CFAbstractAnalysis<V,S,T> analysis)
Create a CFAbstractTransfer.- Parameters:
 analysis- the analysis used by this transfer function
 
- 
CFAbstractTransfer
protected CFAbstractTransfer(CFAbstractAnalysis<V,S,T> analysis, boolean forceConcurrentSemantics)
Constructor that allows forcing concurrent semantics to be on for this instance of CFAbstractTransfer.- Parameters:
 analysis- the analysis used by this transfer functionforceConcurrentSemantics- whether concurrent semantics should be forced to be on. If false, concurrent semantics are turned off by default, but the user can still turn them on via-AconcurrentSemantics. If true, the user cannot turn off concurrent semantics.
 
 - 
 
- 
Method Detail
- 
usesSequentialSemantics
@Pure public boolean usesSequentialSemantics()
Returns true if the transfer function uses sequential semantics, false if it uses concurrent semantics. Useful when creating an empty store, since a store makes different decisions depending on whether sequential or concurrent semantics are used.- Returns:
 - true if the transfer function uses sequential semantics, false if it uses concurrent semantics
 
 
- 
finishValue
@SideEffectFree protected @Nullable V finishValue(@Nullable V value, S store)
A hook for subclasses to modify the result of the transfer function. This method is called before returning the abstract valuevalueas the result of the transfer function.If a subclass overrides this method, the subclass should also override
finishValue(CFAbstractValue,CFAbstractStore,CFAbstractStore).- Parameters:
 value- a value to possibly modifystore- the store- Returns:
 - the possibly-modified value
 
 
- 
finishValue
@SideEffectFree protected @Nullable V finishValue(@Nullable V value, S thenStore, S elseStore)
A hook for subclasses to modify the result of the transfer function. This method is called before returning the abstract valuevalueas the result of the transfer function.If a subclass overrides this method, the subclass should also override
finishValue(CFAbstractValue,CFAbstractStore).- Parameters:
 value- the value to finishthenStore- the "then" storeelseStore- the "else" store- Returns:
 - the possibly-modified value
 
 
- 
getValueFromFactory
protected V getValueFromFactory(com.sun.source.tree.Tree tree, Node node)
Returns the abstract value of a non-leaf treetree, as computed by theAnnotatedTypeFactory.- Returns:
 - the abstract value of a non-leaf tree 
tree, as computed by theAnnotatedTypeFactory 
 
- 
setFixedInitialStore
public void setFixedInitialStore(@Nullable S s)
Set a fixed initial Store.- Parameters:
 s- initial store; possible null
 
- 
initialStore
public S initialStore(UnderlyingAST underlyingAST, java.util.List<LocalVariableNode> parameters)
The initial store maps method formal parameters to their currently most refined type.- Specified by:
 initialStorein interfaceForwardTransferFunction<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Parameters:
 underlyingAST- an abstract syntax treeparameters- a list of local variable nodes representing formal parameters (if any)- Returns:
 - the initial store
 
 
- 
isNotFullyInitializedReceiver
@Pure protected final boolean isNotFullyInitializedReceiver(com.sun.source.tree.MethodTree methodDeclTree)
Returns true if the receiver of a method or constructor might not be fully initialized according toanalysis.atypeFactory.isNotFullyInitializedReceiver(methodDeclTree).- Parameters:
 methodDeclTree- the declaration of the method or constructor- Returns:
 - true if the receiver of a method or constructor might not be fully initialized
 - See Also:
 GenericAnnotatedTypeFactory.isNotFullyInitializedReceiver(MethodTree)
 
- 
addInformationFromPreconditions
protected void addInformationFromPreconditions(S initialStore, AnnotatedTypeFactory factory, UnderlyingAST.CFGMethod methodAst, com.sun.source.tree.MethodTree methodDeclTree, javax.lang.model.element.ExecutableElement methodElement)
Add the information from all the preconditions of a method to the initial store in the method body.- Parameters:
 initialStore- the initial store for the method bodyfactory- the type factorymethodAst- the AST for a method declarationmethodDeclTree- the declaration of the method; is a field ofmethodAstmethodElement- the element for the method
 
- 
visitNode
public TransferResult<V,S> visitNode(Node n, TransferInput<V,S> in)
The default visitor returns the input information unchanged, or in the case of conditional input information, merged.- Specified by:
 visitNodein classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
createTransferResult
@SideEffectFree protected TransferResult<V,S> createTransferResult(@Nullable V value, TransferInput<V,S> in)
Creates a TransferResult.This default implementation returns the input information unchanged, or in the case of conditional input information, merged.
- Parameters:
 value- the value; possibly nullin- the transfer input- Returns:
 - the input information, as a TransferResult
 
 
- 
recreateTransferResult
@SideEffectFree protected TransferResult<V,S> recreateTransferResult(@Nullable V value, TransferResult<V,S> in)
Creates a TransferResult just like the given one, but with the given value.This default implementation returns the input information unchanged, or in the case of conditional input information, merged.
- Parameters:
 value- the value; possibly nullin- the TransferResult to copy- Returns:
 - the input information
 
 
- 
visitClassName
public TransferResult<V,S> visitClassName(ClassNameNode n, TransferInput<V,S> in)
- Specified by:
 visitClassNamein interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitClassNamein classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitFieldAccess
public TransferResult<V,S> visitFieldAccess(FieldAccessNode n, TransferInput<V,S> p)
- Specified by:
 visitFieldAccessin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitFieldAccessin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitArrayAccess
public TransferResult<V,S> visitArrayAccess(ArrayAccessNode n, TransferInput<V,S> p)
- Specified by:
 visitArrayAccessin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitArrayAccessin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitLocalVariable
public TransferResult<V,S> visitLocalVariable(LocalVariableNode n, TransferInput<V,S> in)
Use the most specific type information available according to the store.- Specified by:
 visitLocalVariablein interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitLocalVariablein classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitThis
public TransferResult<V,S> visitThis(ThisNode n, TransferInput<V,S> in)
- Overrides:
 visitThisin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitTernaryExpression
public TransferResult<V,S> visitTernaryExpression(TernaryExpressionNode n, TransferInput<V,S> p)
- Specified by:
 visitTernaryExpressionin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitTernaryExpressionin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitSwitchExpressionNode
public TransferResult<V,S> visitSwitchExpressionNode(SwitchExpressionNode n, TransferInput<V,S> vsTransferInput)
- Specified by:
 visitSwitchExpressionNodein interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitSwitchExpressionNodein classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitConditionalNot
public TransferResult<V,S> visitConditionalNot(ConditionalNotNode n, TransferInput<V,S> p)
Reverse the role of the 'thenStore' and 'elseStore'.- Specified by:
 visitConditionalNotin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitConditionalNotin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitEqualTo
public TransferResult<V,S> visitEqualTo(EqualToNode n, TransferInput<V,S> p)
- Specified by:
 visitEqualToin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitEqualToin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitNotEqual
public TransferResult<V,S> visitNotEqual(NotEqualNode n, TransferInput<V,S> p)
- Specified by:
 visitNotEqualin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitNotEqualin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
strengthenAnnotationOfEqualTo
protected TransferResult<V,S> strengthenAnnotationOfEqualTo(TransferResult<V,S> res, Node firstNode, Node secondNode, V firstValue, V secondValue, boolean notEqualTo)
Refine 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,
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.- Parameters:
 firstNode- the node that might be more precisesecondNode- the node whose type to possibly refinefirstValue- the abstract value that might be more precisesecondValue- the abstract value that might be less preciseres- the previous resultnotEqualTo- if true, indicates that the logic is flipped (i.e., the information is added to theelseStoreinstead of thethenStore) for a not-equal comparison.- Returns:
 - the conditional transfer result (if information has been added), or 
res 
 
- 
splitAssignments
@SideEffectFree protected java.util.List<Node> splitAssignments(Node node)
Takes a node, and either returns the node itself again (as a singleton list), or if the node is an assignment node, returns the lhs and rhs (where splitAssignments is applied recursively to the rhs -- that is, it is possible that the rhs does not appear in the result, but rather its lhs and rhs do).- Parameters:
 node- possibly an assignment node- Returns:
 - a list containing all the right- and left-hand sides in the given assignment node; it contains just the node itself if it is not an assignment)
 
 
- 
visitAssignment
public TransferResult<V,S> visitAssignment(AssignmentNode n, TransferInput<V,S> in)
- Specified by:
 visitAssignmentin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitAssignmentin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitReturn
public TransferResult<V,S> visitReturn(ReturnNode n, TransferInput<V,S> p)
- Specified by:
 visitReturnin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitReturnin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitLambdaResultExpression
public TransferResult<V,S> visitLambdaResultExpression(LambdaResultExpressionNode n, TransferInput<V,S> in)
- Specified by:
 visitLambdaResultExpressionin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitLambdaResultExpressionin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
processCommonAssignment
protected void processCommonAssignment(TransferInput<V,S> in, Node lhs, Node rhs, S store, V rhsValue)
Determine abstract value of right-hand side and update the store accordingly.- Parameters:
 in- the store(s) before the assignmentlhs- the left-hand side of the assignmentrhs- the right-hand side of the assignmentstore- the regular input store (fromin)rhsValue- the value of the right-hand side of the assignment
 
- 
visitObjectCreation
public TransferResult<V,S> visitObjectCreation(ObjectCreationNode n, TransferInput<V,S> p)
- Specified by:
 visitObjectCreationin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitObjectCreationin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitMethodInvocation
public TransferResult<V,S> visitMethodInvocation(MethodInvocationNode n, TransferInput<V,S> in)
- Specified by:
 visitMethodInvocationin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitMethodInvocationin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitDeconstructorPattern
public TransferResult<V,S> visitDeconstructorPattern(DeconstructorPatternNode n, TransferInput<V,S> in)
Description copied from interface:NodeVisitorVisits a deconstructor pattern node.- Specified by:
 visitDeconstructorPatternin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitDeconstructorPatternin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>- Parameters:
 n- theDeconstructorPatternNodeto be visitedin- the argument for the operation implemented by this visitor- Returns:
 - the return value of the operation implemented by this visitor
 
 
- 
visitInstanceOf
public TransferResult<V,S> visitInstanceOf(InstanceOfNode node, TransferInput<V,S> in)
- Specified by:
 visitInstanceOfin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitInstanceOfin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
processPostconditions
protected void processPostconditions(Node invocationNode, S store, javax.lang.model.element.ExecutableElement executableElement, com.sun.source.tree.ExpressionTree invocationTree)
Add information from the postconditions of a method to the store after an invocation.- Parameters:
 invocationNode- a method call or an object creationstore- a store; is side-effected by this methodexecutableElement- the method or constructor being calledinvocationTree- the tree for the method call or for the object creation
 
- 
processConditionalPostconditions
protected void processConditionalPostconditions(MethodInvocationNode invocationNode, javax.lang.model.element.ExecutableElement methodElement, com.sun.source.tree.ExpressionTree invocationTree, S thenStore, S elseStore)
Add information from the conditional postconditions of a method to the stores after an invocation.- Parameters:
 invocationNode- a method callmethodElement- the method being calledinvocationTree- the tree for the method callthenStore- the "then" store; is side-effected by this methodelseStore- the "else" store; is side-effected by this method
 
- 
visitCase
public TransferResult<V,S> visitCase(CaseNode n, TransferInput<V,S> in)
A case produces no value, but it may imply some facts about switch selector expression.- Specified by:
 visitCasein interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitCasein classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
moreSpecificValue
@Pure public V moreSpecificValue(V value1, V value2)
Returns the abstract value of(value1, value2)that is more specific. If the two are incomparable, thenvalue1is returned.- Parameters:
 value1- an abstract valuevalue2- another abstract value- Returns:
 - the more specific value of the two parameters, or, if they are incomparable, 
value1 
 
- 
visitVariableDeclaration
public TransferResult<V,S> visitVariableDeclaration(VariableDeclarationNode n, TransferInput<V,S> p)
- Specified by:
 visitVariableDeclarationin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitVariableDeclarationin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitWideningConversion
public TransferResult<V,S> visitWideningConversion(WideningConversionNode n, TransferInput<V,S> p)
- Specified by:
 visitWideningConversionin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitWideningConversionin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
getNarrowedValue
@SideEffectFree protected @PolyNull V getNarrowedValue(javax.lang.model.type.TypeMirror type, @PolyNull V annotatedValue)
Returns an abstract value with the giventypeand the annotations fromannotatedValue, adapted for narrowing. This is only called at a narrowing conversion.- Parameters:
 type- the type to narrow toannotatedValue- the type to narrow from- Returns:
 - an abstract value with the given 
typeand the annotations fromannotatedValue; returns null ifannotatedValueis null 
 
- 
getWidenedValue
@SideEffectFree protected @PolyNull V getWidenedValue(javax.lang.model.type.TypeMirror type, @PolyNull V annotatedValue)
Returns an abstract value with the giventypeand the annotations fromannotatedValue, adapted for widening. This is only called at a widening conversion.- Parameters:
 type- the type to widen toannotatedValue- the type to widen from- Returns:
 - an abstract value with the given 
typeand the annotations fromannotatedValue; returns null ifannotatedValueis null 
 
- 
visitNarrowingConversion
public TransferResult<V,S> visitNarrowingConversion(NarrowingConversionNode n, TransferInput<V,S> p)
- Specified by:
 visitNarrowingConversionin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitNarrowingConversionin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitStringConversion
public TransferResult<V,S> visitStringConversion(StringConversionNode n, TransferInput<V,S> p)
- Specified by:
 visitStringConversionin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitStringConversionin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>
 
- 
visitExpressionStatement
public TransferResult<V,S> visitExpressionStatement(ExpressionStatementNode n, TransferInput<V,S> vsTransferInput)
Description copied from interface:NodeVisitorVisits an expression that is used as a statement. This node is a marker after the expression node(s).- Specified by:
 visitExpressionStatementin interfaceNodeVisitor<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>- Overrides:
 visitExpressionStatementin classAbstractNodeVisitor<TransferResult<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>,TransferInput<V extends CFAbstractValue<V>,S extends CFAbstractStore<V,S>>>- Parameters:
 n- theExpressionStatementNodeto be visitedvsTransferInput- the argument for the operation implemented by this visitor- Returns:
 - the return value of the operation implemented by this visitor
 
 
- 
insertIntoStores
protected static void insertIntoStores(TransferResult<CFValue,CFStore> result, JavaExpression target, javax.lang.model.element.AnnotationMirror newAnno)
Inserts newAnno as the value into all stores (conditional or not) in the result for node. This is a utility method for subclasses.- Parameters:
 result- the TransferResult holding the stores to modifytarget- the receiver whose value should be modifiednewAnno- the new value
 
 - 
 
 -