Class TransferResult<V extends AbstractValue<V>,S extends Store<S>> 
java.lang.Object
org.checkerframework.dataflow.analysis.TransferResult<V,S> 
- Type Parameters:
- V- type of the abstract value that is tracked
- S- the store type used in the analysis
- Direct Known Subclasses:
- ConditionalTransferResult,- RegularTransferResult
TransferResult is used as the result type of the individual transfer functions of a
 TransferFunction. It always belongs to the result of the individual transfer function for
 a particular Node, even though that 
 org.checkerframework.dataflow.cfg.node.Node is not explicitly stored in TransferResult.
 A TransferResult consists of a result value, plus one or more stores. It contains one
 or two stores (for 'then' and 'else'), plus zero or more stores with a cause (TypeMirror).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final @Nullable Map<TypeMirror, S> The stores in case the basic block throws an exception (ornullif the correspondingNodedoes not throw any exceptions).The abstract value of theNodeassociated with thisTransferResult, ornullif no value has been produced.
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedTransferResult(@Nullable V resultValue, @Nullable Map<TypeMirror, S> exceptionalStores) Create a new TransferResult, givenresultValueandexceptionalStores.
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleanReturnstrueif and only if this transfer result contains two stores that are potentially not equal.abstract SReturns the result store produced if theNodethis result belongs to evaluates tofalse.getExceptionalStore(TypeMirror exception) Returns the store that flows along the outgoing exceptional edge labeled withexception(ornullif no special handling is required for exceptional edges).abstract SReturns the regular result store produced if no exception is thrown by theNodecorresponding to this transfer function result.Returns the abstract value produced by the transfer function,nullotherwise.abstract SReturns the result store produced if theNodethis result belongs to evaluates totrue.voidsetResultValue(V resultValue) Set the value ofresultValue.abstract booleanReturnstrueif and only if the transfer function returning this transfer result changed the regularStore, elseStore, or thenStore.abstract TransferResult<V, S> withExceptionalStores(Map<TypeMirror, S> exceptionalStores) Construct a shallow copy of thisTransferResult, but with the givenexceptionalStores.
- 
Field Details- 
resultValueThe abstract value of theNodeassociated with thisTransferResult, ornullif no value has been produced.Is set by setResultValue(V).
- 
exceptionalStoresThe stores in case the basic block throws an exception (ornullif the correspondingNodedoes not throw any exceptions). Does not necessarily contain a store for every exception, in which case the in-store will be used.
 
- 
- 
Constructor Details- 
TransferResultCreate a new TransferResult, givenresultValueandexceptionalStores.- Parameters:
- resultValue- the abstract value of the- Nodeassociated with this- TransferResult
- exceptionalStores- the stores in case the basic block throws an exception (or- nullif the corresponding- Nodedoes not throw any exceptions)
 
 
- 
- 
Method Details- 
getResultValueReturns the abstract value produced by the transfer function,nullotherwise.- Returns:
- the abstract value produced by the transfer function, nullotherwise
 
- 
setResultValueSet the value ofresultValue.- Parameters:
- resultValue- the abstract value of the- Nodeassociated with this- TransferResult
 
- 
getRegularStoreReturns the regular result store produced if no exception is thrown by theNodecorresponding to this transfer function result.- Returns:
- the regular result store produced if no exception is thrown by the Nodecorresponding to this transfer function result
 
- 
getThenStoreReturns the result store produced if theNodethis result belongs to evaluates totrue.- Returns:
- the result store produced if the Nodethis result belongs to evaluates totrue
 
- 
getElseStoreReturns the result store produced if theNodethis result belongs to evaluates tofalse.- Returns:
- the result store produced if the Nodethis result belongs to evaluates tofalse
 
- 
getExceptionalStoreReturns the store that flows along the outgoing exceptional edge labeled withexception(ornullif no special handling is required for exceptional edges).- Parameters:
- exception- an exception type
- Returns:
- the store that flows along the outgoing exceptional edge labeled with exception(ornullif no special handling is required for exceptional edges)
 
- 
getExceptionalStores- Returns:
- a Map of TypeMirrortoStore,nullotherwise
- See Also:
 
- 
containsTwoStorespublic abstract boolean containsTwoStores()Returnstrueif and only if this transfer result contains two stores that are potentially not equal. Note that the resulttruedoes not imply thatgetRegularStorecannot be called (or vice versa forfalse). Rather, it indicates thatgetThenStoreorgetElseStorecan be used to give more precise results. Otherwise, if the result isfalse, then all three methodsgetRegularStore,getThenStore, andgetElseStorereturn equivalent stores.- Returns:
- trueif and only if this transfer result contains two stores that are potentially not equal
 
- 
storeChangedpublic abstract boolean storeChanged()Returnstrueif and only if the transfer function returning this transfer result changed the regularStore, elseStore, or thenStore.- Returns:
- trueif and only if the transfer function returning this transfer result changed the regularStore, elseStore, or thenStore
 
- 
withExceptionalStoresConstruct a shallow copy of thisTransferResult, but with the givenexceptionalStores.- Parameters:
- exceptionalStores- the new exceptional stores to use
- Returns:
- a copy of this object modified to use the given exceptional stores
- See Also:
 
 
-