Package org.semanticweb.HermiT.tableau

Examples of org.semanticweb.HermiT.tableau.Node


                }
                catch (NumberFormatException e) {
                    m_debugger.getOutput().println("Invalid ID of the node.");
                    return;
                }
                Node node=m_debugger.getTableau().getNode(nodeID);
                if (node==null) {
                    m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found.");
                    return;
                }
                for (ExtensionTable extensionTable : m_debugger.getTableau().getExtensionManager().getExtensionTables())
                    for (int position=0;position<extensionTable.getArity();position++) {
                        boolean[] bindings=new boolean[extensionTable.getArity()];
                        bindings[position]=true;
                        ExtensionTable.Retrieval retrieval=extensionTable.createRetrieval(bindings,ExtensionTable.View.TOTAL);
                        retrieval.getBindingsBuffer()[position]=node;
                        loadFacts(facts,retrieval);
                    }
                title="Assertions containing node '"+node.getNodeID()+"'.";
            }
        }
        CharArrayWriter buffer=new CharArrayWriter();
        PrintWriter writer=new PrintWriter(buffer);
        Object lastPredicate=null;
View Full Code Here


            ExtensionTable.Retrieval retrieval=dlClauseInfo.m_zRetrievals[toMatchIndex];
            retrieval.getBindingsBuffer()[0]=zConcepts[0];
            retrieval.open();
            Object[] tupleBuffer=retrieval.getTupleBuffer();
            while (!retrieval.afterLast()) {
                Node nodeZ=(Node)tupleBuffer[1];
                boolean allMatched=true;
                for (int index=1;index<zConcepts.length;index++)
                    if (!m_extensionManager.containsAssertion(zConcepts[index],nodeZ)) {
                        allMatched=false;
                        break;
View Full Code Here

                yNodeIndex=1;
            }
            retrieval.open();
            Object[] tupleBuffer=retrieval.getTupleBuffer();
            while (!retrieval.afterLast()) {
                Node nodeY=(Node)tupleBuffer[yNodeIndex];
                if (yConstraint.isSatisfiedViaMirroringY(m_extensionManager,nonblockedX,nodeY)) {
                    dlClauseInfo.m_yNodes[toMatchIndex]=nodeY;
                    checkDLClauseForNonblockedXAnyZAndAnyY(dlClauseInfo,nonblockedX,toMatchIndex+1);
                    dlClauseInfo.m_yNodes[toMatchIndex]=null; // checking done, reset assignments
                }
View Full Code Here

        }
        // go through the y's and if y is bound to a blocked node, set a flag that the block is invalid
        for (int i=dlClauseInfo.m_yConstraints.length-1;i>=0;i--) {
            // break blocks till the clause is satisfied
            YConstraint yConstraint=dlClauseInfo.m_yConstraints[i];
            Node yi=dlClauseInfo.m_yNodes[i];
            for (AtomicConcept c : yConstraint.m_yConcepts) {
                if (yi.isBlocked()&&!((ValidatedBlockingObject)yi.getBlockingObject()).blockViolatesParentConstraints() && !m_extensionManager.containsAssertion(c,yi) && m_extensionManager.containsAssertion(c,yi.getBlocker())) {
                    ((ValidatedBlockingObject)yi.getBlockingObject()).setBlockViolatesParentConstraints(true);
                    if (debuggingMode) inValidClausesForBlockedParent.put(dlClauseInfo, yi);
                    return;
                }
            }

        }
        for (ConsequenceAtom consequenceAtom : dlClauseInfo.m_consequencesForNonblockedX) {
            if (consequenceAtom instanceof MirroredYConsequenceAtom) {
                MirroredYConsequenceAtom atom=(MirroredYConsequenceAtom)consequenceAtom;
                if (atom.isSatisfiedNonMirrored(m_extensionManager,dlClauseInfo)) {
                    Node nodeY=dlClauseInfo.m_yNodes[atom.m_yArgumentIndex];
                    ((ValidatedBlockingObject)nodeY.getBlockingObject()).setBlockViolatesParentConstraints(true);
                    if (debuggingMode) inValidClausesForBlockedParent.put(dlClauseInfo, nodeY);
                    return;
                }
            }
        }
View Full Code Here

        }
        catch (NumberFormatException e) {
            m_debugger.getOutput().println("Invalid ID of the node.");
            return;
        }
        Node node=m_debugger.getTableau().getNode(nodeID);
        if (node==null) {
            m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found.");
            return;
        }
        ExistentialExpansionStrategy strategy=m_debugger.getTableau().getExistentialsExpansionStrategy();
        if (strategy instanceof IndividualReuseStrategy) {
            IndividualReuseStrategy reuseStrategy=(IndividualReuseStrategy)strategy;
            AtomicConcept conceptForNode=reuseStrategy.getConceptForNode(node);
            m_debugger.getOutput().print("Node '");
            m_debugger.getOutput().print(node.getNodeID());
            m_debugger.getOutput().print("' is ");
            if (conceptForNode==null)
                m_debugger.getOutput().println("not a reuse node for any concept.");
            else {
                m_debugger.getOutput().print("a reuse node for the '");
View Full Code Here

        }
        catch (NumberFormatException e) {
            m_debugger.getOutput().println("Invalid ID of the first node.");
            return;
        }
        Node subtreeRoot=m_debugger.getTableau().getNode(nodeID);
        if (subtreeRoot==null) {
            m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found.");
            return;
        }
        new SubtreeViewer(m_debugger,subtreeRoot);
View Full Code Here

        CharArrayWriter buffer=new CharArrayWriter();
        PrintWriter writer=new PrintWriter(buffer);
        writer.println("===========================================");
        writer.println("      ID");
        writer.println("===========================================");
        Node node=m_debugger.getTableau().getFirstTableauNode();
        while (node!=null) {
            if (!node.isBlocked()) {
                numberOfNodes++;
                writer.print("  ");
                writer.println(node.getNodeID());
            }
            node=node.getNextTableauNode();
        }
        writer.flush();
        showTextInWindow("Active nodes ("+numberOfNodes+"):"+buffer.toString(),"Active nodes");
        selectConsoleWindow();
    }
