/** * Add a new literal to the ABox. Literal will be assigned a fresh unique name. * * @param dataValue A literal ATerm which should be constructed with one of ATermUtils.makeXXXLiteral functions * @return Literal object that has been created */ @Override public Literal addLiteral(final ATermAppl dataValue) { final int remember = getBranchIndex(); setBranchIndex(DependencySet.NO_BRANCH); final Literal lit = addLiteral(dataValue, DependencySet.INDEPENDENT); setBranchIndex(remember); return lit; }
/** * Add a new literal to the ABox. Literal will be assigned a fresh unique name. * * @param dataValue A literal ATerm which should be constructed with one of ATermUtils.makeXXXLiteral functions * @return Literal object that has been created */ @Override public Literal addLiteral(final ATermAppl dataValue) { final int remember = getBranchIndex(); setBranchIndex(DependencySet.NO_BRANCH); final Literal lit = addLiteral(dataValue, DependencySet.INDEPENDENT); setBranchIndex(remember); return lit; }
@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); }
_keepLastCompletion = false; setBranchIndex(DependencySet.NO_BRANCH); _branches = new ArrayList<>(); _disjBranchStats = Collections.synchronizedMap(new IdentityHashMap<>());
setBranchIndex(DependencySet.NO_BRANCH); _branches.clear(); _disjBranchStats.clear();
_keepLastCompletion = false; setBranchIndex(DependencySet.NO_BRANCH); _branches = new ArrayList<>(); _disjBranchStats = Collections.synchronizedMap(new IdentityHashMap<>());
setBranchIndex(DependencySet.NO_BRANCH); _branches.clear(); _disjBranchStats.clear();
@Override public void addType(final ATermAppl x, final ATermAppl cParam, final DependencySet dsParam) { ATermAppl c = cParam; DependencySet ds = dsParam; c = ATermUtils.normalize(c); // when a type is being added to // an ABox that has already been completed, the _branch // of the dependency set will automatically be set to // the _current _branch. We need to set it to the initial // _branch number to make sure that this type assertion // will not be removed during backtracking final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); Individual node = getIndividual(x); node.addType(c, ds, false); while (node.isMerged()) { ds = ds.union(node.getMergeDependency(false), _doExplanation); node = (Individual) node.getMergedTo(); node.addType(c, ds, !node.isMerged()); } setBranchIndex(remember); }
@Override public void addType(final ATermAppl x, final ATermAppl cParam, final DependencySet dsParam) { ATermAppl c = cParam; DependencySet ds = dsParam; c = ATermUtils.normalize(c); // when a type is being added to // an ABox that has already been completed, the _branch // of the dependency set will automatically be set to // the _current _branch. We need to set it to the initial // _branch number to make sure that this type assertion // will not be removed during backtracking final int remember = _branchIndex; setBranchIndex(DependencySet.NO_BRANCH); Individual node = getIndividual(x); node.addType(c, ds, false); while (node.isMerged()) { ds = ds.union(node.getMergeDependency(false), _doExplanation); node = (Individual) node.getMergedTo(); node.addType(c, ds, !node.isMerged()); } setBranchIndex(remember); }
setBranchIndex(abox._branchIndex); _branches = new ArrayList<>(abox._branches.size()); for (int i = 0, n = abox._branches.size(); i < n; i++) setBranchIndex(DependencySet.NO_BRANCH); _branches = new ArrayList<>();
@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(); } }
setBranchIndex(abox._branchIndex); _branches = new ArrayList<>(abox._branches.size()); for (int i = 0, n = abox._branches.size(); i < n; i++) setBranchIndex(DependencySet.NO_BRANCH); _branches = new ArrayList<>();
setBranchIndex(DependencySet.NO_BRANCH); lit.addType(ATermUtils.TOP_LIT, ds); setBranchIndex(remember);
setBranchIndex(DependencySet.NO_BRANCH); lit.addType(ATermUtils.TOP_LIT, ds); setBranchIndex(remember);