Class SourceTargetRewriter
java.lang.Object
fr.inria.rules.integraal.backward_chaining.source_target.SourceTargetRewriter
- All Implemented Interfaces:
BackwardChainingAlgorithm
This operator rewrites a query with the given rules assuming the rules are
source to target rules meaning that the vocabulary of the initial query and
the rewritings will be totally disjoint. This let us rewrite with mapping
rules in a single step This implementation uses DLX algorithm (Dancing links)
to compute a full cover of the query using single piece unifiers.
The given query must represent a CQ or UCQ. That is, a conjunction of atoms without negation (CQ) or a union of CQ (UCQ) with the same answer variables.
The given query must represent a CQ or UCQ. That is, a conjunction of atoms without negation (CQ) or a union of CQ (UCQ) with the same answer variables.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new SourceTargetOperator using default parameters query unifier algorithm : QueryUnifierAlgorithmSourceTargetRewriter(QueryUnifierAlgorithm queryUnifierAlgorithm) Creates a new SourceTargetOperator using the given parameters -
Method Summary
Modifier and TypeMethodDescriptionExecute the algorithmrewrite(UnionFOQuery queries, RuleBase rules) Execute the algorithm
-
Constructor Details
-
SourceTargetRewriter
public SourceTargetRewriter()Creates a new SourceTargetOperator using default parameters query unifier algorithm : QueryUnifierAlgorithm -
SourceTargetRewriter
Creates a new SourceTargetOperator using the given parameters- Parameters:
queryUnifierAlgorithm- the query unifier algorithm to use
-
-
Method Details
-
rewrite
Description copied from interface:BackwardChainingAlgorithmExecute the algorithm- Specified by:
rewritein interfaceBackwardChainingAlgorithm- Parameters:
queries- the ucq to rewriterules- the rules with which to rewrite the query- Returns:
- the union of all rewritings of the queries with the rules
-
rewrite
Description copied from interface:BackwardChainingAlgorithmExecute the algorithm- Specified by:
rewritein interfaceBackwardChainingAlgorithm- Parameters:
query- the query to rewriterules- the rules with which to rewrite the query- Returns:
- the union of all rewritings of the query with the rules
-