/** * Restore a clash dependency * * @param assertion * @param clash */ private void restoreClash(final ATermAppl assertion, final ClashDependency clash) { DependencyIndex._logger.fine(() -> " Restoring clash dependency clash: " + clash.getClash()); clash.getClash().getDepends().removeExplain(assertion); // remove the dependency if (clash.getClash().getDepends().getExplain().isEmpty() && clash.getClash().getDepends().isIndependent()) // undo clash if empty and is independent { DependencyIndex._logger.fine(() -> " Actually removing clash!"); _kb.getABox().setClash(null); } }
/** * Restore a clash dependency * * @param assertion * @param clash */ private void restoreClash(final ATermAppl assertion, final ClashDependency clash) { DependencyIndex._logger.fine(() -> " Restoring clash dependency clash: " + clash.getClash()); clash.getClash().getDepends().removeExplain(assertion); // remove the dependency if (clash.getClash().getDepends().getExplain().isEmpty() && clash.getClash().getDepends().isIndependent()) // undo clash if empty and is independent { DependencyIndex._logger.fine(() -> " Actually removing clash!"); _kb.getABox().setClash(null); } }
/** * Restore a branch add dependency * * @param assertion * @param branch */ private void restoreBranchAdd(final ATermAppl assertion, final AddBranchDependency branch) { DependencyIndex._logger.fine(() -> " Removing branch add? " + branch.getBranch()); final DependencySet ds = branch.getBranch().getTermDepends(); // get merge dependency ds.removeExplain(assertion); // remove the dependency if (ds.getExplain().isEmpty()) // undo merge if empty { DependencyIndex._logger.fine(" Actually removing branch!"); final ABox abox = _kb.getABox(); phase1(branch, abox); // TODO rename this function when you find the its semantic. if (OpenlletOptions.TRACK_BRANCH_EFFECTS) abox.getBranchEffectTracker().remove(branch.getBranch().getBranchIndexInABox() + 1); updateBranchesOfABox(branch, abox); // Next update abox branches abox.setBranchIndex(abox.getBranchIndex() - 1); // set the branch counter } }
/** * Restore a branch add dependency * * @param assertion * @param branch */ private void restoreBranchAdd(final ATermAppl assertion, final AddBranchDependency branch) { DependencyIndex._logger.fine(() -> " Removing branch add? " + branch.getBranch()); final DependencySet ds = branch.getBranch().getTermDepends(); // get merge dependency ds.removeExplain(assertion); // remove the dependency if (ds.getExplain().isEmpty()) // undo merge if empty { DependencyIndex._logger.fine(" Actually removing branch!"); final ABox abox = _kb.getABox(); phase1(branch, abox); // TODO rename this function when you find the its semantic. if (OpenlletOptions.TRACK_BRANCH_EFFECTS) abox.getBranchEffectTracker().remove(branch.getBranch().getBranchIndexInABox() + 1); updateBranchesOfABox(branch, abox); // Next update abox branches abox.setBranchIndex(abox.getBranchIndex() - 1); // set the branch counter } }
ds.removeExplain(assertion); // clean it
ds.removeExplain(assertion); // clean it
ds.removeExplain(assertion);
ds.removeExplain(assertion);
ds.removeExplain(assertion); // remove the dependency
ds.removeExplain(assertion); // remove the dependency