private void runRecursively(final Taxonomy<ATermAppl> t, final ATermAppl downMonotonic, final ATermAppl rootCandidate, final ResultBinding binding, final Set<ATermAppl> toDo, final boolean direct, final boolean strict) { final int size = _result.size(); _logger.fine(() -> "Trying : " + rootCandidate + ", done=" + toDo); if (!strict) { toDo.remove(rootCandidate); runNext(binding, Collections.singletonList(downMonotonic), rootCandidate); } if (strict || _result.size() > size) { // final Set<ATermAppl> subs = t.getSFlattenedSubs(rootCandidate, // direct); final Set<ATermAppl> subs = flatten(t.getSubs(rootCandidate, direct)); for (final ATermAppl subject : subs) { if (!toDo.contains(subject)) continue; runRecursively(t, downMonotonic, subject, binding, toDo, false, false); } } else { _logger.fine(() -> "Skipping subs of " + rootCandidate); // toDo.removeAll(t.getFlattenedSubs(rootCandidate, false)); toDo.removeAll(flatten(t.getSubs(rootCandidate, false))); } }
private void runRecursively(final Taxonomy<ATermAppl> t, final ATermAppl downMonotonic, final ATermAppl rootCandidate, final ResultBinding binding, final Set<ATermAppl> toDo, final boolean direct, final boolean strict) { final int size = _result.size(); _logger.fine(() -> "Trying : " + rootCandidate + ", done=" + toDo); if (!strict) { toDo.remove(rootCandidate); runNext(binding, Collections.singletonList(downMonotonic), rootCandidate); } if (strict || _result.size() > size) { // final Set<ATermAppl> subs = t.getSFlattenedSubs(rootCandidate, // direct); final Set<ATermAppl> subs = flatten(t.getSubs(rootCandidate, direct)); for (final ATermAppl subject : subs) { if (!toDo.contains(subject)) continue; runRecursively(t, downMonotonic, subject, binding, toDo, false, false); } } else { _logger.fine(() -> "Skipping subs of " + rootCandidate); // toDo.removeAll(t.getFlattenedSubs(rootCandidate, false)); toDo.removeAll(flatten(t.getSubs(rootCandidate, false))); } }
private void runRecursively(final Taxonomy<ATermAppl> t, final ATermAppl downMonotonic, final ATermAppl rootCandidate, final ResultBinding binding, final Set<ATermAppl> toDo, final boolean direct, final boolean strict) { final int size = _result.size(); _logger.fine(() -> "Trying : " + rootCandidate + ", done=" + toDo); if (!strict) { toDo.remove(rootCandidate); runNext(binding, Collections.singletonList(downMonotonic), rootCandidate); } if (strict || _result.size() > size) { // final Set<ATermAppl> subs = t.getSFlattenedSubs(rootCandidate, // direct); final Set<ATermAppl> subs = flatten(t.getSubs(rootCandidate, direct)); for (final ATermAppl subject : subs) { if (!toDo.contains(subject)) continue; runRecursively(t, downMonotonic, subject, binding, toDo, false, false); } } else { _logger.fine(() -> "Skipping subs of " + rootCandidate); // toDo.removeAll(t.getFlattenedSubs(rootCandidate, false)); toDo.removeAll(flatten(t.getSubs(rootCandidate, false))); } }
if (instanceCandidates != null) for (final ATermAppl inst : instanceCandidates) runNext(binding, arguments, inst, cls); runNext(binding, arguments, property, property, property); runNext(binding, arguments, i, property, i); runNext(binding, arguments, property, property, i); runNext(binding, arguments, i, property, property); runNext(binding, arguments, subject, property, object); for (final ATermAppl subject : subjectCandidates) for (final ATermAppl object : _kb.getPropertyValues(property, subject)) runNext(binding, arguments, subject, property, object); runNext(binding, arguments, subject, property, object); for (final ATermAppl property : propertyCandidates) for (final ATermAppl object : _kb.getAnnotations(subject, property)) runNext(binding, arguments, subject, property, object); else for (final ATermAppl subject : subjectCandidates) for (final ATermAppl property : propertyCandidates) if (_kb.isAnnotation(subject, property, aIL)) runNext(binding, arguments, subject, property, aIL);
if (instanceCandidates != null) for (final ATermAppl inst : instanceCandidates) runNext(binding, arguments, inst, cls); runNext(binding, arguments, property, property, property); runNext(binding, arguments, i, property, i); runNext(binding, arguments, property, property, i); runNext(binding, arguments, i, property, property); runNext(binding, arguments, subject, property, object); for (final ATermAppl subject : subjectCandidates) for (final ATermAppl object : _kb.getPropertyValues(property, subject)) runNext(binding, arguments, subject, property, object); runNext(binding, arguments, subject, property, object); for (final ATermAppl property : propertyCandidates) for (final ATermAppl object : _kb.getAnnotations(subject, property)) runNext(binding, arguments, subject, property, object); else for (final ATermAppl subject : subjectCandidates) for (final ATermAppl property : propertyCandidates) if (_kb.isAnnotation(subject, property, aIL)) runNext(binding, arguments, subject, property, aIL);
if (instanceCandidates != null) for (final ATermAppl inst : instanceCandidates) runNext(binding, arguments, inst, cls); runNext(binding, arguments, property, property, property); runNext(binding, arguments, i, property, i); runNext(binding, arguments, property, property, i); runNext(binding, arguments, i, property, property); runNext(binding, arguments, subject, property, object); for (final ATermAppl subject : subjectCandidates) for (final ATermAppl object : _kb.getPropertyValues(property, subject)) runNext(binding, arguments, subject, property, object); runNext(binding, arguments, subject, property, object); for (final ATermAppl property : propertyCandidates) for (final ATermAppl object : _kb.getAnnotations(subject, property)) runNext(binding, arguments, subject, property, object); else for (final ATermAppl subject : subjectCandidates) for (final ATermAppl property : propertyCandidates) if (_kb.isAnnotation(subject, property, aIL)) runNext(binding, arguments, subject, property, aIL);