Module logicng

Class FormulaFactoryConfig.Builder

  • Enclosing class:
    FormulaFactoryConfig

    public static class FormulaFactoryConfig.Builder
    extends Object
    The builder for a formula factory configuration.
    Since:
    2.0.0
    Version:
    2.0.0
    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • name

        public FormulaFactoryConfig.Builder name​(String name)
        Sets the name of this formula factory. The default is an empty string.

        Setting a name is only useful when multiple formula factories are used in the same context. The name is used to create individual names for generated variables s.t. the generated variables of different formula factories will not clash.

        Parameters:
        name - the name
        Returns:
        the builder
      • simplifyComplementaryOperands

        public FormulaFactoryConfig.Builder simplifyComplementaryOperands​(boolean simplifyComplementaryOperands)
        Sets the flag whether trivial contradictions and tautologies are simplified in formulas. If set to false, a formula like A & ~A or A | ~A can be generated on the formula factory. If set to true, the formulas will be simplified to $false or true respectively. The default is true.
        Parameters:
        simplifyComplementaryOperands - the flag whether to simplify trivial contradictions and tautologies or not
        Returns:
        the builder