Interface ABox

  • All Superinterfaces:
    openllet.shared.tools.Logging
    All Known Implementing Classes:
    ABoxImpl

    public interface ABox
    extends openllet.shared.tools.Logging
    Definition of an abox.
    Since:
    2.6.0
    • Method Detail

      • copy

        ABox copy()
        Returns:
        a copy of this ABox with all the nodes and edges.
      • copy

        ABox copy​(KnowledgeBase kb)
        Parameters:
        kb - from witch the ABox is extracted
        Returns:
        a copy of this ABox with all the nodes and edges and the given KB.
      • copy

        ABox copy​(openllet.aterm.ATermAppl extraIndividual,
                  boolean copyIndividuals)
        Create a copy of this ABox with one more additional individual. This is NOT equivalent to create a copy and then add the individual. The order of individuals in the ABox is important to figure out which individuals exist in the original ontology and which ones are created by the tableau algorithm. This function creates a new ABox such that the individual is supposed to exist in the original ontology. This is very important when satisfiability of a concept starts with a pesudo model rather than the initial ABox.
        Parameters:
        extraIndividual - Extra _individual to be added to the copy ABox
        copyIndividuals - are the new individual that are supposed to exist in the original ontology.
        Returns:
        a copy of this ABox
      • copyOnWrite

        void copyOnWrite()
      • clearCaches

        void clearCaches​(boolean clearSatCache)
        Clear the pseudo model created for the ABox and concept satisfiability.
        Parameters:
        clearSatCache - If true clear concept satisfiability _cache, if false only clear pseudo model.
      • getCachedSat

        Bool getCachedSat​(openllet.aterm.ATermAppl c)
      • getCached

        CachedNode getCached​(openllet.aterm.ATermAppl c)
      • isKnownSubClassOf

        Bool isKnownSubClassOf​(openllet.aterm.ATermAppl c1,
                               openllet.aterm.ATermAppl c2)
      • isSubClassOf

        boolean isSubClassOf​(openllet.aterm.ATermAppl c1,
                             openllet.aterm.ATermAppl c2)
      • isSatisfiable

        boolean isSatisfiable​(openllet.aterm.ATermAppl c)
      • isSatisfiable

        boolean isSatisfiable​(openllet.aterm.ATermAppl c,
                              boolean cacheModel)
      • getObviousInstances

        CandidateSet<openllet.aterm.ATermAppl> getObviousInstances​(openllet.aterm.ATermAppl c)
      • getObviousInstances

        CandidateSet<openllet.aterm.ATermAppl> getObviousInstances​(openllet.aterm.ATermAppl c,
                                                                   java.util.Collection<openllet.aterm.ATermAppl> individuals)
      • getObviousTypes

        void getObviousTypes​(openllet.aterm.ATermAppl x,
                             java.util.List<openllet.aterm.ATermAppl> types,
                             java.util.List<openllet.aterm.ATermAppl> nonTypes)
      • getObviousSubjects

        CandidateSet<openllet.aterm.ATermAppl> getObviousSubjects​(openllet.aterm.ATermAppl p,
                                                                  openllet.aterm.ATermAppl o)
      • getSubjects

        void getSubjects​(openllet.aterm.ATermAppl p,
                         openllet.aterm.ATermAppl o,
                         CandidateSet<openllet.aterm.ATermAppl> candidates)
      • getObviousSubjects

        void getObviousSubjects​(openllet.aterm.ATermAppl p,
                                openllet.aterm.ATermAppl o,
                                CandidateSet<openllet.aterm.ATermAppl> candidates)
      • getObviousObjects

        void getObviousObjects​(openllet.aterm.ATermAppl p,
                               CandidateSet<openllet.aterm.ATermAppl> candidates)
      • isKnownType

        Bool isKnownType​(openllet.aterm.ATermAppl x,
                         openllet.aterm.ATermAppl c)
      • isKnownType

        Bool isKnownType​(openllet.aterm.ATermAppl x,
                         openllet.aterm.ATermAppl c,
                         java.util.Collection<openllet.aterm.ATermAppl> subs)
      • isKnownType

        Bool isKnownType​(Individual pNode,
                         openllet.aterm.ATermAppl concept,
                         java.util.Collection<openllet.aterm.ATermAppl> subs)
      • isSameAs

        boolean isSameAs​(openllet.aterm.ATermAppl ind1,
                         openllet.aterm.ATermAppl ind2)
      • isType

        boolean isType​(openllet.aterm.ATermAppl x,
                       openllet.aterm.ATermAppl c)
        Parameters:
        x -
        c -
        Returns:
        true if individual x belongs to type c. This is a logical consequence of the KB if in all possible models x belongs to C. This is checked by trying to construct a model where x belongs to not(c).
      • existType

        boolean existType​(java.util.List<openllet.aterm.ATermAppl> inds,
                          openllet.aterm.ATermAppl c)
        Parameters:
        c -
        inds -
        Returns:
        true if any of the individuals in the given list belongs to type c.
      • hasObviousPropertyValue

        Bool hasObviousPropertyValue​(openllet.aterm.ATermAppl s,
                                     openllet.aterm.ATermAppl p,
                                     openllet.aterm.ATermAppl o)
      • hasObviousDataPropertyValue

        Bool hasObviousDataPropertyValue​(openllet.aterm.ATermAppl s,
                                         openllet.aterm.ATermAppl p,
                                         java.lang.Object value)
      • hasObviousObjectPropertyValue

        Bool hasObviousObjectPropertyValue​(openllet.aterm.ATermAppl s,
                                           openllet.aterm.ATermAppl p,
                                           openllet.aterm.ATermAppl o)
      • hasPropertyValue

        boolean hasPropertyValue​(openllet.aterm.ATermAppl s,
                                 openllet.aterm.ATermAppl p,
                                 openllet.aterm.ATermAppl o)
      • getDataPropertyValues

        java.util.List<openllet.aterm.ATermAppl> getDataPropertyValues​(openllet.aterm.ATermAppl s,
                                                                       Role role,
                                                                       openllet.aterm.ATermAppl datatype)
      • getDataPropertyValues

        java.util.List<openllet.aterm.ATermAppl> getDataPropertyValues​(openllet.aterm.ATermAppl s,
                                                                       Role role,
                                                                       openllet.aterm.ATermAppl datatype,
                                                                       boolean onlyObvious)
      • getObviousDataPropertyValues

        java.util.List<openllet.aterm.ATermAppl> getObviousDataPropertyValues​(openllet.aterm.ATermAppl s,
                                                                              Role prop,
                                                                              openllet.aterm.ATermAppl datatype)
      • getObjectPropertyValues

        void getObjectPropertyValues​(openllet.aterm.ATermAppl s,
                                     Role role,
                                     java.util.Set<openllet.aterm.ATermAppl> knowns,
                                     java.util.Set<openllet.aterm.ATermAppl> unknowns,
                                     boolean getSames)
      • getSimpleObjectPropertyValues

        void getSimpleObjectPropertyValues​(Individual subj,
                                           Role role,
                                           java.util.Set<openllet.aterm.ATermAppl> knowns,
                                           java.util.Set<openllet.aterm.ATermAppl> unknowns,
                                           boolean getSames)
      • getTransitivePropertyValues

        void getTransitivePropertyValues​(Individual subj,
                                         Role prop,
                                         java.util.Set<openllet.aterm.ATermAppl> knowns,
                                         java.util.Set<openllet.aterm.ATermAppl> unknowns,
                                         boolean getSames,
                                         java.util.Map<Individual,​java.util.Set<Role>> visited,
                                         boolean isIndependent)
      • getComplexObjectPropertyValues

        void getComplexObjectPropertyValues​(Individual subj,
                                            State<Role> st,
                                            TransitionGraph<Role> tg,
                                            java.util.Set<openllet.aterm.ATermAppl> knowns,
                                            java.util.Set<openllet.aterm.ATermAppl> unknowns,
                                            boolean getSames,
                                            java.util.HashMap<Individual,​java.util.Set<State<Role>>> visited,
                                            boolean isIndependent)
      • getSames

        void getSames​(Individual ind,
                      java.util.Set<openllet.aterm.ATermAppl> knowns,
                      java.util.Set<openllet.aterm.ATermAppl> unknowns)
      • isConsistent

        boolean isConsistent()
        Returns:
        true if this ABox is consistent. Consistent ABox means after applying all the tableau completion rules at least one _branch with no clashes was found
      • isIncConsistent

        boolean isIncConsistent()
        Returns:
        true if this ABox is consistent, using the incremental consistency checking approach
      • getInEdges

        EdgeList getInEdges​(openllet.aterm.ATerm x)
      • getOutEdges

        EdgeList getOutEdges​(openllet.aterm.ATerm x)
      • getIndividual

        Individual getIndividual​(openllet.aterm.ATerm x)
      • getLiteral

        Literal getLiteral​(openllet.aterm.ATerm x)
      • getNode

        Node getNode​(openllet.aterm.ATerm x)
      • addType

        void addType​(openllet.aterm.ATermAppl x,
                     openllet.aterm.ATermAppl c)
      • addType

        void addType​(openllet.aterm.ATermAppl x,
                     openllet.aterm.ATermAppl c,
                     DependencySet ds)
      • addEdge

        Edge addEdge​(openllet.aterm.ATermAppl p,
                     openllet.aterm.ATermAppl s,
                     openllet.aterm.ATermAppl o,
                     DependencySet ds)
      • removeNode

        boolean removeNode​(openllet.aterm.ATermAppl x)
        Remove the given node from the node map which maps names to nodes. Does not remove the node from the node list or other nodes' edge lists.
        Parameters:
        x -
        Returns:
        true if the removal occur
      • removeType

        void removeType​(openllet.aterm.ATermAppl x,
                        openllet.aterm.ATermAppl c)
      • addLiteral

        Literal addLiteral​(DependencySet ds)
        Add a new literal to the ABox. This function is used only when the literal value does not have a known value, e.g. applyMinRule would create such a literal.
        Parameters:
        ds -
        Returns:
        the literal added.
      • addLiteral

        Literal addLiteral​(openllet.aterm.ATermAppl dataValue)
        Add a new literal to the ABox. Literal will be assigned a fresh unique name.
        Parameters:
        dataValue - A literal ATerm which should be constructed with one of ATermUtils.makeXXXLiteral functions
        Returns:
        Literal object that has been created
      • addSame

        void addSame​(openllet.aterm.ATermAppl x,
                     openllet.aterm.ATermAppl y)
      • addDifferent

        void addDifferent​(openllet.aterm.ATermAppl x,
                          openllet.aterm.ATermAppl y)
      • addAllDifferent

        void addAllDifferent​(openllet.aterm.ATermList list)
        Say that all the term of the list are different from each-other.
        Parameters:
        list - of different element.
        Since:
        ever
      • isNode

        boolean isNode​(openllet.aterm.ATerm x)
      • createUniqueName

        openllet.aterm.ATermAppl createUniqueName​(boolean isNominal)
      • getNodes

        java.util.Map<openllet.aterm.ATermAppl,​Node> getNodes()
      • getNodeNames

        java.util.List<openllet.aterm.ATermAppl> getNodeNames()
      • getDatatypeReasoner

        DatatypeReasoner getDatatypeReasoner()
        Returns:
        Returns the datatype reasoner.
      • isComplete

        boolean isComplete()
        Returns:
        Returns the isComplete.
      • setComplete

        void setComplete​(boolean isComplete)
        Parameters:
        isComplete - The isComplete to set.
      • isClosed

        boolean isClosed()
        Returns:
        true if Abox is closed.
      • getClash

        Clash getClash()
      • setClash

        void setClash​(Clash clash)
      • getRole

        Role getRole​(openllet.aterm.ATerm r)
        Convenience function to get the named role.
        Parameters:
        r - is the name of the role
        Returns:
        the named role.
      • getRBox

        RBox getRBox()
        Returns:
        the RBox
      • getTBox

        TBox getTBox()
        Returns:
        the TBox
      • getNodeList

        java.util.List<openllet.aterm.ATermAppl> getNodeList()
      • getBranchIndex

        int getBranchIndex()
        Return the current branch number. Branches are created when a non-deterministic rule, e.g. disjunction or max rule, is being applied.
        Returns:
        Returns the branch.
      • setBranchIndex

        void setBranchIndex​(int branchIndex)
        Set the _branch number (should only be called when backjumping is in progress)
        Parameters:
        branchIndex -
      • getSourceABox

        ABox getSourceABox()
      • setSourceABox

        void setSourceABox​(ABox sourceABox)
      • isRulesNotApplied

        boolean isRulesNotApplied()
      • setRulesNotApplied

        void setRulesNotApplied​(boolean rulesNotApplied)
      • incrementBranch

        void incrementBranch()
        Increment the branch number (should only be called when a non-deterministic rule, e.g. disjunction or max rule, is being applied)
      • isInitialized

        boolean isInitialized()
        Check if the ABox is ready to be completed.
        Returns:
        Returns the initialized.
      • setInitialized

        void setInitialized​(boolean initialized)
      • doExplanation

        boolean doExplanation()
        Checks if the clashExplanation is turned on.
        Returns:
        Returns the _doExplanation.
      • setDoExplanation

        void setDoExplanation​(boolean doExplanation)
        Enable/disable clashExplanation generation
        Parameters:
        doExplanation - The doExplanation to set.
      • getExplanation

        java.lang.String getExplanation()
      • getExplanationSet

        java.util.Set<openllet.aterm.ATermAppl> getExplanationSet()
      • getBranches

        java.util.List<Branch> getBranches()
        Returns:
        the branches.
      • getIndIterator

        IndividualIterator getIndIterator()
        Returns:
        the individuals to which we need to apply the tableau rules
      • validate

        void validate()
        Validate all the edges in the ABox _nodes. Used to find bugs in the copy and detach/attach functions.
      • validateTypes

        void validateTypes​(Individual node,
                           java.util.List<openllet.aterm.ATermAppl> negatedTypes)
      • printTree

        void printTree​(java.io.PrintStream stream)
        Print the ABox as a completion tree (child nodes are indented).
        Parameters:
        stream - is where to print
      • printTree

        default void printTree()
      • getLastClash

        Clash getLastClash()
      • getLastCompletion

        ABox getLastCompletion()
      • isKeepLastCompletion

        boolean isKeepLastCompletion()
      • setKeepLastCompletion

        void setKeepLastCompletion​(boolean keepLastCompletion)
      • size

        int size()
        Returns:
        the number of nodes in the ABox. This number includes both the individuals and the literals.
      • isEmpty

        boolean isEmpty()
        Returns:
        true if there are no individuals in the ABox.
      • setLastCompletion

        void setLastCompletion​(ABox comp)
      • setSyntacticUpdate

        void setSyntacticUpdate​(boolean val)
        Set whether changes to the update should be treated as syntactic updates, i.e., if the changes are made on explicit source axioms. This is used for the completion queue for incremental consistency checking purposes.
        Parameters:
        val - The value
      • isSyntacticUpdate

        boolean isSyntacticUpdate()
        Set whether changes to the update should be treated as syntactic updates, i.e., if the changes are made on explicit source axioms. This is used for the completion _queue for incremental consistency checking purposes.
        Returns:
        the value
      • reset

        void reset()
        Reset the ABox to contain only asserted information. Any ABox assertion added by tableau rules will be removed.
      • resetQueue

        void resetQueue()
      • setAnonCount

        int setAnonCount​(int anonCount)
        Parameters:
        anonCount - the anonCount to set
        Returns:
        the count set.
      • getAnonCount

        int getAnonCount()
        Returns:
        the anonCount
      • getDisjBranchStats

        java.util.Map<openllet.aterm.ATermAppl,​int[]> getDisjBranchStats()
        Returns:
        the disjBranchStats
      • setChanged

        void setChanged​(boolean changed)
        Parameters:
        changed - the changed to set
      • isChanged

        boolean isChanged()
        Returns:
        the changed
      • getToBeMerged

        java.util.List<NodeMerge> getToBeMerged()
        Returns:
        the toBeMerged