public class ABox extends Object
Title:
Description:
Copyright: Copyright (c) 2008
Company: Clark & Parsia, LLC.
| Modifier and Type | Field and Description |
|---|---|
protected ConceptCache |
cache |
protected DatatypeReasoner |
dtReasoner
datatype reasoner used for checking the satisfiability of datatypes
|
static Logger |
log |
protected List<aterm.ATermAppl> |
nodeList
This is a list of node names.
|
protected Map<aterm.ATermAppl,Node> |
nodes
This is a list of nodes.
|
boolean |
ranRete |
boolean |
rulesNotApplied |
ABoxStats |
stats |
boolean |
useRete |
| Constructor and Description |
|---|
ABox(KnowledgeBase kb) |
ABox(KnowledgeBase kb,
ABox abox,
aterm.ATermAppl extraIndividual,
boolean copyIndividuals) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAllDifferent(aterm.ATermList list) |
void |
addDifferent(aterm.ATermAppl x,
aterm.ATermAppl y) |
Edge |
addEdge(aterm.ATermAppl p,
aterm.ATermAppl s,
aterm.ATermAppl o,
DependencySet ds) |
Individual |
addFreshIndividual(Individual parent,
DependencySet ds) |
Individual |
addIndividual(aterm.ATermAppl x,
DependencySet ds) |
Literal |
addLiteral(aterm.ATermAppl dataValue)
Add a new literal to the ABox.
|
Literal |
addLiteral(aterm.ATermAppl dataValue,
DependencySet ds) |
Literal |
addLiteral(DependencySet ds)
Add a new literal to the ABox.
|
void |
addSame(aterm.ATermAppl x,
aterm.ATermAppl y) |
void |
addType(aterm.ATermAppl x,
aterm.ATermAppl c) |
void |
addType(aterm.ATermAppl x,
aterm.ATermAppl c,
DependencySet ds) |
void |
clearCaches(boolean clearSatCache)
Clear the pseudo model created for the ABox and concept satisfiability.
|
ABox |
copy()
Create a copy of this ABox with all the nodes and edges.
|
ABox |
copy(aterm.ATermAppl extraIndividual,
boolean copyIndividuals)
Create a copy of this ABox with one more additional individual.
|
ABox |
copy(KnowledgeBase kb)
Create a copy of this ABox with all the nodes and edges and the given KB.
|
void |
copyOnWrite() |
aterm.ATermAppl |
createUniqueName(boolean isNominal) |
boolean |
doExplanation()
Checks if the explanation is turned on.
|
int |
getAnonCount() |
int |
getBranch()
Return the current branch number.
|
BranchEffectTracker |
getBranchEffectTracker() |
List<Branch> |
getBranches()
Returns the branches.
|
ConceptCache |
getCache() |
CachedNode |
getCached(aterm.ATermAppl c) |
Bool |
getCachedSat(aterm.ATermAppl c) |
Clash |
getClash() |
CompletionQueue |
getCompletionQueue() |
List<aterm.ATermAppl> |
getDataPropertyValues(aterm.ATermAppl s,
Role role,
aterm.ATermAppl datatype) |
List<aterm.ATermAppl> |
getDataPropertyValues(aterm.ATermAppl s,
Role role,
aterm.ATermAppl datatype,
boolean onlyObvious) |
DatatypeReasoner |
getDatatypeReasoner() |
Map<aterm.ATermAppl,int[]> |
getDisjBranchStats() |
String |
getExplanation() |
Set<aterm.ATermAppl> |
getExplanationSet() |
IncrementalChangeTracker |
getIncrementalChangeTracker() |
IndividualIterator |
getIndIterator()
Return individuals to which we need to apply the tableau rules
|
Individual |
getIndividual(aterm.ATerm x) |
EdgeList |
getInEdges(aterm.ATerm x) |
KnowledgeBase |
getKB() |
Clash |
getLastClash() |
ABox |
getLastCompletion() |
Literal |
getLiteral(aterm.ATerm x) |
Node |
getNode(aterm.ATerm x) |
List<aterm.ATermAppl> |
getNodeNames() |
Collection<Node> |
getNodes() |
void |
getObjectPropertyValues(aterm.ATermAppl s,
Role role,
Set<aterm.ATermAppl> knowns,
Set<aterm.ATermAppl> unknowns,
boolean getSames) |
List<aterm.ATermAppl> |
getObviousDataPropertyValues(aterm.ATermAppl s,
Role prop,
aterm.ATermAppl datatype) |
CandidateSet<aterm.ATermAppl> |
getObviousInstances(aterm.ATermAppl c) |
CandidateSet<aterm.ATermAppl> |
getObviousInstances(aterm.ATermAppl c,
Collection<aterm.ATermAppl> individuals) |
void |
getObviousObjects(aterm.ATermAppl p,
CandidateSet<aterm.ATermAppl> candidates) |
CandidateSet<aterm.ATermAppl> |
getObviousSubjects(aterm.ATermAppl p,
aterm.ATermAppl o) |
void |
getObviousSubjects(aterm.ATermAppl p,
aterm.ATermAppl o,
CandidateSet<aterm.ATermAppl> candidates) |
void |
getObviousTypes(aterm.ATermAppl x,
List<aterm.ATermAppl> types,
List<aterm.ATermAppl> nonTypes) |
EdgeList |
getOutEdges(aterm.ATerm x) |
RBox |
getRBox()
Return the RBox
|
Role |
getRole(aterm.ATerm r)
Convenience function to get the named role.
|
void |
getSames(Individual ind,
Set<aterm.ATermAppl> knowns,
Set<aterm.ATermAppl> unknowns) |
void |
getSubjects(aterm.ATermAppl p,
aterm.ATermAppl o,
CandidateSet<aterm.ATermAppl> candidates) |
TBox |
getTBox()
Return the TBox
|
List<NodeMerge> |
getToBeMerged() |
Bool |
hasObviousDataPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
Object value) |
Bool |
hasObviousObjectPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
Bool |
hasObviousPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
boolean |
hasPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o) |
void |
incrementBranch()
Increment the branch number (should only be called when a
non-deterministic rule, e.g.
|
boolean |
isChanged() |
boolean |
isClosed()
Returns true if Abox has a clash.
|
boolean |
isComplete() |
boolean |
isConsistent()
Return true if this ABox is consistent.
|
boolean |
isEmpty()
Returns true if there are no individuals in the ABox.
|
boolean |
isInitialized()
Check if the ABox is ready to be completed.
|
boolean |
isKeepLastCompletion() |
Bool |
isKnownSubClassOf(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
Bool |
isKnownType(aterm.ATermAppl x,
aterm.ATermAppl c) |
Bool |
isKnownType(aterm.ATermAppl x,
aterm.ATermAppl c,
Collection<aterm.ATermAppl> subs) |
Bool |
isKnownType(Individual pNode,
aterm.ATermAppl concept,
Collection<aterm.ATermAppl> subs) |
boolean |
isNode(aterm.ATerm x) |
boolean |
isSameAs(aterm.ATermAppl ind1,
aterm.ATermAppl ind2) |
boolean |
isSatisfiable(aterm.ATermAppl c) |
boolean |
isSatisfiable(aterm.ATermAppl c,
boolean cacheModel) |
boolean |
isSubClassOf(aterm.ATermAppl c1,
aterm.ATermAppl c2) |
protected 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.
|
boolean |
isType(aterm.ATermAppl x,
aterm.ATermAppl c)
Returns true if individual x belongs to type c.
|
boolean |
isType(List<aterm.ATermAppl> inds,
aterm.ATermAppl c)
Returns true if any of the individuals in the given list belongs to type
c.
|
void |
printTree()
Print the ABox as a completion tree (child nodes are indented).
|
boolean |
removeNode(aterm.ATermAppl x)
Remove the given node from the node map which maps names to nodes.
|
void |
removeType(aterm.ATermAppl x,
aterm.ATermAppl c) |
void |
reset()
Reset the ABox to contain only asserted information.
|
void |
resetQueue() |
int |
setAnonCount(int anonCount) |
void |
setBranch(int branch)
Set the branch number (should only be called when backjumping is in
progress)
|
void |
setChanged(boolean changed) |
void |
setClash(Clash clash) |
void |
setComplete(boolean isComplete) |
void |
setDisjBranchStats(Map<aterm.ATermAppl,int[]> disjBranchStats) |
void |
setDoExplanation(boolean doExplanation)
Enable/disable explanation generation
|
void |
setExplanation(DependencySet ds) |
void |
setInitialized(boolean initialized) |
void |
setKeepLastCompletion(boolean keepLastCompletion) |
void |
setLastCompletion(ABox comp) |
protected 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.
|
int |
size()
Return the number of nodes in the ABox.
|
String |
toString() |
void |
validate()
Validate all the edges in the ABox nodes.
|
public static final Logger log
public ABoxStats stats
protected final DatatypeReasoner dtReasoner
protected Map<aterm.ATermAppl,Node> nodes
protected List<aterm.ATermAppl> nodeList
protected ConceptCache cache
public boolean rulesNotApplied
public boolean ranRete
public boolean useRete
public ABox(KnowledgeBase kb)
public ABox(KnowledgeBase kb, ABox abox, aterm.ATermAppl extraIndividual, boolean copyIndividuals)
public ABox copy()
public ABox copy(KnowledgeBase kb)
public ABox copy(aterm.ATermAppl extraIndividual, boolean copyIndividuals)
extraIndividual - Extra individual to be added to the copy ABoxpublic void copyOnWrite()
public void clearCaches(boolean clearSatCache)
clearSatCache - If true clear concept satisfiability cache, if false only
clear pseudo model.public Bool getCachedSat(aterm.ATermAppl c)
public ConceptCache getCache()
public CachedNode getCached(aterm.ATermAppl c)
public Bool isKnownSubClassOf(aterm.ATermAppl c1, aterm.ATermAppl c2)
public boolean isSubClassOf(aterm.ATermAppl c1,
aterm.ATermAppl c2)
public boolean isSatisfiable(aterm.ATermAppl c)
public boolean isSatisfiable(aterm.ATermAppl c,
boolean cacheModel)
public CandidateSet<aterm.ATermAppl> getObviousInstances(aterm.ATermAppl c)
public CandidateSet<aterm.ATermAppl> getObviousInstances(aterm.ATermAppl c, Collection<aterm.ATermAppl> individuals)
public void getObviousTypes(aterm.ATermAppl x,
List<aterm.ATermAppl> types,
List<aterm.ATermAppl> nonTypes)
public CandidateSet<aterm.ATermAppl> getObviousSubjects(aterm.ATermAppl p, aterm.ATermAppl o)
public void getSubjects(aterm.ATermAppl p,
aterm.ATermAppl o,
CandidateSet<aterm.ATermAppl> candidates)
public void getObviousSubjects(aterm.ATermAppl p,
aterm.ATermAppl o,
CandidateSet<aterm.ATermAppl> candidates)
public void getObviousObjects(aterm.ATermAppl p,
CandidateSet<aterm.ATermAppl> candidates)
public Bool isKnownType(aterm.ATermAppl x, aterm.ATermAppl c)
public Bool isKnownType(aterm.ATermAppl x, aterm.ATermAppl c, Collection<aterm.ATermAppl> subs)
public Bool isKnownType(Individual pNode, aterm.ATermAppl concept, Collection<aterm.ATermAppl> subs)
public boolean isSameAs(aterm.ATermAppl ind1,
aterm.ATermAppl ind2)
public boolean isType(aterm.ATermAppl x,
aterm.ATermAppl c)
x - c - public boolean isType(List<aterm.ATermAppl> inds, aterm.ATermAppl c)
c - inds - public Bool hasObviousPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)
public Bool hasObviousDataPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, Object value)
public Bool hasObviousObjectPropertyValue(aterm.ATermAppl s, aterm.ATermAppl p, aterm.ATermAppl o)
public boolean hasPropertyValue(aterm.ATermAppl s,
aterm.ATermAppl p,
aterm.ATermAppl o)
public List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl s, Role role, aterm.ATermAppl datatype)
public List<aterm.ATermAppl> getDataPropertyValues(aterm.ATermAppl s, Role role, aterm.ATermAppl datatype, boolean onlyObvious)
public List<aterm.ATermAppl> getObviousDataPropertyValues(aterm.ATermAppl s, Role prop, aterm.ATermAppl datatype)
public void getObjectPropertyValues(aterm.ATermAppl s,
Role role,
Set<aterm.ATermAppl> knowns,
Set<aterm.ATermAppl> unknowns,
boolean getSames)
public void getSames(Individual ind, Set<aterm.ATermAppl> knowns, Set<aterm.ATermAppl> unknowns)
public boolean isConsistent()
public EdgeList getInEdges(aterm.ATerm x)
public EdgeList getOutEdges(aterm.ATerm x)
public Individual getIndividual(aterm.ATerm x)
public Literal getLiteral(aterm.ATerm x)
public Node getNode(aterm.ATerm x)
public void addType(aterm.ATermAppl x,
aterm.ATermAppl c)
public void addType(aterm.ATermAppl x,
aterm.ATermAppl c,
DependencySet ds)
public Edge addEdge(aterm.ATermAppl p, aterm.ATermAppl s, aterm.ATermAppl o, DependencySet ds)
public boolean removeNode(aterm.ATermAppl x)
x - public void removeType(aterm.ATermAppl x,
aterm.ATermAppl c)
public Literal addLiteral(DependencySet ds)
public Literal addLiteral(aterm.ATermAppl dataValue)
dataValue - A literal ATerm which should be constructed with one of
ATermUtils.makeXXXLiteral functionspublic Literal addLiteral(aterm.ATermAppl dataValue, DependencySet ds)
public Individual addIndividual(aterm.ATermAppl x, DependencySet ds)
public Individual addFreshIndividual(Individual parent, DependencySet ds)
public void addSame(aterm.ATermAppl x,
aterm.ATermAppl y)
public void addDifferent(aterm.ATermAppl x,
aterm.ATermAppl y)
public void addAllDifferent(aterm.ATermList list)
public boolean isNode(aterm.ATerm x)
public final aterm.ATermAppl createUniqueName(boolean isNominal)
public final Collection<Node> getNodes()
public final List<aterm.ATermAppl> getNodeNames()
public DatatypeReasoner getDatatypeReasoner()
public boolean isComplete()
public void setComplete(boolean isComplete)
isComplete - The isComplete to set.public boolean isClosed()
public Clash getClash()
public void setClash(Clash clash)
public KnowledgeBase getKB()
public Role getRole(aterm.ATerm r)
public RBox getRBox()
public TBox getTBox()
public int getBranch()
public void setBranch(int branch)
branch - public void incrementBranch()
branch - public boolean isInitialized()
public void setInitialized(boolean initialized)
public final boolean doExplanation()
public void setDoExplanation(boolean doExplanation)
doExplanation - The doExplanation to set.public void setExplanation(DependencySet ds)
public String getExplanation()
public Set<aterm.ATermAppl> getExplanationSet()
public BranchEffectTracker getBranchEffectTracker()
public IncrementalChangeTracker getIncrementalChangeTracker()
public IndividualIterator getIndIterator()
public void validate()
public void printTree()
public Clash getLastClash()
public ABox getLastCompletion()
public boolean isKeepLastCompletion()
public void setKeepLastCompletion(boolean keepLastCompletion)
public int size()
public boolean isEmpty()
public void setLastCompletion(ABox comp)
protected void setSyntacticUpdate(boolean val)
boolean - val The valueprotected boolean isSyntacticUpdate()
boolean - val The valuepublic CompletionQueue getCompletionQueue()
public void reset()
public void resetQueue()
public int setAnonCount(int anonCount)
anonCount - the anonCount to setpublic int getAnonCount()
public void setDisjBranchStats(Map<aterm.ATermAppl,int[]> disjBranchStats)
disjBranchStats - the disjBranchStats to setpublic Map<aterm.ATermAppl,int[]> getDisjBranchStats()
public void setChanged(boolean changed)
changed - the changed to setpublic boolean isChanged()
Copyright © 2019. All rights reserved.