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.
  • Constructor Details

  • Method Details

    • 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
    • rewrite

      public PDisjunction rewrite(PDisjunction disjunction)
      Specified by:
      rewrite in class PDisjunctionRewriter
    • setContext

      public void setContext(IQueryMetaContext context)
    • 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 -