Interface QueryUnifier
- All Known Implementing Classes:
QueryUnifierImpl
public interface QueryUnifier
A unifier of a query Q with a rule R is a triple u(Q', H', P)
where Q' is a subset of Q
H' is a subset of head(R)
P is a partition of the terms of Q' and H'
It describes how to unify a piece of a query with a part of a head FORule in order to rewrite the fact according to the FORule
It describes how to unify a piece of a query with a part of a head FORule in order to rewrite the fact according to the FORule
- Author:
- Guillaume Pérution-Kihli, Florent Tornil
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new unifier corresponding to the aggregation of this unifier and the given onedefault FOQuery<?> Rewrite the query with the unifierReturns the substitution associated to this unifier.Returns the image of a formula under this unifier substitution.Not used yetReturns the term partition that realizes the unification.FOQuery<?> getQuery()Not used yetgetRule()Not used yetReturns the part of the query unified by this unifier.booleanIf the pieces of the two unifiers have atom in common the unifiers are not compatible Otherwise check if the two partition of the unifiers are possible to joinCreates a new unifier corresponding to the aggregation of this unifier and the given one Also assure that the unifiers are on a different set of variables, renaming the given one if necessary Return the aggregated unifier if possible or an empty optional if the unifiers are not compatible
-
Method Details
-
getQuery
-
getRule
-
getUnifiedQueryPart
FOFormula getUnifiedQueryPart()Returns the part of the query unified by this unifier.- Returns:
- the part of the query that is unified by this unifier
-
getPartition
TermPartition getPartition()Returns the term partition that realizes the unification.- Returns:
- the partition that unify the piece and a part of the head FORule
-
getInitialFORules
-
getImageOf
-
getAssociatedSubstitution
Substitution getAssociatedSubstitution()Returns the substitution associated to this unifier.- Returns:
- the substitution associated to this unifier
-
safeAggregate
Creates a new unifier corresponding to the aggregation of this unifier and the given one Also assure that the unifiers are on a different set of variables, renaming the given one if necessary Return the aggregated unifier if possible or an empty optional if the unifiers are not compatible- Parameters:
u- unifier to aggregate- Returns:
- the aggregation of the given unifier and the receiving unifier
-
aggregate
Creates a new unifier corresponding to the aggregation of this unifier and the given one- Parameters:
u- unifier to aggregate- Returns:
- the aggregation of the given unifier and the receiving unifier
-
isCompatible
If the pieces of the two unifiers have atom in common the unifiers are not compatible Otherwise check if the two partition of the unifiers are possible to join- Parameters:
u- unifier to check compatibility with- Returns:
- true iff this unifier is compatible with the given unifier
-
apply
-