Module logicng

Class CNFConfig.Builder

  • Enclosing class:
    CNFConfig

    public static class CNFConfig.Builder
    extends Object
    The builder for a CNF configuration.
    • Method Detail

      • algorithm

        public CNFConfig.Builder algorithm​(CNFConfig.Algorithm algorithm)
        Sets the algorithm for the CNF encoding. The default value is ADVANCED.
        Parameters:
        algorithm - the algorithm for the CNF encoding
        Returns:
        the builder
      • fallbackAlgorithmForAdvancedEncoding

        public CNFConfig.Builder fallbackAlgorithmForAdvancedEncoding​(CNFConfig.Algorithm fallbackAlgorithmForAdvancedEncoding)
        Sets the fallback algorithm for the advanced CNF encoding. When the boundaries for the factorization are met, the encoding switches to this algorithm. The default value is TSEITIN.
        Parameters:
        fallbackAlgorithmForAdvancedEncoding - the fallback algorithm for the advanced CNF encoding
        Returns:
        the builder
      • distributionBoundary

        public CNFConfig.Builder distributionBoundary​(int distributionBoundary)
        Sets the boundary how many distributions should be performed in the factorization before the method is switched (in the ADVANCED encoding). Disable this boundary by setting it to -1. The default value is -1.
        Parameters:
        distributionBoundary - the distribution boundary
        Returns:
        the builder
      • createdClauseBoundary

        public CNFConfig.Builder createdClauseBoundary​(int createdClauseBoundary)
        Sets the boundary how many clauses should be created in the factorization before the method is switched (in the ADVANCED encoding). Disable this boundary by setting it to -1. The default value is 1000.
        Parameters:
        createdClauseBoundary - the clause creation boundary
        Returns:
        the builder
      • atomBoundary

        public CNFConfig.Builder atomBoundary​(int atomBoundary)
        Sets the boundary for how many atoms in a formula factorization is performed in Tseitin and Plaisted & Greenbaum. The default value is 12.
        Parameters:
        atomBoundary - the atom boundary
        Returns:
        the builder
      • build

        public CNFConfig build()
        Builds the configuration.
        Returns:
        the configuration.