Class SimpleSatSolverState

  • All Implemented Interfaces:
    java.lang.AutoCloseable, SatSolverState

    public class SimpleSatSolverState
    extends java.lang.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
    • Constructor Detail

      • SimpleSatSolverState

        SimpleSatSolverState​(SatSolver solver)
        Parameters:
        solver -
    • Method Detail

      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • add

        public boolean add​(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
      • remove

        public boolean remove​(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