Module logicng

Class MiniSatConfig.Builder

  • Enclosing class:
    MiniSatConfig

    public static class MiniSatConfig.Builder
    extends Object
    The builder for a MiniSAT configuration.
    Since:
    1.0
    Version:
    2.0.0
    • Method Detail

      • varDecay

        public MiniSatConfig.Builder varDecay​(double varDecay)
        Sets the variable activity decay factor to a given value. The default value is 0.95.
        Parameters:
        varDecay - the value (should be in the range 0..1)
        Returns:
        the builder
      • varInc

        public MiniSatConfig.Builder varInc​(double varInc)
        Sets the initial value to bump a variable with each time it is used in conflict resolution to a given value. The default value is 1.0.
        Parameters:
        varInc - the value
        Returns:
        the builder
      • restartFirst

        public MiniSatConfig.Builder restartFirst​(int restartFirst)
        Sets the base restart interval to the given value. The default value is 100.
        Parameters:
        restartFirst - the value (should be at least 1)
        Returns:
        the builder
      • restartInc

        public MiniSatConfig.Builder restartInc​(double restartInc)
        Sets the restart interval increase factor to the given value. The default value is 2.0.
        Parameters:
        restartInc - the value (should be at least 1)
        Returns:
        the builder
      • clauseDecay

        public MiniSatConfig.Builder clauseDecay​(double clauseDecay)
        Sets the clause activity decay factor to a given value. The default value is 0.999.
        Parameters:
        clauseDecay - the value (should be in the range 0..1)
        Returns:
        the builder
      • removeSatisfied

        public MiniSatConfig.Builder removeSatisfied​(boolean removeSatisfied)
        If turned on, the satisfied original clauses will be removed when simplifying on level 0, when turned off, only the satisfied learnt clauses will be removed. The default value is true.
        Parameters:
        removeSatisfied - true if the original clauses should be simplified, false otherwise
        Returns:
        the builder
      • lsFactor

        public MiniSatConfig.Builder lsFactor​(double learntsizeFactor)
        Sets the initial limit for learnt clauses as a factor of the original clauses to the given value. The default value is 1/3.
        Parameters:
        learntsizeFactor - the value
        Returns:
        the builder
      • lsInc

        public MiniSatConfig.Builder lsInc​(double learntsizeInc)
        Sets the factor by which the limit for learnt clauses is multiplied every restart to a given value. The default value is 1.1.
        Parameters:
        learntsizeInc - the value
        Returns:
        the builder
      • incremental

        public MiniSatConfig.Builder incremental​(boolean incremental)
        Turns the incremental mode of the solver off and on. The default value is true.
        Parameters:
        incremental - true if incremental mode is turned on, false otherwise
        Returns:
        the builder
      • initialPhase

        public MiniSatConfig.Builder initialPhase​(boolean initialPhase)
        Sets the initial phase of the solver. The default value is true.
        Parameters:
        initialPhase - the initial phase
        Returns:
        the builder
      • proofGeneration

        public MiniSatConfig.Builder proofGeneration​(boolean proofGeneration)
        Sets whether the information for generating a proof with DRUP should be recorded or not. The default value is false.
        Parameters:
        proofGeneration - true if proof generating information should be recorded, false otherwise
        Returns:
        the builder
      • cnfMethod

        public MiniSatConfig.Builder cnfMethod​(MiniSatConfig.CNFMethod cnfMethod)
        Sets the CNF method for converting formula which are not in CNF for the solver. The default value is FACTORY_CNF.
        Parameters:
        cnfMethod - the CNF method
        Returns:
        the builder
      • auxiliaryVariablesInModels

        public MiniSatConfig.Builder auxiliaryVariablesInModels​(boolean auxiliaryVariablesInModels)
        Sets whether auxiliary variables (CNF, cardinality constraints, pseudo-Boolean constraints) should be included in methods like SATSolver.model() or SATSolver.enumerateAllModels(). If set to true, all variables will be included in these methods, if set to false, variables starting with "@RESERVED_CC_", "@RESERVED_PB_", and "@RESERVED_CNF_" will be excluded from the models. The default value is false.
        Parameters:
        auxiliaryVariablesInModels - true if auxiliary variables should be included in the models, false otherwise
        Returns:
        the builder
      • bbCheckForRotatableLiterals

        public MiniSatConfig.Builder bbCheckForRotatableLiterals​(boolean checkForRotatableLiterals)
        Sets whether the backbone algorithm should check for rotatable literals. The default value is true.
        Parameters:
        checkForRotatableLiterals - the boolean value that is true if the algorithm should check for rotatables or false otherwise.
        Returns:
        the builder
      • bbInitialUBCheckForRotatableLiterals

        public MiniSatConfig.Builder bbInitialUBCheckForRotatableLiterals​(boolean initialUBCheckForRotatableLiterals)
        Sets whether the backbone algorithm should check for rotatable literals during initial unit propagation. The default value is true.
        Parameters:
        initialUBCheckForRotatableLiterals - the boolean value that is true if the algorithm should check for rotatables or false otherwise.
        Returns:
        the builder
      • bbCheckForComplementModelLiterals

        public MiniSatConfig.Builder bbCheckForComplementModelLiterals​(boolean checkForComplementModelLiterals)
        Sets whether the backbone algorithm should check for complement model literals. The default value is true.
        Parameters:
        checkForComplementModelLiterals - the boolean value that is true if the algorithm should check for complement literals or false otherwise.
        Returns:
        the builder
      • build

        public MiniSatConfig build()
        Builds the MiniSAT configuration.
        Returns:
        the configuration