@Override public IQTree transformNonStandardBinaryNonCommutativeNode(IQTree tree, BinaryNonCommutativeOperatorNode rootNode, IQTree leftChild, IQTree rightChild) { return transformBinaryNonCommutativeNode(rootNode.acceptNodeTransformer(nodeTransformer), leftChild, rightChild); }
@Override public IQTree acceptTransformer(IQTreeVisitingTransformer transformer) { return getRootNode().acceptTransformer(this, transformer, leftChild, rightChild); }
@Override public ImmutableSet<ImmutableSubstitution<NonVariableTerm>> getPossibleVariableDefinitions() { if (possibleVariableDefinitions == null) possibleVariableDefinitions = getRootNode().getPossibleVariableDefinitions(leftChild, rightChild); return possibleVariableDefinitions; }
@Override public VariableNullability getVariableNullability() { if (variableNullability == null) variableNullability = getRootNode().getVariableNullability(leftChild, rightChild); return variableNullability; }
@Override public IQTree propagateDownConstraint(ImmutableExpression constraint) { return getRootNode().propagateDownConstraint(constraint, leftChild, rightChild); }
@Override public IQTree liftIncompatibleDefinitions(Variable variable) { return getRootNode().liftIncompatibleDefinitions(variable, leftChild, rightChild); }
@Override public boolean isConstructed(Variable variable) { return getVariables().contains(variable) && getRootNode().isConstructed(variable, leftChild, rightChild); }
@Override public IQTree applyDescendingSubstitution( ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution, Optional<ImmutableExpression> constraint) { try { return normalizeDescendingSubstitution(descendingSubstitution) .map(s -> getRootNode().applyDescendingSubstitution(s, constraint, leftChild, rightChild)) .orElseGet(() -> constraint .map(this::propagateDownConstraint) .orElse(this)); } catch (IQTreeTools.UnsatisfiableDescendingSubstitutionException e) { return iqFactory.createEmptyNode(iqTreeTools.computeNewProjectedVariables(descendingSubstitution, getVariables())); } }
@Override public IQTree liftBinding(VariableGenerator variableGenerator) { IQProperties properties = getProperties(); if (properties.isLifted()) return this; return getRootNode().liftBinding(leftChild, rightChild, variableGenerator, properties); }
@Override public IQTree applyDescendingSubstitutionWithoutOptimizing(ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution) { try { return normalizeDescendingSubstitution(descendingSubstitution) .map(s -> getRootNode().applyDescendingSubstitutionWithoutOptimizing(s, leftChild, rightChild)) .orElse(this); } catch (IQTreeTools.UnsatisfiableDescendingSubstitutionException e) { return iqFactory.createEmptyNode(iqTreeTools.computeNewProjectedVariables(descendingSubstitution, getVariables())); } }