package accrue.analysis.goals;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import polyglot.frontend.ExtensionInfo;
import polyglot.frontend.Pass;
import polyglot.frontend.Scheduler;
import polyglot.frontend.goals.AbstractGoal;
import polyglot.frontend.goals.Goal;
import accrue.analysis.MissingCodeReportPass;

public class MissingCodeReportGoal extends AbstractGoal {
    public static final String INFOFLOW_CONTEXTS =
            "stonesoup.numberhandling.infoflow.contexts";
    public static final String INSERT_CHECK =
            "stonesoup.analysis.stoptracking.insert_check";
    private final String filename;

    public static Goal singleton(ExtensionInfo extInfo, String filename) {
        Scheduler scheduler = extInfo.scheduler();
        return scheduler.internGoal(new MissingCodeReportGoal(filename));
    }

    private MissingCodeReportGoal(String filename) {
        super(null, "MissingCodeReportGoal");
        this.filename = filename;
    }

    @Override
    public Pass createPass(ExtensionInfo extInfo) {
        return MissingCodeReportPass.singleton(extInfo, filename);
    }

    @Override
    public Collection<Goal> prerequisiteGoals(Scheduler scheduler) {
        List<Goal> l = new ArrayList<Goal>();
        return l;
    }
}
