Class PBodyNormalizer
java.lang.Object
tools.refinery.interpreter.matchers.psystem.rewriters.AbstractRewriterTraceSource
tools.refinery.interpreter.matchers.psystem.rewriters.PDisjunctionRewriter
tools.refinery.interpreter.matchers.psystem.rewriters.PBodyNormalizer
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnormalizeBody
(PBody body) Provides a normalized version of the pattern body.rewrite
(PDisjunction disjunction) void
setContext
(IQueryMetaContext context) protected boolean
Returns whether unary constraint elimination is enabled.protected boolean
Returns whether 'weakened alternative' suggestions of the context shall be expanded as additional PConstraints.Methods inherited from class tools.refinery.interpreter.matchers.psystem.rewriters.PDisjunctionRewriter
rewrite
Methods inherited from class tools.refinery.interpreter.matchers.psystem.rewriters.AbstractRewriterTraceSource
addTrace, derivativeRemoved, getTraceCollector, getTraces, setTraceCollector
-
Constructor Details
-
PBodyNormalizer
-
-
Method Details
-
shouldCalculateImpliedTypes
Returns whether unary constraint elimination is enabled. This behavior can be customized by creating a subclass with a custom implementation.- Since:
- 1.6
-
shouldExpandWeakenedAlternatives
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
- Specified by:
rewrite
in classPDisjunctionRewriter
-
setContext
-
normalizeBody
Provides a normalized version of the pattern body. May return a different version than the original version if needed.- Parameters:
body
-
-