diff options
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java')
-rw-r--r-- | third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java | 90 |
1 files changed, 39 insertions, 51 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java index d083372917..7c178a13fc 100644 --- a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java +++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/analysis/TransferResult.java @@ -5,38 +5,32 @@ import org.checkerframework.checker.nullness.qual.Nullable; */ import java.util.Map; - import javax.lang.model.type.TypeMirror; /** - * {@code TransferResult} is used as the result type of the individual transfer - * functions of a {@link TransferFunction}. It always belongs to the result of - * the individual transfer function for a particular {@link org.checkerframework.dataflow.cfg.node.Node}, even though - * that {@code org.checkerframework.dataflow.cfg.node.Node} is not explicitly store in {@code TransferResult}. - * - * <p> + * {@code TransferResult} is used as the result type of the individual transfer functions of a + * {@link TransferFunction}. It always belongs to the result of the individual transfer function for + * a particular {@link org.checkerframework.dataflow.cfg.node.Node}, even though that {@code + * org.checkerframework.dataflow.cfg.node.Node} is not explicitly store in {@code TransferResult}. * - * A {@code TransferResult} contains one or two stores (for 'then' and 'else'), - * and zero or more stores with a cause ({@link TypeMirror}). + * <p>A {@code TransferResult} contains one or two stores (for 'then' and 'else'), and zero or more + * stores with a cause ({@link TypeMirror}). * * @author Stefan Heule - * - * @param <S> - * The {@link Store} used to keep track of intermediate results. + * @param <S> the {@link Store} used to keep track of intermediate results */ -abstract public class TransferResult<A extends AbstractValue<A>, S extends Store<S>> { +public abstract class TransferResult<A extends AbstractValue<A>, S extends Store<S>> { /** - * The stores in case the basic block throws an exception (or {@code null} - * if the corresponding {@link org.checkerframework.dataflow.cfg.node.Node} does not throw any exceptions). Does - * not necessarily contain a store for every exception, in which case the - * in-store will be used. + * The stores in case the basic block throws an exception (or {@code null} if the corresponding + * {@link org.checkerframework.dataflow.cfg.node.Node} does not throw any exceptions). Does not + * necessarily contain a store for every exception, in which case the in-store will be used. */ protected /*@Nullable*/ Map<TypeMirror, S> exceptionalStores; /** - * The abstract value of the {@link org.checkerframework.dataflow.cfg.node.Node} associated with this - * {@link TransferResult}, or {@code null} if no value has been produced. + * The abstract value of the {@link org.checkerframework.dataflow.cfg.node.Node} associated with + * this {@link TransferResult}, or {@code null} if no value has been produced. */ protected /*@Nullable*/ A resultValue; @@ -44,9 +38,7 @@ abstract public class TransferResult<A extends AbstractValue<A>, S extends Store this.resultValue = resultValue; } - /** - * @return The abstract value produced by the transfer function. - */ + /** @return the abstract value produced by the transfer function */ public A getResultValue() { return resultValue; } @@ -56,30 +48,29 @@ abstract public class TransferResult<A extends AbstractValue<A>, S extends Store } /** - * @return The regular result store produced if no exception is thrown by - * the {@link org.checkerframework.dataflow.cfg.node.Node} corresponding to this transfer function result. + * @return the regular result store produced if no exception is thrown by the {@link + * org.checkerframework.dataflow.cfg.node.Node} corresponding to this transfer function + * result. */ - abstract public S getRegularStore(); + public abstract S getRegularStore(); /** - * @return The result store produced if the {@link org.checkerframework.dataflow.cfg.node.Node} this result belongs - * to evaluates to {@code true}. + * @return the result store produced if the {@link org.checkerframework.dataflow.cfg.node.Node} + * this result belongs to evaluates to {@code true}. */ - abstract public S getThenStore(); + public abstract S getThenStore(); /** - * @return The result store produced if the {@link org.checkerframework.dataflow.cfg.node.Node} this result belongs - * to evaluates to {@code false}. + * @return the result store produced if the {@link org.checkerframework.dataflow.cfg.node.Node} + * this result belongs to evaluates to {@code false}. */ - abstract public S getElseStore(); + public abstract S getElseStore(); /** - * @return The store that flows along the outgoing exceptional edge labeled - * with {@code exception} (or {@code null} if no special handling is - * required for exceptional edges). + * @return the store that flows along the outgoing exceptional edge labeled with {@code + * exception} (or {@code null} if no special handling is required for exceptional edges). */ - public /*@Nullable*/ S getExceptionalStore( - TypeMirror exception) { + public /*@Nullable*/ S getExceptionalStore(TypeMirror exception) { if (exceptionalStores == null) { return null; } @@ -87,8 +78,7 @@ abstract public class TransferResult<A extends AbstractValue<A>, S extends Store } /** - * @return Returns a Map of {@link TypeMirror} to {@link Store}. - * + * @return a Map of {@link TypeMirror} to {@link Store} * @see TransferResult#getExceptionalStore(TypeMirror) */ public Map<TypeMirror, S> getExceptionalStores() { @@ -96,21 +86,19 @@ abstract public class TransferResult<A extends AbstractValue<A>, S extends Store } /** - * @return {@code true} if and only if this transfer result contains two - * stores that are potentially not equal. Note that the result - * {@code true} does not imply that {@code getRegularStore} cannot - * be called (or vice versa for {@code false}). Rather, it indicates - * that {@code getThenStore} or {@code getElseStore} can be used to - * give more precise results. Otherwise, if the result is - * {@code false}, then all three methods {@code getRegularStore}, - * {@code getThenStore}, and {@code getElseStore} return equivalent - * stores. + * @return {@code true} if and only if this transfer result contains two stores that are + * potentially not equal. Note that the result {@code true} does not imply that {@code + * getRegularStore} cannot be called (or vice versa for {@code false}). Rather, it indicates + * that {@code getThenStore} or {@code getElseStore} can be used to give more precise + * results. Otherwise, if the result is {@code false}, then all three methods {@code + * getRegularStore}, {@code getThenStore}, and {@code getElseStore} return equivalent + * stores. */ - abstract public boolean containsTwoStores(); + public abstract boolean containsTwoStores(); /** - * @return {@code true} if and only if the transfer function returning this - * transfer result changed the regularStore, elseStore, or thenStore. + * @return {@code true} if and only if the transfer function returning this transfer result + * changed the regularStore, elseStore, or thenStore. */ - abstract public boolean storeChanged(); + public abstract boolean storeChanged(); } |