@PortedFrom(file="dlCompletionTree.h", name="DlCompletionTree") public class DlCompletionTree extends Object implements Comparable<DlCompletionTree>
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCKABLE_LEVEL
default level for the Blockable node
|
protected DlCompletionTree |
blocker
blocker of a node
|
protected boolean |
cached
flag if node is Cached
|
protected int |
curLevel |
protected boolean |
dBlocked
flag whether node is directly/indirectly blocked
|
protected List<ConceptWDep> |
inequalityRelation
inequality relation information respecting current node
|
protected Map<Integer,ConceptWDep> |
inequalityRelation_helper |
protected boolean |
pBlocked
flag whether node is permanently/temporarily blocked
|
protected DepSet |
pDep
dep-set for Purge op
|
| Constructor and Description |
|---|
DlCompletionTree(int newId,
JFactReasonerConfiguration c) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConcept(ConceptWDep p,
DagTag tag)
adds concept P to a label, defined by TAG; update blocked status if
necessary
|
void |
addNeighbour(DlCompletionTreeArc p)
add given arc P as a neighbour
|
boolean |
B2Complex(RAStateTransitions RST,
int C) |
ArrayIntMap |
beginl_cc_concepts()
begin() iterator for a label with complex concepts
|
List<ConceptWDep> |
beginl_cc()
begin() iterator for a label with complex concepts
|
ArrayIntMap |
beginl_sc_concepts()
begin() iterator for a label with simple concepts
|
List<ConceptWDep> |
beginl_sc()
begin() iterator for a label with simple concepts
|
boolean |
canBlockInit(int C)
check whether a node can block another one with init concept C
|
void |
clearAffected()
clear affected flag
|
int |
compareTo(DlCompletionTree o) |
boolean |
equals(Object arg0) |
DlCompletionTree |
getBlocker()
get access to the blocker
|
DlCompletionTreeArc |
getEdgeLabelled(Role R,
DlCompletionTree node)
check if edge to NODE is labelled by R; return null if does not
|
int |
getId()
get Node's id
|
int |
getInit() |
List<DlCompletionTreeArc> |
getNeighbour() |
int |
getNominalLevel() |
DlCompletionTree |
getParentNode()
return RW pointer to the parent node; WARNING: correct only for nodes
with hasParent()==TRUE
|
DepSet |
getPurgeDep()
get purge dep-set of a given node
|
int |
hashCode() |
boolean |
hasParent()
return true if node is a non-root; works for reflexive roles
|
void |
init(int level) |
boolean |
initIR(int level,
DepSet ds)
init IR with given entry and dep-set; @return true if IR already has this
label
|
boolean |
isAffected()
check whether node is affected by blocking-related changes
|
boolean |
isBlockableNode() |
boolean |
isBlocked()
check if node is blocked (d/i)
|
boolean |
isBlockedBy_SH(DlCompletionTree p)
check blocking condition for SH logic
|
boolean |
isBlockedBy_SHI(DLDag dag,
DlCompletionTree p)
check blocking condition for SHI logic
|
boolean |
isBlockedBy_SHIQ(DLDag dag,
DlCompletionTree p)
check blocking condition for SHIQ logic using optimised blocking
|
boolean |
isBlockedPBlockedNominalNodeCached() |
boolean |
isCached()
check if the node is cached (IE need not to be expanded)
|
boolean |
isDataNode() |
boolean |
isDBlocked()
check if node is directly blocked
|
boolean |
isIBlocked()
check if node is indirectly blocked
|
boolean |
isIllegallyDBlocked()
check the legality of the direct block
|
boolean |
isLabelledBy(int p)
check whether node's label contains P
|
boolean |
isLoopLabelled(int c)
check whether the loop between a DBlocked NODE and it's parent blocked
contains C
|
boolean |
isNominalNode() |
boolean |
isPBlocked()
check if node is purged (and so indirectly blocked)
|
DlCompletionTree |
isSomeApplicable(Role R,
int C)
check if SOME rule is applicable; includes transitive SOME support
|
CGLabel |
label()
RW access to a label
|
String |
logNode()
log node information (number, i/d blockers, cached)
|
boolean |
needRestore(int restLevel)
check if node needs to be restored
|
boolean |
needSave(int newLevel)
check if node needs to be saved
|
boolean |
nonMergable(DlCompletionTree node,
Reference<DepSet> dep)
check if the NODE's and current node's IR are labelled with the same
level
|
void |
printBody(LogAdapter o) |
DlCompletionTree |
resolvePBlocker()
get node to which current one was merged
|
DlCompletionTree |
resolvePBlocker(DepSet dep)
get node to which current one was merged; fills DEP from pDep's
|
void |
save(int level)
save node using internal stack
|
void |
setAffected()
set node (and all subnodes) affected
|
void |
setBlocker(DlCompletionTree blocker) |
Restorer |
setCached(boolean val)
set cached status of given node
|
void |
setDataNode() |
Restorer |
setDBlocked(DlCompletionTree blocker)
mark node d-blocked
|
Restorer |
setIBlocked(DlCompletionTree blocker)
mark node i-blocked
|
void |
setInit(int p)
set the Init concept
|
void |
setNominalLevel() |
void |
setNominalLevel(int newLevel) |
Restorer |
setPBlocked(DlCompletionTree blocker,
DepSet dep)
mark node purged
|
Restorer |
setUBlocked()
mark node unblocked
|
String |
toString() |
Restorer |
updateIR(DlCompletionTree node,
DepSet toAdd)
update IR of the current node with IR from NODE and additional clash-set; @return
restorer
|
protected List<ConceptWDep> inequalityRelation
protected Map<Integer,ConceptWDep> inequalityRelation_helper
protected DlCompletionTree blocker
protected DepSet pDep
protected int curLevel
protected boolean cached
protected boolean pBlocked
protected boolean dBlocked
public static int BLOCKABLE_LEVEL
public DlCompletionTree(int newId,
JFactReasonerConfiguration c)
public boolean canBlockInit(int C)
public void addNeighbour(DlCompletionTreeArc p)
public int getId()
public boolean isCached()
public Restorer setCached(boolean val)
public boolean isDataNode()
public void setDataNode()
public boolean isBlockableNode()
public boolean isNominalNode()
public void setNominalLevel()
public void setNominalLevel(int newLevel)
public int getNominalLevel()
public void addConcept(ConceptWDep p, DagTag tag)
public void setInit(int p)
public int getInit()
public List<DlCompletionTreeArc> getNeighbour()
public boolean hasParent()
public DlCompletionTree isSomeApplicable(Role R, int C)
public CGLabel label()
public List<ConceptWDep> beginl_sc()
public List<ConceptWDep> beginl_cc()
public ArrayIntMap beginl_sc_concepts()
public ArrayIntMap beginl_cc_concepts()
public boolean isLabelledBy(int p)
public boolean isBlockedBy_SH(DlCompletionTree p)
public boolean isBlockedBy_SHI(DLDag dag, DlCompletionTree p)
public boolean isBlockedBy_SHIQ(DLDag dag, DlCompletionTree p)
public DlCompletionTree getParentNode()
public boolean isAffected()
public void setAffected()
public void clearAffected()
public boolean isDBlocked()
public boolean isIBlocked()
public boolean isPBlocked()
public boolean isBlockedPBlockedNominalNodeCached()
public boolean isBlocked()
public boolean isIllegallyDBlocked()
public DlCompletionTree getBlocker()
public DepSet getPurgeDep()
public DlCompletionTree resolvePBlocker()
public DlCompletionTree resolvePBlocker(DepSet dep)
public boolean isLoopLabelled(int c)
public Restorer setDBlocked(DlCompletionTree blocker)
public Restorer setIBlocked(DlCompletionTree blocker)
public Restorer setUBlocked()
public Restorer setPBlocked(DlCompletionTree blocker, DepSet dep)
public DlCompletionTreeArc getEdgeLabelled(Role R, DlCompletionTree node)
public boolean initIR(int level,
DepSet ds)
public boolean needSave(int newLevel)
public void save(int level)
public boolean needRestore(int restLevel)
public String logNode()
public boolean B2Complex(RAStateTransitions RST, int C)
public void init(int level)
public void printBody(LogAdapter o)
public boolean nonMergable(DlCompletionTree node, Reference<DepSet> dep)
public Restorer updateIR(DlCompletionTree node, DepSet toAdd)
public int compareTo(DlCompletionTree o)
compareTo in interface Comparable<DlCompletionTree>public void setBlocker(DlCompletionTree blocker)
Copyright © 2013 The University of Manchester. All Rights Reserved.