Class BooleanNormalizer


  • @API(INTERNAL)
    public class BooleanNormalizer
    extends Object
    A normalizer of a tree of QueryComponent predicates into disjunctive normal form.

    The full normal form has a single Or at the root, all of whose children are And, none of whose children have other Boolean operators. This is abbreviated to exclude parent Boolean nodes with only one child. The intermediate form for the normalizer is a list of lists.

    The size of a Boolean expression in disjunctive normal form (DNF) is the number of terms in the outermost Or [O'Donnell 2014]. The BooleanNormalizer will not normalize a QueryComponent if the normalized form would have a size that exceeds the size limit. This limit is useful to avoid wastefully normalizing expressions with a very large DNF. In some cases, such as a large expression in conjunctive normal form (CNF), attempting to normalize such an expression will cause out-of-memory errors.

    • Field Detail

      • DEFAULT_SIZE_LIMIT

        public static final int DEFAULT_SIZE_LIMIT
        The default limit on the size of the DNF that will be produced by the normalizer.
        See Also:
        Constant Field Values