Package net.sf.tweety.logics.pl.sat
Class LingelingSolver
- java.lang.Object
-
- net.sf.tweety.logics.pl.sat.SatSolver
-
- net.sf.tweety.logics.pl.sat.LingelingSolver
-
- All Implemented Interfaces:
net.sf.tweety.logics.commons.analysis.BeliefSetConsistencyTester<PlFormula>,net.sf.tweety.logics.commons.analysis.ConsistencyTester<net.sf.tweety.commons.BeliefSet<PlFormula,?>>,net.sf.tweety.logics.commons.analysis.ConsistencyWitnessProvider<PlBeliefSet,PlFormula>
public class LingelingSolver extends SatSolver
A wrapper for the Lingeling SAT solver (tested with Lingeling version ats1 ce8c04fc97ef07cf279c0c5dcbbc7c5d9904230a). See http://fmv.jku.at/lingeling/. NOTE: so far no further configuration possible.- Author:
- Matthias Thimm
-
-
Constructor Summary
Constructors Constructor Description LingelingSolver(String binaryLocation)Creates a new solver based on the Lingeling executable given as a parameter.
-
Method Summary
Modifier and Type Method Description net.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula>getWitness(Collection<PlFormula> formulas)If the collection of formulas is consistent this method returns some model of it or, if it is inconsistent, null.booleanisSatisfiable(Collection<PlFormula> formulas)Checks whether the given set of formulas is satisfiable.-
Methods inherited from class net.sf.tweety.logics.pl.sat.SatSolver
convertToDimacs, convertToDimacs, createTmpDimacsFile, createTmpDimacsFile, getDefaultSolver, getWitness, getWitness, hasDefaultSolver, isConsistent, isConsistent, isConsistent, setDefaultSolver, setTempFolder
-
-
-
-
Constructor Detail
-
LingelingSolver
public LingelingSolver(String binaryLocation)
Creates a new solver based on the Lingeling executable given as a parameter.- Parameters:
binaryLocation- the path to the executable.
-
-
Method Detail
-
getWitness
public net.sf.tweety.commons.Interpretation<PlBeliefSet,PlFormula> getWitness(Collection<PlFormula> formulas)
Description copied from class:SatSolverIf the collection of formulas is consistent this method returns some model of it or, if it is inconsistent, null.- Specified by:
getWitnessin interfacenet.sf.tweety.logics.commons.analysis.ConsistencyWitnessProvider<PlBeliefSet,PlFormula>- Specified by:
getWitnessin classSatSolver- Returns:
- some model of the formulas or null.
-
isSatisfiable
public boolean isSatisfiable(Collection<PlFormula> formulas)
Description copied from class:SatSolverChecks whether the given set of formulas is satisfiable.- Specified by:
isSatisfiablein classSatSolver- Parameters:
formulas- a set of formulas.- Returns:
- "true" if the set is consistent.
-
-