org.sat4j
Class Lanceur

java.lang.Object
  extended by org.sat4j.AbstractLauncher
      extended by org.sat4j.Lanceur
All Implemented Interfaces:
java.io.Serializable

public class Lanceur
extends AbstractLauncher

This class is used to launch the SAT solvers from the command line. It is compliant with the SAT competition (www.satcompetition.org) I/O format. The launcher is to be used as follows:

                [solvername] filename [key=value]*
 
If no solver name is given, then the default solver of the solver factory is used (@see org.sat4j.core.ASolverFactory#defaultSolver()).

Author:
leberre
See Also:
Serialized Form

Field Summary
protected  ASolverFactory<ISolver> factory
           
 
Fields inherited from class org.sat4j.AbstractLauncher
ANSWER_PREFIX, COMMENT_PREFIX, reader, shutdownHook, SOLUTION_PREFIX, solver
 
Constructor Summary
Lanceur()
           
 
Method Summary
protected  ISolver configureSolver(java.lang.String[] args)
          Configure the solver according to the command line parameters.
protected  Reader createReader(ISolver theSolver, java.lang.String problemname)
           
 void displayLicense()
           
protected  java.lang.String getInstanceName(java.lang.String[] args)
           
static void main(java.lang.String[] args)
          Lance le prouveur sur un fichier Dimacs.
protected  IProblem readProblem(java.lang.String problemname)
           
 void usage()
           
 
Methods inherited from class org.sat4j.AbstractLauncher
displayHeader, displayResult, getBeginTime, getExitCode, getLogWriter, getReader, log, run, setExitCode, setLogWriter, setSilent, showAvailableSolvers, solve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected ASolverFactory<ISolver> factory
Constructor Detail

Lanceur

public Lanceur()
Method Detail

main

public static void main(java.lang.String[] args)
Lance le prouveur sur un fichier Dimacs.

Parameters:
args - doit contenir le nom d'un fichier Dimacs, eventuellement compress?.

configureSolver

protected ISolver configureSolver(java.lang.String[] args)
Configure the solver according to the command line parameters.

Specified by:
configureSolver in class AbstractLauncher
Parameters:
args - the command line
Returns:
a solver properly configured.

createReader

protected Reader createReader(ISolver theSolver,
                              java.lang.String problemname)
Specified by:
createReader in class AbstractLauncher

displayLicense

public void displayLicense()
Overrides:
displayLicense in class AbstractLauncher

usage

public void usage()
Specified by:
usage in class AbstractLauncher

getInstanceName

protected java.lang.String getInstanceName(java.lang.String[] args)
Specified by:
getInstanceName in class AbstractLauncher

readProblem

protected IProblem readProblem(java.lang.String problemname)
                        throws java.io.FileNotFoundException,
                               ParseFormatException,
                               java.io.IOException,
                               ContradictionException
Overrides:
readProblem in class AbstractLauncher
Throws:
java.io.FileNotFoundException
ParseFormatException
java.io.IOException
ContradictionException


Copyright © 2009 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.