@PortedFrom(file="dlCompletionTree.h", name="DlCompletionTree") public class DlCompletionTree extends Object implements Comparable<DlCompletionTree>, Serializable
| Modifier and Type | Field and Description |
|---|---|
static int |
BLOCKABLE_LEVEL
default level for the Blockable node
|
| Constructor and Description |
|---|
DlCompletionTree(int newId,
JFactReasonerConfiguration c) |
| Modifier and Type | Method and Description |
|---|---|
void |
addConcept(ConceptWDep p,
boolean complex)
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 |
canBlockInit(int c) |
void |
clearAffected()
clear affected flag
|
int |
compareTo(DlCompletionTree o) |
List<ConceptWDep> |
complexConcepts() |
ArrayIntMap |
complexConceptsMap() |
boolean |
equals(Object arg0) |
DlCompletionTree |
getBlocker() |
DlCompletionTreeArc |
getEdgeLabelled(Role r,
DlCompletionTree node)
check if edge to NODE is labelled by R;
|
int |
getId() |
int |
getInit() |
List<DlCompletionTreeArc> |
getNeighbour() |
int |
getNominalLevel() |
DlCompletionTree |
getParentNode() |
DepSet |
getPurgeDep() |
int |
hashCode() |
boolean |
hasParent() |
void |
init(int level) |
boolean |
initIR(int level,
DepSet ds)
init IR with given entry and dep-set;
|
boolean |
isAffected() |
boolean |
isBlockableNode() |
boolean |
isBlocked() |
boolean |
isBlockedBySH(DlCompletionTree p) |
boolean |
isBlockedBySHI(DLDag dag,
DlCompletionTree p) |
boolean |
isBlockedBySHIQ(DLDag dag,
DlCompletionTree p) |
boolean |
isBlockedPBlockedNominalNodeCached() |
boolean |
isCached() |
boolean |
isDataNode() |
boolean |
isDBlocked() |
boolean |
isIBlocked() |
boolean |
isIllegallyDBlocked() |
boolean |
isLabelledBy(int p) |
boolean |
isLoopLabelled(int c) |
boolean |
isNominalNode() |
boolean |
isPBlocked() |
DlCompletionTree |
isSomeApplicable(Role r,
int c)
check if SOME rule is applicable; includes transitive SOME support
|
CGLabel |
label() |
String |
logNode() |
boolean |
needRestore(int restLevel) |
boolean |
needSave(int newLevel) |
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() |
DlCompletionTree |
resolvePBlocker(DepSet dep) |
void |
restore(int level) |
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()
set data node to true
|
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()
set nominal level to 0
|
void |
setNominalLevel(int newLevel) |
Restorer |
setPBlocked(DlCompletionTree blocker,
DepSet dep)
mark node purged
|
Restorer |
setUBlocked()
mark node unblocked
|
List<ConceptWDep> |
simpleConcepts() |
ArrayIntMap |
simpleConceptsMap() |
String |
toString() |
Restorer |
updateIR(DlCompletionTree node,
DepSet toAdd)
update IR of the current node with IR from NODE and additional clash-set;
|
public static final int BLOCKABLE_LEVEL
public DlCompletionTree(int newId,
JFactReasonerConfiguration c)
newId - newIdc - cpublic boolean canBlockInit(int c)
c - Cpublic void addNeighbour(DlCompletionTreeArc p)
p - ppublic int getId()
public boolean isCached()
@Nullable public Restorer setCached(boolean val)
val - valpublic boolean isDataNode()
public void setDataNode()
public boolean isBlockableNode()
public boolean isNominalNode()
public void setNominalLevel()
public void setNominalLevel(int newLevel)
newLevel - newLevelpublic int getNominalLevel()
public void addConcept(ConceptWDep p, boolean complex)
p - pcomplex - true if complex concepts soughtpublic void setInit(int p)
p - ppublic int getInit()
public List<DlCompletionTreeArc> getNeighbour()
public boolean hasParent()
@Nullable public DlCompletionTree isSomeApplicable(Role r, int c)
r - Rc - Cpublic CGLabel label()
public List<ConceptWDep> simpleConcepts()
public List<ConceptWDep> complexConcepts()
public ArrayIntMap simpleConceptsMap()
public ArrayIntMap complexConceptsMap()
public boolean isLabelledBy(int p)
p - ppublic boolean isBlockedBySH(DlCompletionTree p)
p - ppublic boolean isBlockedBySHI(DLDag dag, DlCompletionTree p)
dag - dagp - ppublic boolean isBlockedBySHIQ(DLDag dag, DlCompletionTree p)
dag - dagp - ppublic 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)
dep - deppublic boolean isLoopLabelled(int c)
c - cpublic Restorer setDBlocked(DlCompletionTree blocker)
blocker - blockerpublic Restorer setIBlocked(DlCompletionTree blocker)
blocker - blockerpublic Restorer setUBlocked()
public Restorer setPBlocked(@Nullable DlCompletionTree blocker, DepSet dep)
blocker - blockerdep - dep@Nullable public DlCompletionTreeArc getEdgeLabelled(Role r, DlCompletionTree node)
r - Rnode - node@PortedFrom(file="dlCompletionTree.cpp", name="initIR") public boolean initIR(int level, DepSet ds)
level - levelds - dspublic boolean needSave(int newLevel)
newLevel - newLevelpublic void save(int level)
level - levelpublic boolean needRestore(int restLevel)
restLevel - restLevelpublic void restore(int level)
level - level number restore node to given levelpublic String logNode()
public void init(int level)
level - levelpublic void printBody(LogAdapter o)
o - o@PortedFrom(file="dlCompletionTree.cpp", name="nonMergable") public boolean nonMergable(DlCompletionTree node, Reference<DepSet> dep)
node - node to checkdep - depset reference@Nullable @PortedFrom(file="dlCompletionTree.cpp", name="updateIR") public Restorer updateIR(DlCompletionTree node, DepSet toAdd)
node - completion treetoAdd - depsetpublic int compareTo(@Nullable DlCompletionTree o)
compareTo in interface Comparable<DlCompletionTree>public void setBlocker(@Nullable DlCompletionTree blocker)
blocker - blockerCopyright © 2018 The University of Manchester. All rights reserved.