package accrue;

import polyglot.frontend.ExtensionInfo;
import accrue.analysis.pointer.PointsToEngine;
import accrue.analysis.pointer.StmtRegistrar;
import accrue.analysis.pointer.analyses.HeapAbstractionFactory;
import accrue.analysis.signatures.AnalysisSignatures;

/**
 * An ExtensionInfo that implements the needed functionality for
 * Accrue. This is an interface rather than a class to allow
 * language extentions that want to support Accrue analyses
 * to extend existing ExtensionInfo classes.
 *
 */
public interface AccrueExtensionInfo extends ExtensionInfo {

    /**
     * Create the StmtRegistrar that will be used to register
     * pointer-analysis statements.
     */
    StmtRegistrar createStmtRegistrar();

    /**
     * Return the HeapAbstractionFactory to be used
     * during pointer analysis.
     */
    HeapAbstractionFactory heapAbstractionFactory();

    /**
     * Return the PointsToEngine to be used during
     * pointer analysis.
     */
    PointsToEngine pointsToEngine();

    /**
     * Return an object to handle analysis results when
     * source code is unavailable.
     */
    AnalysisSignatures getAnalysisSignatures();

    /**
     * Is this ExtensionInfo the output extension info for some
     * other extension? This will affect some of the behavior
     * of some of the goals of this ExtensionInfo, notably 
     * whether this extension info will parse source files,
     * or simply accept the AST nodes given to it (i.e., the output
     * of the previous ExtensionInfo).
     */
    boolean isOutputExtensionInfo();

    /**
     * Set whether this ExtensionInfo is the output extension info
     * for some other extension.
     */
    void setIsOutputExtensionInfo(boolean isOutputExtensionInfo);
}
