Examples of Tableau


Examples of org.semanticweb.HermiT.tableau.Tableau

            OWLTypedLiteral freshConstant=factory.getOWLTypedLiteral("internal:fresh-constant",factory.getOWLDatatype(IRI.create("internal:anonymous-constants")));
            OWLDataProperty negatedSuperDataProperty=factory.getOWLDataProperty(IRI.create("internal:negated-superproperty"));
            OWLAxiom subpropertyAssertion=factory.getOWLDataPropertyAssertionAxiom(subDataProperty,individual,freshConstant);
            OWLAxiom negatedSuperpropertyAssertion=factory.getOWLDataPropertyAssertionAxiom(negatedSuperDataProperty,individual,freshConstant);
            OWLAxiom superpropertyAxiomatization=factory.getOWLDisjointDataPropertiesAxiom(superDataProperty,negatedSuperDataProperty);
            Tableau tableau=getTableau(subpropertyAssertion,negatedSuperpropertyAssertion,superpropertyAxiomatization);
            return !tableau.isSatisfiable(true,null,null,null,null,null,ReasoningTaskDescription.isRoleSubsumedBy(subrole,superrole,false));
        }
    }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

        Set<HierarchyNode<AtomicConcept>> nodes=m_directDataRoleDomains.get(atomicRole);
        if (nodes==null) {
            final Individual freshIndividual=Individual.createAnonymous("fresh-individual");
            final Constant freshConstant=Constant.createAnonymous("fresh-constant");
            final Set<Atom> roleAssertion=Collections.singleton(atomicRole.getRoleAssertion(freshIndividual,freshConstant));
            final Tableau tableau=getTableau();
            HierarchySearch.SearchPredicate<HierarchyNode<AtomicConcept>> searchPredicate=new HierarchySearch.SearchPredicate<HierarchyNode<AtomicConcept>>() {
                public Set<HierarchyNode<AtomicConcept>> getSuccessorElements(HierarchyNode<AtomicConcept> u) {
                    return u.getChildNodes();
                }
                public Set<HierarchyNode<AtomicConcept>> getPredecessorElements(HierarchyNode<AtomicConcept> u) {
                    return u.getParentNodes();
                }
                public boolean trueOf(HierarchyNode<AtomicConcept> u) {
                    AtomicConcept potentialDomainConcept=u.getRepresentative();
                    return !tableau.isSatisfiable(false,roleAssertion,Collections.singleton(Atom.create(potentialDomainConcept,freshIndividual)),null,null,null,ReasoningTaskDescription.isDomainOf(potentialDomainConcept,atomicRole));
                }
            };
            nodes=HierarchySearch.search(searchPredicate,Collections.singleton(m_atomicConceptHierarchy.getTopNode()),null);
            m_directDataRoleDomains.put(atomicRole,nodes);
        }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

            }
            AtomicRole atomicRole=H(propertyExpression.asOWLDataProperty());
            Individual freshIndividual=Individual.create("fresh-individual");
            Constant freshConstant=Constant.createAnonymous("fresh-constant");
            Atom atomicRoleAssertion=atomicRole.getRoleAssertion(freshIndividual,freshConstant);
            Tableau tableau=getTableau();
            Set<HierarchyNode<AtomicRole>> nodesToTest=new HashSet<HierarchyNode<AtomicRole>>();
            nodesToTest.addAll(m_dataRoleHierarchy.getTopNode().getChildNodes());
            while (!nodesToTest.isEmpty()) {
                HierarchyNode<AtomicRole> nodeToTest=nodesToTest.iterator().next();
                nodesToTest.remove(nodeToTest);
                AtomicRole atomicRoleToTest=nodeToTest.getRepresentative();
                Atom atomicRoleToTestAssertion=atomicRoleToTest.getRoleAssertion(freshIndividual,freshConstant);
                Set<Atom> perTestAtoms=new HashSet<Atom>(2);
                perTestAtoms.add(atomicRoleAssertion);
                perTestAtoms.add(atomicRoleToTestAssertion);
                if (!tableau.isSatisfiable(false,perTestAtoms,null,null,null,null,new ReasoningTaskDescription(true,"disjointness of {0} and {1}",atomicRole,atomicRoleToTest))) {
                    // disjoint
                    if (direct)
                        result.add(nodeToTest);
                    else
                        result.addAll(nodeToTest.getDescendantNodes());
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

            return !getTableau().isSatisfiable(true,true,null,Collections.singleton(Atom.create(atomicConcept,individual)),null,null,null,ReasoningTaskDescription.isInstanceOf(individual,atomicConcept));
        }
        else {
            OWLDataFactory factory=getDataFactory();
            OWLAxiom negatedAssertionAxiom=factory.getOWLClassAssertionAxiom(type.getObjectComplementOf(),namedIndividual);
            Tableau tableau=getTableau(negatedAssertionAxiom);
            return !tableau.isSatisfiable(true,true,null,null,null,null,null,ReasoningTaskDescription.isInstanceOf(namedIndividual,type));
        }
    }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

                for (HierarchyNode<AtomicConcept> descendantNode : hierarchyNode.getDescendantNodes())
                    loadIndividualsOfNode(descendantNode,result);
            OWLDataFactory factory=getDataFactory();
            OWLClass queryClass=factory.getOWLClass(IRI.create("internal:query-concept"));
            OWLAxiom queryClassDefinition=factory.getOWLSubClassOfAxiom(queryClass,classExpression.getObjectComplementOf());
            Tableau tableau=getTableau(queryClassDefinition);
            AtomicConcept queryConcept=AtomicConcept.create("internal:query-concept");
            Set<HierarchyNode<AtomicConcept>> visitedNodes=new HashSet<HierarchyNode<AtomicConcept>>(hierarchyNode.getChildNodes());
            List<HierarchyNode<AtomicConcept>> toVisit=new ArrayList<HierarchyNode<AtomicConcept>>(hierarchyNode.getParentNodes());
            while (!toVisit.isEmpty()) {
                HierarchyNode<AtomicConcept> node=toVisit.remove(toVisit.size()-1);
                if (visitedNodes.add(node)) {
                    AtomicConcept nodeAtomicConcept=node.getRepresentative();
                    Set<Individual> realizationForNodeConcept=m_realization.get(nodeAtomicConcept);
                    if (realizationForNodeConcept!=null)
                        for (Individual individual : realizationForNodeConcept)
                            if (isResultRelevantIndividual(individual))
                                if (!tableau.isSatisfiable(true,true,Collections.singleton(Atom.create(queryConcept,individual)),null,null,null,null,ReasoningTaskDescription.isInstanceOf(individual,classExpression)))
                                    result.add(individual);
                    toVisit.addAll(node.getChildNodes());
                }
            }
        }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

        if (!m_isConsistent) {
            Node<OWLNamedIndividual> node=new OWLNamedIndividualNode(getAllNamedIndividuals());
            return new OWLNamedIndividualNodeSet(Collections.singleton(node));
        }
        Individual individual=H(namedIndividual);
        Tableau tableau=getTableau();
        Set<Individual> result=new HashSet<Individual>();
        for (Individual potentiallyDifferentIndividual : m_dlOntology.getAllIndividuals())
            if (isResultRelevantIndividual(potentiallyDifferentIndividual) && !individual.equals(potentiallyDifferentIndividual))
                if (!tableau.isSatisfiable(true,true,Collections.singleton(Atom.create(Equality.INSTANCE,individual,potentiallyDifferentIndividual)),null,null,null,null,new ReasoningTaskDescription(true,"is {0} different from {1}",individual,potentiallyDifferentIndividual)))
                    result.add(potentiallyDifferentIndividual);
        return sortBySameAsIfNecessary(result);
    }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

        if (m_knownObjectPropertyRelations==null || m_possibleObjectPropertyRelations==null) {
            m_knownObjectPropertyRelations=new HashMap<AtomicRole, Map<Individual,Set<Individual>>>();
            m_possibleObjectPropertyRelations=new HashMap<AtomicRole, Map<Individual,Set<Individual>>>();
            PropertyRelationFinder propertyRealationshipFinder=new PropertyRelationFinder();
            OWLAxiom[] additionalAxioms=propertyRealationshipFinder.getAxiomsForReadingOffCompexProperties(m_dlOntology.getAllComplexObjectRoles(), m_dlOntology.getAllIndividuals(), getDataFactory());
            Tableau tableau=getTableau(additionalAxioms);
            m_isConsistent=tableau.isSatisfiable(true,true,null,null,null,null,propertyRealationshipFinder.getNodesForIndividuals(),new ReasoningTaskDescription(false,"Precomputing known and possible property relations."));
            propertyRealationshipFinder.readOfPossibleAndKnowRelations(tableau,m_dlOntology.getAllComplexObjectRoles(),m_dlOntology.getAllAtomicObjectRoles(),m_dlOntology.getAllIndividuals(),m_knownObjectPropertyRelations, m_possibleObjectPropertyRelations);
        }
    }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

                for (Individual successorIndividual : toTestSuccessors) {               
                    OWLClass pseudoNominal=factory.getOWLClass(IRI.create("internal:pseudo-nominal"));
                    OWLClassExpression allNotPseudoNominal=factory.getOWLObjectAllValuesFrom(property,pseudoNominal.getObjectComplementOf());
                    OWLAxiom allNotPseudoNominalAssertion=factory.getOWLClassAssertionAxiom(allNotPseudoNominal,factory.getOWLNamedIndividual(IRI.create(individual.getIRI())));
                    OWLAxiom pseudoNominalAssertion=factory.getOWLClassAssertionAxiom(pseudoNominal,factory.getOWLNamedIndividual(IRI.create(successorIndividual.getIRI())));
                    Tableau tableau=getTableau(allNotPseudoNominalAssertion,pseudoNominalAssertion);
                    if (!tableau.isSatisfiable(true,true,null,null,null,null,null,new ReasoningTaskDescription(true,"is {0} connected to {1} via {2}",individual,successorIndividual,property))) {
                        Map<Individual,Set<Individual>> newKnownRelations=m_knownObjectPropertyRelations.get(role);
                        if (newKnownRelations==null) {
                            newKnownRelations=new HashMap<Individual, Set<Individual>>();
                            m_knownObjectPropertyRelations.put(role,newKnownRelations);
                        }
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

                if (testEvenIfNotPossible || possibleSuccessors.contains(obj)) {
                    OWLClass pseudoNominal=factory.getOWLClass(IRI.create("internal:pseudo-nominal"));
                    OWLClassExpression allNotPseudoNominal=factory.getOWLObjectAllValuesFrom(property,pseudoNominal.getObjectComplementOf());
                    OWLAxiom allNotPseudoNominalAssertion=factory.getOWLClassAssertionAxiom(allNotPseudoNominal,subject);
                    OWLAxiom pseudoNominalAssertion=factory.getOWLClassAssertionAxiom(pseudoNominal,object);
                    Tableau tableau=getTableau(allNotPseudoNominalAssertion,pseudoNominalAssertion);
                    if (!tableau.isSatisfiable(true,true,null,null,null,null,null,new ReasoningTaskDescription(true,"is {0} connected to {1} via {2}",subj,obj,property))) {
                        if (testEvenIfNotPossible) {
                            return true;
                        } else {
                            Map<Individual,Set<Individual>> newKnownRelations=m_knownObjectPropertyRelations.get(role);
                            if (newKnownRelations==null) {
View Full Code Here

Examples of org.semanticweb.HermiT.tableau.Tableau

    public boolean hasDataPropertyRelationship(OWLNamedIndividual subject,OWLDataProperty property,OWLLiteral object) {
        checkPreConditions(subject,property);
        if (!m_isConsistent) return true;
        OWLDataFactory factory=getDataFactory();
        OWLAxiom notAssertion=factory.getOWLNegativeDataPropertyAssertionAxiom(property,subject,object);
        Tableau tableau=getTableau(notAssertion);
        return !tableau.isSatisfiable(true,true,null,null,null,null,null,new ReasoningTaskDescription(true,"is {0} connected to {1} via {2}",H(subject),object,H(property)));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.