@Override public Bool isKnownType(final ATermAppl x, final ATermAppl c) { return isKnownType(x, c, Collections.emptySet()); }
@Override public Bool isKnownType(final ATermAppl x, final ATermAppl c) { return isKnownType(x, c, Collections.emptySet()); }
@Override public CandidateSet<ATermAppl> getObviousInstances(final ATermAppl cParam, final Collection<ATermAppl> individuals) { ATermAppl c = cParam; c = ATermUtils.normalize(c); final Set<ATermAppl> subs = _kb.isClassified() && _kb.getTaxonomy().contains(c) ? _kb.getTaxonomy().getFlattenedSubs(c, false) : Collections.<ATermAppl> emptySet(); subs.remove(ATermUtils.BOTTOM); final CandidateSet<ATermAppl> cs = new CandidateSet<>(); for (final ATermAppl x : individuals) { final Bool isType = isKnownType(x, c, subs); cs.add(x, isType); } return cs; }
@Override public CandidateSet<ATermAppl> getObviousInstances(final ATermAppl cParam, final Collection<ATermAppl> individuals) { ATermAppl c = cParam; c = ATermUtils.normalize(c); final Set<ATermAppl> subs = _kb.isClassified() && _kb.getTaxonomy().contains(c) ? _kb.getTaxonomy().getFlattenedSubs(c, false) : Collections.<ATermAppl> emptySet(); subs.remove(ATermUtils.BOTTOM); final CandidateSet<ATermAppl> cs = new CandidateSet<>(); for (final ATermAppl x : individuals) { final Bool isType = isKnownType(x, c, subs); cs.add(x, isType); } return cs; }
subs = Collections.emptySet(); final Bool type = isKnownType(x, c, subs); if (type.isKnown()) return type.isTrue();
subs = Collections.emptySet(); final Bool type = isKnownType(x, c, subs); if (type.isKnown()) return type.isTrue();
@Override public Bool isKnownType(final ATermAppl x, final ATermAppl c, final Collection<ATermAppl> subs) { assert isComplete() : "Initial consistency check has not been performed!"; Individual pNode = getIndividual(x); boolean isIndependent = true; if (pNode.isMerged()) { isIndependent = pNode.getMergeDependency(true).isIndependent(); pNode = pNode.getSame(); } final Bool isType = isKnownType(pNode, c, subs); if (isIndependent) return isType; else if (isType.isTrue()) return Bool.UNKNOWN; else return isType; }
@Override public Bool isKnownType(final ATermAppl x, final ATermAppl c, final Collection<ATermAppl> subs) { assert isComplete() : "Initial consistency check has not been performed!"; Individual pNode = getIndividual(x); boolean isIndependent = true; if (pNode.isMerged()) { isIndependent = pNode.getMergeDependency(true).isIndependent(); pNode = pNode.getSame(); } final Bool isType = isKnownType(pNode, c, subs); if (isIndependent) return isType; else if (isType.isTrue()) return Bool.UNKNOWN; else return isType; }
knownType = isKnownType(pNode, term, Collections.emptySet());
knownType = isKnownType(pNode, term, Collections.emptySet());