public abstract class AbstractLauncher extends Object implements Serializable, ILogAble
Modifier and Type | Field and Description |
---|---|
protected long |
beginTime |
static String |
COMMENT_PREFIX |
protected ExitCode |
exitCode |
protected PrintWriter |
out |
protected boolean |
prime |
protected IProblem |
problem |
protected Reader |
reader |
protected Thread |
shutdownHook |
boolean |
silent |
protected ISolver |
solver |
Modifier | Constructor and Description |
---|---|
protected |
AbstractLauncher() |
Modifier and Type | Method and Description |
---|---|
protected abstract ISolver |
configureSolver(String[] args) |
protected abstract Reader |
createReader(ISolver theSolver,
String problemname) |
protected void |
displayHeader() |
void |
displayLicense() |
protected void |
displayResult() |
long |
getBeginTime()
Obtaining the current time spent since the beginning of the solving
process.
|
ExitCode |
getExitCode()
Get the value of the ExitCode
|
protected abstract String |
getInstanceName(String[] args) |
PrintWriter |
getLogWriter() |
Reader |
getReader() |
void |
log(String message)
Display messages as comments on STDOUT
|
protected IProblem |
readProblem(String problemname)
Reads a problem file from the command line.
|
void |
run(String[] args) |
protected void |
setDisplaySolutionLine(boolean value)
To change the display so that solution line appears or not.
|
void |
setExitCode(ExitCode exitCode)
Change the value of the exit code in the Launcher
|
protected void |
setIncomplete(boolean isIncomplete) |
protected void |
setLauncherMode(ILauncherMode launcherMode) |
void |
setLogWriter(PrintWriter out)
To change the output stream on which statistics are displayed.
|
protected void |
setSilent(boolean b) |
protected <T extends ISolver> |
showAvailableSolvers(ASolverFactory<T> afactory) |
protected <T extends ISolver> |
showAvailableSolvers(ASolverFactory<T> afactory,
String framework) |
protected void |
solve(IProblem problem) |
abstract void |
usage() |
public static final String COMMENT_PREFIX
protected long beginTime
protected ExitCode exitCode
protected Reader reader
protected transient PrintWriter out
protected transient Thread shutdownHook
protected ISolver solver
protected IProblem problem
public boolean silent
protected boolean prime
protected void setLauncherMode(ILauncherMode launcherMode)
protected void setIncomplete(boolean isIncomplete)
protected void displayResult()
public abstract void usage()
protected final void displayHeader()
IOException
public void displayLicense()
protected IProblem readProblem(String problemname) throws ParseFormatException, IOException, ContradictionException
problemname
- the fully qualified name of the problem.ParseFormatException
- if the problem is not expressed using the right formatIOException
- for other IO problemsContradictionException
- if the problem is found trivially unsatpublic void run(String[] args)
public void log(String message)
protected void solve(IProblem problem) throws TimeoutException
TimeoutException
protected void setDisplaySolutionLine(boolean value)
value
- public final void setExitCode(ExitCode exitCode)
exitCode
- the new ExitCodepublic final ExitCode getExitCode()
public final long getBeginTime()
public final Reader getReader()
public void setLogWriter(PrintWriter out)
out
- public PrintWriter getLogWriter()
protected void setSilent(boolean b)
protected <T extends ISolver> void showAvailableSolvers(ASolverFactory<T> afactory)
protected <T extends ISolver> void showAvailableSolvers(ASolverFactory<T> afactory, String framework)
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.