Module logicng

Class ExistentialQuantifierElimination

  • All Implemented Interfaces:
    FormulaTransformation

    public final class ExistentialQuantifierElimination
    extends Object
    implements FormulaTransformation
    This transformation eliminates a number of existentially quantified variables by replacing them with the Shannon expansion. If x is eliminated from a formula f, the resulting formula is f[true/x] | f[false/x].

    This transformation cannot be cached since it is dependent on the set of literals to eliminate.

    Since:
    1.0
    Version:
    1.0
    • Constructor Detail

      • ExistentialQuantifierElimination

        public ExistentialQuantifierElimination​(Variable... variables)
        Constructs a new existential quantifier elimination for the given variables.
        Parameters:
        variables - the variables
      • ExistentialQuantifierElimination

        public ExistentialQuantifierElimination​(Collection<Variable> variables)
        Constructs a new existential quantifier elimination for a given collection of variables.
        Parameters:
        variables - the collection of variables
    • Method Detail

      • apply

        public Formula apply​(Formula formula,
                             boolean cache)
        Description copied from interface: FormulaTransformation
        Returns the transformed formula.
        Specified by:
        apply in interface FormulaTransformation
        Parameters:
        formula - the input formula
        cache - indicated whether the result (and associated predicates) should be cached in the formula's cache.
        Returns:
        the transformed formula