Class PBodyNormalizer


  • public class PBodyNormalizer
    extends PDisjunctionRewriter
    A disjunction rewriter for creating a normalized form of specification, unifying variables and running basic sanity checks. This rewriter does not copy but modifies directly the original specification, requiring a mutable disjunction.
    • Method Detail

      • shouldCalculateImpliedTypes

        protected boolean shouldCalculateImpliedTypes​(PQuery query)
        Returns whether unary constraint elimination is enabled. This behavior can be customized by creating a subclass with a custom implementation.
        Since:
        1.6
      • shouldExpandWeakenedAlternatives

        protected boolean shouldExpandWeakenedAlternatives​(PQuery query)
        Returns whether 'weakened alternative' suggestions of the context shall be expanded as additional PConstraints. This behavior can be customized by creating a subclass with a custom implementation.
        Since:
        1.6
      • normalizeBody

        public PBody normalizeBody​(PBody body)
        Provides a normalized version of the pattern body. May return a different version than the original version if needed.
        Parameters:
        body -