/** * @return true if there is no dependency on a non-deterministic _branch */ public boolean isIndependent() { return max() <= 0; }
/** * @return true if there is no dependency on a non-deterministic _branch */ public boolean isIndependent() { return max() <= 0; }
public int getBranch() { return _ds.max(); } }
public int getBranch() { return _ds.max(); } }
public boolean dependsOn(final int branch) { return getDepends().max() > branch; }
public boolean dependsOn(final int branch) { return getDepends().max() > branch; }
private static void sortDisjunctions(final Individual node, final ATermAppl[] disjunctions) { if (OpenlletOptions.USE_DISJUNCTION_SORTING == OpenlletOptions.OLDEST_FIRST) { final Comparator<ATermAppl> comparator = (d1, d2) -> node.getDepends(d1).max() - node.getDepends(d2).max(); Arrays.sort(disjunctions, comparator); } else throw new InternalReasonerException("Unknown _disjunction sorting option " + OpenlletOptions.USE_DISJUNCTION_SORTING); }
private static void sortDisjunctions(final Individual node, final ATermAppl[] disjunctions) { if (OpenlletOptions.USE_DISJUNCTION_SORTING == OpenlletOptions.OLDEST_FIRST) { final Comparator<ATermAppl> comparator = (d1, d2) -> node.getDepends(d1).max() - node.getDepends(d2).max(); Arrays.sort(disjunctions, comparator); } else throw new InternalReasonerException("Unknown _disjunction sorting option " + OpenlletOptions.USE_DISJUNCTION_SORTING); }
@Override public void setClash(final Clash clash) { if (clash != null) { if (_logger.isLoggable(Level.FINER)) { _logger.finer("CLSH: " + clash); if (clash.getDepends().max() > _branchIndex && _branchIndex != -1) _logger.severe("Invalid _clash dependency " + clash + " > " + _branchIndex); } if (_branchIndex == DependencySet.NO_BRANCH && clash.getDepends().getBranch() == DependencySet.NO_BRANCH) _assertedClashes.add(clash); if (_clash != null) { _logger.finer(() -> "Clash was already set \nExisting: " + _clash + "\nNew : " + clash); if (_clash.getDepends().max() < clash.getDepends().max()) return; } } _clash = clash; // CHW - added for incremental deletions if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getDependencyIndex().setClashDependencies(_clash); }
@Override public void setClash(final Clash clash) { if (clash != null) { if (_logger.isLoggable(Level.FINER)) { _logger.finer("CLSH: " + clash); if (clash.getDepends().max() > _branchIndex && _branchIndex != -1) _logger.severe("Invalid _clash dependency " + clash + " > " + _branchIndex); } if (_branchIndex == DependencySet.NO_BRANCH && clash.getDepends().getBranch() == DependencySet.NO_BRANCH) _assertedClashes.add(clash); if (_clash != null) { _logger.finer(() -> "Clash was already set \nExisting: " + _clash + "\nNew : " + clash); if (_clash.getDepends().max() < clash.getDepends().max()) return; } } _clash = clash; // CHW - added for incremental deletions if (OpenlletOptions.USE_INCREMENTAL_DELETION) _kb.getDependencyIndex().setClashDependencies(_clash); }
final int lastBranch = _abox.getClash().getDepends().max();
final int lastBranch = _abox.getClash().getDepends().max();
_logger.fine("RESTORE: " + _name + " remove edge " + e + " " + d.max() + " " + branch); i.remove();
protected DependencySet forceAddType(final ATermAppl c, final DependencySet ds) { // add to effected list if (OpenlletOptions.TRACK_BRANCH_EFFECTS && _abox.getBranchIndex() >= 0) _abox.getBranchEffectTracker().add(_abox.getBranchIndex(), getName()); // if we are checking entailment using a precompleted ABox, _abox.branch // is set to -1. however, since applyAllValues is done automatically // and the edge used in applyAllValues may depend on a _branch we want // this type to be deleted when that edge goes away, i.e. we backtrack // to a position before the max dependency of this type int b = _abox.getBranchIndex(); final int max = ds.max(); if (b == -1 && max != 0) b = max + 1; final DependencySet out = ds.copy(b); _depends.put(c, out); _abox.setChanged(true); return out; }
protected DependencySet forceAddType(final ATermAppl c, final DependencySet ds) { // add to effected list if (OpenlletOptions.TRACK_BRANCH_EFFECTS && _abox.getBranchIndex() >= 0) _abox.getBranchEffectTracker().add(_abox.getBranchIndex(), getName()); // if we are checking entailment using a precompleted ABox, _abox.branch // is set to -1. however, since applyAllValues is done automatically // and the edge used in applyAllValues may depend on a _branch we want // this type to be deleted when that edge goes away, i.e. we backtrack // to a position before the max dependency of this type int b = _abox.getBranchIndex(); final int max = ds.max(); if (b == -1 && max != 0) b = max + 1; final DependencySet out = ds.copy(b); _depends.put(c, out); _abox.setChanged(true); return out; }
_logger.fine("RESTORE: " + _name + " remove edge " + e + " " + d.max() + " " + branch); i.remove();