Examples of DLPredicate


Examples of org.semanticweb.HermiT.model.DLPredicate

        GroundDisjunction groundDisjunction=m_debugger.getTableau().getFirstUnprocessedGroundDisjunction();
        while (groundDisjunction!=null) {
            for (int disjunctIndex=0;disjunctIndex<groundDisjunction.getNumberOfDisjuncts();disjunctIndex++) {
                if (disjunctIndex!=0)
                    writer.print(" v ");
                DLPredicate dlPredicate=groundDisjunction.getDLPredicate(disjunctIndex);
                if (Equality.INSTANCE.equals(dlPredicate)) {
                    writer.print(groundDisjunction.getArgument(disjunctIndex,0).getNodeID());
                    writer.print(" == ");
                    writer.print(groundDisjunction.getArgument(disjunctIndex,1).getNodeID());
                }
                else {
                    writer.print(dlPredicate.toString(m_debugger.getPrefixes()));
                    writer.print('(');
                    for (int argumentIndex=0;argumentIndex<dlPredicate.getArity();argumentIndex++) {
                        if (argumentIndex!=0)
                            buffer.append(',');
                        writer.print(groundDisjunction.getArgument(disjunctIndex,argumentIndex).getNodeID());
                    }
                    writer.print(')');
View Full Code Here

Examples of org.semanticweb.HermiT.model.DLPredicate

        m_mergeAtoms.clear();
    }
    public void dlClauseMatchedStarted(DLClauseEvaluator dlClauseEvaluator,int dlClauseIndex) {
        int regularBodyAtomsNumber=0;
        for (int index=0;index<dlClauseEvaluator.getBodyLength();index++) {
            DLPredicate dlPredicate=dlClauseEvaluator.getBodyAtom(index).getDLPredicate();
            if (!(dlPredicate instanceof NodeIDLessEqualThan) && !(dlPredicate instanceof NodeIDsAscendingOrEqual))
                regularBodyAtomsNumber++;
        }
        Atom[] premises=new Atom[regularBodyAtomsNumber];
        int atomIndex=0;
        for (int index=0;index<premises.length;index++) {
            DLPredicate dlPredicate=dlClauseEvaluator.getBodyAtom(index).getDLPredicate();
            if (!(dlPredicate instanceof NodeIDLessEqualThan) || !(dlPredicate instanceof NodeIDsAscendingOrEqual))
                premises[atomIndex++]=getAtom(dlClauseEvaluator.getTupleMatchedToBody(index));
        }
        m_derivations.push(new DLClauseApplication(dlClauseEvaluator.getDLClause(dlClauseIndex),premises));
    }
View Full Code Here

Examples of org.semanticweb.HermiT.model.DLPredicate

        protected final Derivation m_derivedBy;

        public Disjunction(GroundDisjunction groundDisjunction,Derivation derivedBy) {
            m_atoms=new Object[groundDisjunction.getNumberOfDisjuncts()][];
            for (int disjunctIndex=0;disjunctIndex<groundDisjunction.getNumberOfDisjuncts();disjunctIndex++) {
                DLPredicate dlPredicate=groundDisjunction.getDLPredicate(disjunctIndex);
                Object[] tuple=new Object[dlPredicate.getArity()+1];
                tuple[0]=dlPredicate;
                for (int argumentIndex=0;argumentIndex<dlPredicate.getArity();argumentIndex++)
                    tuple[argumentIndex+1]=groundDisjunction.getArgument(disjunctIndex,argumentIndex);
                m_atoms[disjunctIndex]=tuple;
            }
            m_derivedBy=derivedBy;
        }
View Full Code Here

Examples of org.semanticweb.HermiT.model.DLPredicate

        updateKnownSubsumptionsUsingToldSubsumers(m_tableau.getPermanentDLOntology().getDLClauses());
    }
    protected void updateKnownSubsumptionsUsingToldSubsumers(Set<DLClause> dlClauses) {
        for (DLClause dlClause : dlClauses) {
            if (dlClause.getHeadLength()==1 && dlClause.getBodyLength()==1) {
                DLPredicate headPredicate=dlClause.getHeadAtom(0).getDLPredicate();
                DLPredicate bodyPredicate=dlClause.getBodyAtom(0).getDLPredicate();
                if (headPredicate instanceof AtomicConcept && bodyPredicate instanceof AtomicConcept) {
                    AtomicConcept headConcept=(AtomicConcept)headPredicate;
                    AtomicConcept bodyConcept=(AtomicConcept)bodyPredicate;
                    if (m_elements.contains(headConcept) && m_elements.contains(bodyConcept))
                        addKnownSubsumption(bodyConcept,headConcept);
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.