public class PBodyNormalizer extends PDisjunctionRewriter
Modifier and Type | Field and Description |
---|---|
boolean |
calcImpliedTypes
Deprecated.
redefine in a subclass
shouldCalculateImpliedTypes(PQuery) instead |
Constructor and Description |
---|
PBodyNormalizer(IQueryMetaContext context) |
PBodyNormalizer(IQueryMetaContext context,
boolean calculateImpliedTypes)
Deprecated.
redefine in a subclass
shouldCalculateImpliedTypes(PQuery) instead |
Modifier and Type | Method and Description |
---|---|
PBody |
normalizeBody(PBody body)
Provides a normalized version of the pattern body.
|
PDisjunction |
rewrite(PDisjunction disjunction) |
void |
setContext(IQueryMetaContext context) |
protected boolean |
shouldCalculateImpliedTypes(PQuery query)
Returns whether unary constraint elimination is enabled.
|
protected boolean |
shouldExpandWeakenedAlternatives(PQuery query)
Returns whether 'weakened alternative' suggestions of the context shall be expanded as additional PConstraints.
|
rewrite
addTrace, derivativeRemoved, getTraceCollector, getTraces, setTraceCollector
public boolean calcImpliedTypes
shouldCalculateImpliedTypes(PQuery)
insteadpublic PBodyNormalizer(IQueryMetaContext context)
public PBodyNormalizer(IQueryMetaContext context, boolean calculateImpliedTypes)
shouldCalculateImpliedTypes(PQuery)
insteadcalculateImpliedTypes
- If set to true, shrinks the net by avoiding unnecessary typechecksprotected boolean shouldCalculateImpliedTypes(PQuery query)
protected boolean shouldExpandWeakenedAlternatives(PQuery query)
public PDisjunction rewrite(PDisjunction disjunction) throws RewriterException
rewrite
in class PDisjunctionRewriter
RewriterException
public void setContext(IQueryMetaContext context)
public PBody normalizeBody(PBody body) throws RewriterException
body
- RewriterException