@Override public void addDifferent(final ATermAppl x, final ATermAppl y) { final Individual ind1 = getIndividual(x); final Individual ind2 = getIndividual(y); final ATermAppl diffAxiom = ATermUtils.makeDifferent(x, y); // update syntactic assertions - currently i do not add this to the // dependency _index // now, as it will simply be used during the completion _strategy if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getSyntacticAssertions().add(diffAxiom); // ind1.setDifferent(ind2, new // DependencySet(explanationTable.getCurrent())); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(diffAxiom) : DependencySet.INDEPENDENT; // Temporarily reset the _branch so that this assertion survives resets final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); ind1.setDifferent(ind2, ds); setBranchIndex(remember); }
@Override public void addDifferent(final ATermAppl x, final ATermAppl y) { final Individual ind1 = getIndividual(x); final Individual ind2 = getIndividual(y); final ATermAppl diffAxiom = ATermUtils.makeDifferent(x, y); // update syntactic assertions - currently i do not add this to the // dependency _index // now, as it will simply be used during the completion _strategy if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getSyntacticAssertions().add(diffAxiom); // ind1.setDifferent(ind2, new // DependencySet(explanationTable.getCurrent())); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(diffAxiom) : DependencySet.INDEPENDENT; // Temporarily reset the _branch so that this assertion survives resets final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); ind1.setDifferent(ind2, ds); setBranchIndex(remember); }
@Override public void addAllDifferent(final ATermList list) { final ATermAppl allDifferent = ATermUtils.makeAllDifferent(list); ATermList outer = list; while (!outer.isEmpty()) { ATermList inner = outer.getNext(); while (!inner.isEmpty()) { final Individual ind1 = getIndividual(outer.getFirst()); final Individual ind2 = getIndividual(inner.getFirst()); // update syntactic assertions - currently i do not add this to the dependency index // now, as it will be added during the actual merge when the completion is performed if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getSyntacticAssertions().add(allDifferent); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(allDifferent) : DependencySet.INDEPENDENT; final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); ind1.setDifferent(ind2, ds); setBranchIndex(remember); inner = inner.getNext(); } outer = outer.getNext(); } }
@Override public void addAllDifferent(final ATermList list) { final ATermAppl allDifferent = ATermUtils.makeAllDifferent(list); ATermList outer = list; while (!outer.isEmpty()) { ATermList inner = outer.getNext(); while (!inner.isEmpty()) { final Individual ind1 = getIndividual(outer.getFirst()); final Individual ind2 = getIndividual(inner.getFirst()); // update syntactic assertions - currently i do not add this to the dependency index // now, as it will be added during the actual merge when the completion is performed if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getSyntacticAssertions().add(allDifferent); final DependencySet ds = OpenlletOptions.USE_TRACING ? new DependencySet(allDifferent) : DependencySet.INDEPENDENT; final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); ind1.setDifferent(ind2, ds); setBranchIndex(remember); inner = inner.getNext(); } outer = outer.getNext(); } }
y[c1] = y[c1].getSame(); for (int c2 = 0; c2 < c1; c2++) y[c1].setDifferent(y[c2], ds);
y[c1] = y[c1].getSame(); for (int c2 = 0; c2 < c1; c2++) y[c1].setDifferent(y[c2], ds);