default boolean isAsymmetricProperty(final ATermAppl p) { if (null == p) return false; final Role role = getRole(p); if (role == null) { Base.handleUndefinedEntity(p + _isNotAnKnowProperty); return false; } if (!role.isObjectRole()) return false; else if (role.isAsymmetric()) { if (doExplanation()) getABox().setExplanation(role.getExplainAsymmetric()); return true; } ensureConsistency(); final ATermAppl o = ATermUtils.makeAnonNominal(Integer.MAX_VALUE); final ATermAppl nom = ATermUtils.makeValue(o); final ATermAppl test = ATermUtils.makeAnd(nom, ATermUtils.makeSomeValues(p, ATermUtils.makeAnd(ATermUtils.makeNot(nom), ATermUtils.makeSomeValues(p, nom)))); return !getABox().isSatisfiable(test); }
default boolean isAsymmetricProperty(final ATermAppl p) { if (null == p) return false; final Role role = getRole(p); if (role == null) { Base.handleUndefinedEntity(p + _isNotAnKnowProperty); return false; } if (!role.isObjectRole()) return false; else if (role.isAsymmetric()) { if (doExplanation()) getABox().setExplanation(role.getExplainAsymmetric()); return true; } ensureConsistency(); final ATermAppl o = ATermUtils.makeAnonNominal(Integer.MAX_VALUE); final ATermAppl nom = ATermUtils.makeValue(o); final ATermAppl test = ATermUtils.makeAnd(nom, ATermUtils.makeSomeValues(p, ATermUtils.makeAnd(ATermUtils.makeNot(nom), ATermUtils.makeSomeValues(p, nom)))); return !getABox().isSatisfiable(test); }
default boolean isIrreflexiveProperty(final ATermAppl p) { if (null == p) return false; final Role role = getRole(p); if (role == null) { Base.handleUndefinedEntity(p + _isNotAnKnowProperty); return false; } if (!role.isObjectRole() || role.isReflexive()) return false; else if (role.isIrreflexive()) { if (doExplanation()) getABox().setExplanation(role.getExplainIrreflexive()); return true; } else if (role.isAsymmetric()) { if (doExplanation()) getABox().setExplanation(role.getExplainAsymmetric()); return true; } ensureConsistency(); final ATermAppl test = ATermUtils.makeSelf(p); return !getABox().isSatisfiable(test); }
default boolean isIrreflexiveProperty(final ATermAppl p) { if (null == p) return false; final Role role = getRole(p); if (role == null) { Base.handleUndefinedEntity(p + _isNotAnKnowProperty); return false; } if (!role.isObjectRole() || role.isReflexive()) return false; else if (role.isIrreflexive()) { if (doExplanation()) getABox().setExplanation(role.getExplainIrreflexive()); return true; } else if (role.isAsymmetric()) { if (doExplanation()) getABox().setExplanation(role.getExplainAsymmetric()); return true; } ensureConsistency(); final ATermAppl test = ATermUtils.makeSelf(p); return !getABox().isSatisfiable(test); }
role.setFunctional(true, invR.getExplainInverseFunctional()); if (invR.isAsymmetric() && !role.isAsymmetric()) role.setAsymmetric(true, invR.getExplainAsymmetric()); if (role.isAsymmetric() && !invR.isAsymmetric()) invR.setAsymmetric(true, role.getExplainAsymmetric()); if (invR.isReflexive() && !role.isReflexive()) role.setReflexive(true, invR.getExplainReflexive()); final DependencySet ds = OpenlletOptions.USE_TRACING ? supDS.union(s.getExplainAsymmetric(), true) : DependencySet.INDEPENDENT; r.setAsymmetric(true, ds);
role.setFunctional(true, invR.getExplainInverseFunctional()); if (invR.isAsymmetric() && !role.isAsymmetric()) role.setAsymmetric(true, invR.getExplainAsymmetric()); if (role.isAsymmetric() && !invR.isAsymmetric()) invR.setAsymmetric(true, role.getExplainAsymmetric()); if (invR.isReflexive() && !role.isReflexive()) role.setReflexive(true, invR.getExplainReflexive()); final DependencySet ds = OpenlletOptions.USE_TRACING ? supDS.union(s.getExplainAsymmetric(), true) : DependencySet.INDEPENDENT; r.setAsymmetric(true, ds);
public void checkReflexivitySymmetry(final Individual subj, final Role pred, final Individual obj, final DependencySet dsParam) { DependencySet ds = dsParam; if (pred.isAsymmetric() && obj.hasRSuccessor(pred, subj)) { final EdgeList edges = obj.getEdgesTo(subj, pred); ds = ds.union(edges.get(0).getDepends(), _abox.doExplanation()); if (OpenlletOptions.USE_TRACING) ds = ds.union(pred.getExplainAsymmetric(), _abox.doExplanation()); _abox.setClash(Clash.unexplained(subj, ds, "Antisymmetric property " + pred)); } else if (subj.equals(obj)) if (pred.isIrreflexive()) _abox.setClash(Clash.unexplained(subj, ds.union(pred.getExplainIrreflexive(), _abox.doExplanation()), "Irreflexive property " + pred)); else { final ATerm notSelfP = ATermUtils.makeNot(ATermUtils.makeSelf(pred.getName())); if (subj.hasType(notSelfP)) _abox.setClash(Clash.unexplained(subj, ds.union(subj.getDepends(notSelfP), _abox.doExplanation()), "Local irreflexive property " + pred)); } }
public void checkReflexivitySymmetry(final Individual subj, final Role pred, final Individual obj, final DependencySet dsParam) { DependencySet ds = dsParam; if (pred.isAsymmetric() && obj.hasRSuccessor(pred, subj)) { final EdgeList edges = obj.getEdgesTo(subj, pred); ds = ds.union(edges.get(0).getDepends(), _abox.doExplanation()); if (OpenlletOptions.USE_TRACING) ds = ds.union(pred.getExplainAsymmetric(), _abox.doExplanation()); _abox.setClash(Clash.unexplained(subj, ds, "Antisymmetric property " + pred)); } else if (subj.equals(obj)) if (pred.isIrreflexive()) _abox.setClash(Clash.unexplained(subj, ds.union(pred.getExplainIrreflexive(), _abox.doExplanation()), "Irreflexive property " + pred)); else { final ATerm notSelfP = ATermUtils.makeNot(ATermUtils.makeSelf(pred.getName())); if (subj.hasType(notSelfP)) _abox.setClash(Clash.unexplained(subj, ds.union(subj.getDepends(notSelfP), _abox.doExplanation()), "Local irreflexive property " + pred)); } }