|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.semanticweb.HermiT.tableau.DatatypeManager
public class DatatypeManager
| Nested Class Summary | |
|---|---|
protected static class |
DatatypeManager.SetLengthComparator
used to sort data ranges based on the number of possible assignments |
| Field Summary | |
|---|---|
protected UnionDependencySet |
dependencySetTwoCauses
|
protected ExtensionManager |
extensionManager
|
protected ExtensionTable.Retrieval |
pairsDeltaOld
|
protected ExtensionTable.Retrieval |
pairsFirstBoundRetr
|
protected TableauMonitor |
tableauMonitor
|
protected ExtensionTable.Retrieval |
triplesFirstBoundRetr
|
protected ExtensionTable.Retrieval |
triplesSecondBoundRetr
|
protected ExtensionTable.Retrieval |
triplesZeroBoundRetr
|
| Constructor Summary | |
|---|---|
DatatypeManager(Tableau tableau)
|
|
| Method Summary | |
|---|---|
protected java.util.Map<Node,CanonicalDataRange> |
buildCanonicalRanges(java.util.Map<Node,java.util.Set<DataRange>> nodeToDRs)
Given a map from nodes to a set of data ranges, construct a map from nodes to data ranges such that each constructed data range captures all restrictions of the data ranges in the set for the node in the given map. |
protected java.util.Set<java.util.Map<CanonicalDataRange,Node>> |
buildPartitions(java.util.Map<Node,CanonicalDataRange> nodeToCanonicalDR,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
Partition the set of nodes and their canonical data ranges together with their inequalities into mutally disjoint non-empty subsets P1, ..., Pn such that no Pi and Pj with i neq j have variables in common. |
protected boolean |
checkDatatypeAssertionFor(java.util.Map<Node,java.util.Set<DataRange>> nodeToDRs)
Given a map with nodes and data range assertions for the nodes, check whether there is an assignment for all the data ranges that is consistent with the restrictions on the data ranges and the inequalities |
boolean |
checkDatatypeConstraints()
Checks if in the last iteration a new data range assertion has been added and if so, whether the restrictions on this newly added node and its data range siblings are satisfiable given the asserted inequalities. |
protected boolean |
fetchInequalities(java.util.Set<Node> nodes,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
Given a set of nodes for which there are data range assertions in the tableau, collect all inequalities for the nodes. |
protected java.util.Map<Node,java.util.Set<DataRange>> |
fetchRelevantAssertions(Node initialNode)
Given a node that has a data range assertion in the extension table, look up its predecessor node in the tableau (unique for data range nodes) and collect all successors of the fond predecessor that have data range assertions. |
protected CanonicalDataRange |
getCanonicalDataRange(java.util.Set<DataRange> ranges)
Given a set of data ranges, construct a data range that captures all the restrictions of the given ranges. |
protected boolean |
hasAssignment(java.util.Map<CanonicalDataRange,Node> partition,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym,
java.util.Map<Node,java.util.Set<DataRange>> originalNodeToDRs)
Given a map from data ranges to nodes and inequalities between the nodes, check whether there is a suitable assignment of values for the nodes that complies with the given datatype restrictions and inequalities. |
protected void |
removeUnderRestrictedRanges(java.util.Map<Node,CanonicalDataRange> nodeToCanonicalDR,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
Remove those nodes and data ranges that have more than enough values to cover the inequalities. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final TableauMonitor tableauMonitor
protected final ExtensionManager extensionManager
protected final ExtensionTable.Retrieval pairsDeltaOld
protected final ExtensionTable.Retrieval triplesFirstBoundRetr
protected final ExtensionTable.Retrieval triplesSecondBoundRetr
protected final ExtensionTable.Retrieval pairsFirstBoundRetr
protected final ExtensionTable.Retrieval triplesZeroBoundRetr
protected final UnionDependencySet dependencySetTwoCauses
| Constructor Detail |
|---|
public DatatypeManager(Tableau tableau)
| Method Detail |
|---|
public boolean checkDatatypeConstraints()
protected java.util.Map<Node,java.util.Set<DataRange>> fetchRelevantAssertions(Node initialNode)
initialNode - a node that has a data range assertion in the
extension table
protected boolean checkDatatypeAssertionFor(java.util.Map<Node,java.util.Set<DataRange>> nodeToDRs)
nodeToDRs - a mapping from nodes to their asserted data ranges
protected boolean fetchInequalities(java.util.Set<Node> nodes,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
nodes - the set of nodes for which inequalities are collectedinequalities - is a map that is initially assumed to be empty.
After running the method, it contains as keys all nodes n1 from
the given set nodes for which there is an inequality assertion of
the form neq n1 n2 in the extension table; the set of values
for each key n1 consist of all those nodes n2 for which neq n1 n2
is in the extension table.inequalitiesSym - is a map that is initially assumed to be
empty. After running the method, it contains the symmetric
counterpart of inequalities. I.e., it contains as keys all
nodes n1 from the given set nodes for which there is an inequality
assertion of the form neq n2 n1 in the extension table; the set of
values for each key n1 consist of all those nodes n2 for which
neq n2 n1 is in the extension table.
protected java.util.Map<Node,CanonicalDataRange> buildCanonicalRanges(java.util.Map<Node,java.util.Set<DataRange>> nodeToDRs)
nodeToDRs - a map from nodes to sets of data ranges
n -> {dr_1, ..., dr_n}
protected CanonicalDataRange getCanonicalDataRange(java.util.Set<DataRange> ranges)
ranges - a set of data ranges
protected void removeUnderRestrictedRanges(java.util.Map<Node,CanonicalDataRange> nodeToCanonicalDR,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
nodeToCanonicalDR - a map from nodes to canonical data rangesinequalities - inequalities between nodesinequalitiesSym - symmetric counterpart for the above relation
protected java.util.Set<java.util.Map<CanonicalDataRange,Node>> buildPartitions(java.util.Map<Node,CanonicalDataRange> nodeToCanonicalDR,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym)
nodeToCanonicalDR - a map from nodes to canonical data rangesinequalities - a map from nodes to the nodes for which an inequality
is knowninequalitiesSym - the symmetric counterpart toinequalitiesSym
protected boolean hasAssignment(java.util.Map<CanonicalDataRange,Node> partition,
java.util.Map<Node,java.util.Set<Node>> inequalities,
java.util.Map<Node,java.util.Set<Node>> inequalitiesSym,
java.util.Map<Node,java.util.Set<DataRange>> originalNodeToDRs)
partition - A map from data ranges to nodes such that the
inequalities given in the next two parameters link the variables
in the partition.inequalities - A map from nodes to sets of nodes for which there are
inequalities in the extension table.inequalitiesSym - The symmetric counter part to the above map.originalNodeToDRs - A map from nodes to data ranges such that for
each node and data range in the map, there is a corresponding
entry in the extension table.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||