| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.AbstractLauncher
public abstract class AbstractLauncher
That class is used by launchers used to solve decision problems, i.e. problems with YES/NO/UNKNOWN answers.
| Field Summary | |
|---|---|
static java.lang.String | 
ANSWER_PREFIX
 | 
static java.lang.String | 
COMMENT_PREFIX
 | 
protected  Reader | 
reader
 | 
protected  java.lang.Thread | 
shutdownHook
 | 
static java.lang.String | 
SOLUTION_PREFIX
 | 
protected  ISolver | 
solver
 | 
| Constructor Summary | |
|---|---|
protected  | 
AbstractLauncher()
 | 
| Method Summary | ||
|---|---|---|
protected abstract  ISolver | 
configureSolver(java.lang.String[] args)
 | 
|
protected abstract  Reader | 
createReader(ISolver theSolver,
             java.lang.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  java.lang.String | 
getInstanceName(java.lang.String[] args)
 | 
|
 java.io.PrintWriter | 
getLogWriter()
 | 
|
 Reader | 
getReader()
 | 
|
 void | 
log(java.lang.String message)
Display messages as comments on STDOUT  | 
|
protected  IProblem | 
readProblem(java.lang.String problemname)
Reads a problem file from the command line.  | 
|
 void | 
run(java.lang.String[] args)
 | 
|
 void | 
setExitCode(ExitCode exitCode)
Change the value of the exit code in the Launcher  | 
|
 void | 
setLogWriter(java.io.PrintWriter out)
To change the output stream on which statistics are displayed.  | 
|
protected  void | 
setSilent(boolean b)
 | 
|
protected 
 | 
showAvailableSolvers(ASolverFactory<T> afactory)
 | 
|
protected  void | 
solve(IProblem problem)
 | 
|
abstract  void | 
usage()
 | 
|
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final java.lang.String SOLUTION_PREFIX
public static final java.lang.String ANSWER_PREFIX
public static final java.lang.String COMMENT_PREFIX
protected Reader reader
protected transient java.lang.Thread shutdownHook
protected ISolver solver
| Constructor Detail | 
|---|
protected AbstractLauncher()
| Method Detail | 
|---|
protected void displayResult()
public abstract void usage()
protected final void displayHeader()
java.io.IOExceptionpublic void displayLicense()
protected IProblem readProblem(java.lang.String problemname)
                        throws java.io.FileNotFoundException,
                               ParseFormatException,
                               java.io.IOException,
                               ContradictionException
problemname - the fully qualified name of the problem.
java.io.FileNotFoundException - if the file is not found
ParseFormatException - if the problem is not expressed using the right format
java.io.IOException - for other IO problems
ContradictionException - if the problem is found trivially unsat
protected abstract Reader createReader(ISolver theSolver,
                                       java.lang.String problemname)
public void run(java.lang.String[] args)
protected abstract java.lang.String getInstanceName(java.lang.String[] args)
protected abstract ISolver configureSolver(java.lang.String[] args)
public void log(java.lang.String message)
message - 
protected void solve(IProblem problem)
              throws TimeoutException
TimeoutExceptionpublic final void setExitCode(ExitCode exitCode)
exitCode - the new ExitCodepublic final ExitCode getExitCode()
public final long getBeginTime()
public final Reader getReader()
public void setLogWriter(java.io.PrintWriter out)
out - public java.io.PrintWriter getLogWriter()
protected void setSilent(boolean b)
protected <T extends ISolver> void showAvailableSolvers(ASolverFactory<T> afactory)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||