/** * TODO: explain */ private FocusNodeUpdate generateUpdate4DataNode(DataNode originalDataNode, ImmutableMap<Integer, VariableRenaming> renamingMap) { DataAtom newAtom = generateNewStandardDataAtom(originalDataNode, renamingMap); DataNode newDataNode = originalDataNode.newAtom(newAtom); return new FocusNodeUpdate(newDataNode, Optional.<InjectiveVar2VarSubstitution>empty(), convertIntoEqualities(renamingMap)); }
protected static <T extends DataNode> SubstitutionResults<T> applySubstitution( T dataNode, ImmutableSubstitution<? extends ImmutableTerm> substitution) { DataAtom newAtom = substitution.applyToDataAtom(dataNode.getProjectionAtom()); T newNode = (T) dataNode.newAtom(newAtom); return DefaultSubstitutionResults.newNode(newNode, substitution); }
DataNode newRightChild = rightChild.newAtom(localSubstitution.applyToDataAtom(rightChild.getProjectionAtom())); treeComponent.replaceNode(rightChild, newRightChild);
DataNode newRightChild = rightChild.newAtom(localSubstitution.applyToDataAtom(rightChild.getProjectionAtom())); treeComponent.replaceNode(rightChild, newRightChild);
DataNode newRightDataNode = rightDataNode.newAtom(computeNewRightAtom(rightProjectionAtom.getPredicate(), rightArguments, conflictingRightArgumentIndexes, variableGenerator)); ImmutableExpression newExpression = computeExpression(rightArguments,
private IQTree transformDataNode(DataNode dn) { ImmutableList<Optional<Variable>> replacementVars = getArgumentReplacement(dn); if (empt(replacementVars)) return dn; FilterNode filter = createFilter(dn.getProjectionAtom(), replacementVars); DataAtom atom = replaceVars(dn.getProjectionAtom(), replacementVars); return iqFactory.createUnaryIQTree( iqFactory.createConstructionNode(dn.getVariables()), iqFactory.createUnaryIQTree( filter, dn.newAtom(atom)) ); }