View Full Code Here

                if (!extensionManager.containsAssertion(x2yRole,nodeX,nodeY))
                    return false;
            for (AtomicRole y2xRole : m_y2xRoles)
                if (!extensionManager.containsAssertion(y2xRole,nodeY,nodeX))
                    return false;
            Node nodeYMirror;
            if (nodeY.isBlocked()&&!((ValidatedBlockingObject)nodeY.getBlockingObject()).blockViolatesParentConstraints())
                nodeYMirror=nodeY.getBlocker();
            else
                nodeYMirror=nodeY;
            for (AtomicConcept yConcept : m_yConcepts)
View Full Code Here

            m_atomicRole=atomicRole;
            m_yArgumentIndex=yArgumentIndex;
            m_isX2Y=isX2Y;
        }
        public boolean isSatisfied(ExtensionManager extensionManager,DLClauseInfo dlClauseInfo,Node nodeX) {
            Node nodeY=dlClauseInfo.m_yNodes[m_yArgumentIndex];
            Node nodeXReal;
            if (nodeY==nodeX.getParent())
                nodeXReal=nodeX;
            else
                nodeXReal=dlClauseInfo.m_xNode;
            if (m_isX2Y)
View Full Code Here

            }
            catch (NumberFormatException e) {
                m_debugger.getOutput().println("Invalid ID of the node at argument "+index+".");
                return;
            }
            Node node=m_debugger.getTableau().getNode(nodeID);
            if (node==null) {
                m_debugger.getOutput().println("Node with ID '"+nodeID+"' not found.");
                return;
            }
            tuple[index]=node;
View Full Code Here

TOP

Related Classes of org.semanticweb.HermiT.tableau.Node

Copyright © 2018 www.massapicom. 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.