All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.checkerframework.dataflow.analysis.TransferFunction Maven / Gradle / Ivy

Go to download

The Checker Framework enhances Java's type system to make it more powerful and useful. This lets software developers detect and prevent errors in their Java programs. The Checker Framework includes compiler plug-ins ("checkers") that find bugs or verify their absence. It also permits you to write your own compiler plug-ins.

There is a newer version: 3.49.2
Show newest version
package org.checkerframework.dataflow.analysis;

/*>>>
import org.checkerframework.checker.nullness.qual.Nullable;
*/

import java.util.List;
import org.checkerframework.dataflow.cfg.UnderlyingAST;
import org.checkerframework.dataflow.cfg.node.LocalVariableNode;
import org.checkerframework.dataflow.cfg.node.Node;
import org.checkerframework.dataflow.cfg.node.NodeVisitor;

/**
 * Interface of a transfer function for the abstract interpretation used for the flow analysis.
 *
 * 

A transfer function consists of the following components: * *

    *
  • A method {@code initialStore} that determines which initial store should be used in the * org.checkerframework.dataflow analysis. *
  • A function for every {@link Node} type that determines the behavior of the * org.checkerframework.dataflow analysis in that case. This method takes a {@link Node} and * an incoming store, and produces a {@link RegularTransferResult}. *
* *

Important: The individual transfer functions ( {@code visit*}) are allowed to use * (and modify) the stores contained in the argument passed; the ownership is transfered from the * caller to that function. * * @author Stefan Heule * @param the {@link Store} used to keep track of intermediate results */ public interface TransferFunction, S extends Store> extends NodeVisitor, TransferInput> { /** * @return the initial store to be used by the org.checkerframework.dataflow analysis. {@code * parameters} is only set if the underlying AST is a method. */ S initialStore(UnderlyingAST underlyingAST, /*@Nullable*/ List parameters); }