Package net.sf.tweety.arg.adf.sat
Class SimpleSatSolverState
- java.lang.Object
-
- net.sf.tweety.arg.adf.sat.SimpleSatSolverState
-
- All Implemented Interfaces:
AutoCloseable,SatSolverState
public class SimpleSatSolverState extends Object implements SatSolverState
A dummy state that can be used in combination with non-incremental Sat-Solvers andSimpleIncrementalSatSolverat positions where a SatSolverState is required.Maintains an internal collection of disjunctions.
- Author:
- Mathias Hofer
-
-
Method Summary
Modifier and Type Method Description booleanadd(Collection<net.sf.tweety.logics.pl.syntax.Disjunction> clauses)booleanadd(net.sf.tweety.logics.pl.syntax.Disjunction clause)Updates the state of the corresponding SAT-Solver by adding a clause.voidassume(net.sf.tweety.logics.pl.syntax.Proposition proposition, boolean value)voidclose()booleanremove(net.sf.tweety.logics.pl.syntax.Disjunction clause)Tries to remove the given clause from the sat instance.net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,net.sf.tweety.logics.pl.syntax.PlFormula>witness()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sf.tweety.arg.adf.sat.SatSolverState
satisfiable
-
-
-
-
Method Detail
-
close
public void close() throws Exception- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
witness
public net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,net.sf.tweety.logics.pl.syntax.PlFormula> witness()
- Specified by:
witnessin interfaceSatSolverState
-
assume
public void assume(net.sf.tweety.logics.pl.syntax.Proposition proposition, boolean value)- Specified by:
assumein interfaceSatSolverState
-
add
public boolean add(net.sf.tweety.logics.pl.syntax.Disjunction clause)
Description copied from interface:SatSolverStateUpdates the state of the corresponding SAT-Solver by adding a clause.- Specified by:
addin interfaceSatSolverState- Parameters:
clause- a clause containing only literals - no constants!- Returns:
- true iff the
-
add
public boolean add(Collection<net.sf.tweety.logics.pl.syntax.Disjunction> clauses)
- Specified by:
addin interfaceSatSolverState
-
remove
public boolean remove(net.sf.tweety.logics.pl.syntax.Disjunction clause)
Description copied from interface:SatSolverStateTries to remove the given clause from the sat instance.- Specified by:
removein interfaceSatSolverState- Returns:
- true iff the removal was successful
-
-