package heuristics;

import parser.ast.ModulesFile;
import parser.ast.PropertiesFile;
import parser.ast.Property;
import prism.PrismComponent;
import prism.PrismException;
import prism.PrismLangException;
import simulator.SimulatorEngine;

public class HeuristicModelCheckerFactory {
	
	public enum HeuristicModelCheckerType {
		Original,New;
		
		public static HeuristicModelCheckerType forName(String name) {
			if(name == null || name.length() == 0) {
				return Original;
			} else {
				return valueOf(name);
			}
		}
	}
	
	public static HeuristicsSMGModelChecker createModelChecker(HeuristicModelCheckerType type, PrismComponent parent, ModulesFile modulesFile, PropertiesFile propertiesFile, Property property, SimulatorEngine engine, String heuristicName, String nextStateName, boolean verbose, boolean collapseMECs, boolean heuristicSymbolicContainers) throws PrismException {
		switch(type) {
			case Original:
				return new OriginalHeuristicsModelChecker(parent,modulesFile,propertiesFile,property,engine,heuristicName,nextStateName,verbose,collapseMECs,heuristicSymbolicContainers);
			case New:
				return new CollapseHeuristicsModelChecker(parent,modulesFile,propertiesFile,property,engine,heuristicName,nextStateName,verbose,collapseMECs,heuristicSymbolicContainers);
		}
		throw new PrismLangException("Unknown heuristic model checker type, got " + type);
	}
}
