public interface IQTree
| Modifier and Type | Method and Description |
|---|---|
IQTree |
acceptTransformer(IQTreeVisitingTransformer transformer) |
<T> T |
acceptVisitor(IQVisitor<T> visitor) |
IQTree |
applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
Optional<ImmutableExpression> constraint)
Applies the descending substitution and performs SOME optimizations.
|
IQTree |
applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution)
Applies the descending substitution WITHOUT applying any additional optimization.
|
IQTree |
applyFreshRenaming(InjectiveVar2VarSubstitution freshRenamingSubstitution)
Particular type of descending substitution: only renaming some variables by external ones.
|
com.google.common.collect.ImmutableList<IQTree> |
getChildren() |
com.google.common.collect.ImmutableSet<Variable> |
getKnownVariables()
Variables present in the tree
|
com.google.common.collect.ImmutableSet<Variable> |
getNotInternallyRequiredVariables()
Variables that are the tree proposes for removal if the ancestor trees do not need them.
|
com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> |
getPossibleVariableDefinitions()
Returns a set of substitutions that define the projected variables when they are constructed.
|
QueryNode |
getRootNode() |
VariableNullability |
getVariableNullability() |
com.google.common.collect.ImmutableSet<Variable> |
getVariables()
Variables projected by the tree
|
com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> |
inferUniqueConstraints()
NOT guaranteed to return all the unique constraints (MAY BE INCOMPLETE)
Set of sets of determinants.
|
boolean |
isConstructed(Variable variable)
Returns true if the variable is (at least in one branch) constructed by a substitution
(in a construction node)
|
boolean |
isDeclaredAsEmpty()
Returns true if corresponds to a EmptyNode
|
boolean |
isDistinct()
Returns true if it guarantees that all its results will be distinct
|
boolean |
isEquivalentTo(IQTree tree) |
default boolean |
isLeaf() |
IQTree |
liftIncompatibleDefinitions(Variable variable,
VariableGenerator variableGenerator)
Tries to lift unions when they have incompatible definitions
for a variable.
|
IQTree |
normalizeForOptimization(VariableGenerator variableGenerator) |
IQTree |
propagateDownConstraint(ImmutableExpression constraint)
TODO: explain
The constraint is used for pruning.
|
IQTree |
removeDistincts()
TODO: find a better name
|
IQTree |
replaceSubTree(IQTree subTreeToReplace,
IQTree newSubTree)
If subTreeToReplace is not found, has no effect (besides creating a novel copy).
|
void |
validate() |
QueryNode getRootNode()
com.google.common.collect.ImmutableList<IQTree> getChildren()
com.google.common.collect.ImmutableSet<Variable> getVariables()
IQTree acceptTransformer(IQTreeVisitingTransformer transformer)
<T> T acceptVisitor(IQVisitor<T> visitor)
IQTree normalizeForOptimization(VariableGenerator variableGenerator)
IQTree liftIncompatibleDefinitions(Variable variable, VariableGenerator variableGenerator)
default boolean isLeaf()
IQTree applyDescendingSubstitution(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, Optional<ImmutableExpression> constraint)
IQTree applyFreshRenaming(InjectiveVar2VarSubstitution freshRenamingSubstitution)
IQTree applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution)
com.google.common.collect.ImmutableSet<Variable> getKnownVariables()
boolean isConstructed(Variable variable)
boolean isDistinct()
boolean isDeclaredAsEmpty()
VariableNullability getVariableNullability()
boolean isEquivalentTo(IQTree tree)
IQTree propagateDownConstraint(ImmutableExpression constraint)
IQTree removeDistincts()
void validate()
throws InvalidIntermediateQueryException
IQTree replaceSubTree(IQTree subTreeToReplace, IQTree newSubTree)
com.google.common.collect.ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions()
com.google.common.collect.ImmutableSet<com.google.common.collect.ImmutableSet<Variable>> inferUniqueConstraints()
com.google.common.collect.ImmutableSet<Variable> getNotInternallyRequiredVariables()
Copyright © 2009–2020 Free University of Bozen-Bolzano. All rights reserved.