Class 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 and SimpleIncrementalSatSolver at positions where a SatSolverState is required.

    Maintains an internal collection of disjunctions.

    Author:
    Mathias Hofer
    • Method Summary

      Modifier and Type Method Description
      boolean add​(Collection<net.sf.tweety.logics.pl.syntax.Disjunction> clauses)  
      boolean add​(net.sf.tweety.logics.pl.syntax.Disjunction clause)
      Updates the state of the corresponding SAT-Solver by adding a clause.
      void assume​(net.sf.tweety.logics.pl.syntax.Proposition proposition, boolean value)  
      void close()  
      boolean remove​(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()  
    • Method Detail

      • witness

        public net.sf.tweety.commons.Interpretation<net.sf.tweety.logics.pl.syntax.PlBeliefSet,​net.sf.tweety.logics.pl.syntax.PlFormula> witness()
        Specified by:
        witness in interface SatSolverState
      • assume

        public void assume​(net.sf.tweety.logics.pl.syntax.Proposition proposition,
                           boolean value)
        Specified by:
        assume in interface SatSolverState
      • add

        public boolean add​(net.sf.tweety.logics.pl.syntax.Disjunction clause)
        Description copied from interface: SatSolverState
        Updates the state of the corresponding SAT-Solver by adding a clause.
        Specified by:
        add in interface SatSolverState
        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:
        add in interface SatSolverState
      • remove

        public boolean remove​(net.sf.tweety.logics.pl.syntax.Disjunction clause)
        Description copied from interface: SatSolverState
        Tries to remove the given clause from the sat instance.
        Specified by:
        remove in interface SatSolverState
        Returns:
        true iff the removal was successful