diff options
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner')
3 files changed, 21 insertions, 30 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java b/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java index d179d14..b7a3667 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java | |||
| @@ -73,6 +73,9 @@ public class ConsistencyManager { | |||
| 73 | AnswerTuples tuples = null; | 73 | AnswerTuples tuples = null; |
| 74 | try { | 74 | try { |
| 75 | tuples = m_reasoner.lazyUpperStore.evaluate(fullQueryRecord.getQueryText(), fullQueryRecord.getAnswerVariables()); | 75 | tuples = m_reasoner.lazyUpperStore.evaluate(fullQueryRecord.getQueryText(), fullQueryRecord.getAnswerVariables()); |
| 76 | |||
| 77 | Utility.logDebug("CheckLazyUpperBound: answerVars=" + fullQueryRecord.getAnswerVariables()); | ||
| 78 | |||
| 76 | if (!tuples.isValid()) { | 79 | if (!tuples.isValid()) { |
| 77 | Utility.logInfo("There are no contradictions derived in the lazy upper bound materialisation."); | 80 | Utility.logInfo("There are no contradictions derived in the lazy upper bound materialisation."); |
| 78 | return satisfiability(t.duration()); | 81 | return satisfiability(t.duration()); |
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java index 233963e..36ea7de 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | |||
| @@ -33,7 +33,8 @@ public class MyQueryReasoner extends QueryReasoner { | |||
| 33 | DatalogProgram program; | 33 | DatalogProgram program; |
| 34 | 34 | ||
| 35 | BasicQueryEngine rlLowerStore = null; | 35 | BasicQueryEngine rlLowerStore = null; |
| 36 | BasicQueryEngine lazyUpperStore = null; | 36 | BasicQueryEngine lazyUpperStore = null; |
| 37 | BasicQueryEngine limitedSkolemUpperStore; | ||
| 37 | // boolean[] namedIndividuals_lazyUpper; | 38 | // boolean[] namedIndividuals_lazyUpper; |
| 38 | 39 | ||
| 39 | OWLOntology elho_ontology; | 40 | OWLOntology elho_ontology; |
| @@ -49,7 +50,6 @@ public class MyQueryReasoner extends QueryReasoner { | |||
| 49 | private Collection<String> predicatesWithGap = null; | 50 | private Collection<String> predicatesWithGap = null; |
| 50 | private Boolean satisfiable; | 51 | private Boolean satisfiable; |
| 51 | private ConsistencyManager consistency = new ConsistencyManager(this); | 52 | private ConsistencyManager consistency = new ConsistencyManager(this); |
| 52 | BasicQueryEngine limitedSkolemUpperStore; | ||
| 53 | 53 | ||
| 54 | public MyQueryReasoner() { | 54 | public MyQueryReasoner() { |
| 55 | setup(true, true); | 55 | setup(true, true); |
| @@ -163,10 +163,11 @@ public class MyQueryReasoner extends QueryReasoner { | |||
| 163 | } | 163 | } |
| 164 | if (tag == -1) return false; | 164 | if (tag == -1) return false; |
| 165 | } | 165 | } |
| 166 | if (consistency.checkSkolemUpper()) { | 166 | // FIXME nullPointerException |
| 167 | satisfiable = true; | 167 | // if (consistency.checkSkolemUpper()) { |
| 168 | Utility.logInfo("time for satisfiability checking: " + t.duration()); | 168 | // satisfiable = true; |
| 169 | } | 169 | // Utility.logInfo("time for satisfiability checking: " + t.duration()); |
| 170 | // } | ||
| 170 | 171 | ||
| 171 | trackingStore.importRDFData(name, datafile); | 172 | trackingStore.importRDFData(name, datafile); |
| 172 | trackingStore.materialise("saturate named individuals", originalMarkProgram); | 173 | trackingStore.materialise("saturate named individuals", originalMarkProgram); |
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxTripleManager.java b/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxTripleManager.java index c2065dc..232bc31 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxTripleManager.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/light/RDFoxTripleManager.java | |||
| @@ -1,31 +1,17 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.reasoner.light; | 1 | package uk.ac.ox.cs.pagoda.reasoner.light; |
| 2 | 2 | ||
| 3 | import java.util.Collection; | 3 | import org.semanticweb.HermiT.model.*; |
| 4 | import java.util.HashMap; | ||
| 5 | import java.util.LinkedList; | ||
| 6 | import java.util.Map; | ||
| 7 | import java.util.Queue; | ||
| 8 | import org.semanticweb.HermiT.model.AnnotatedEquality; | ||
| 9 | import org.semanticweb.HermiT.model.Atom; | ||
| 10 | import org.semanticweb.HermiT.model.AtomicConcept; | ||
| 11 | import org.semanticweb.HermiT.model.AtomicRole; | ||
| 12 | import org.semanticweb.HermiT.model.Constant; | ||
| 13 | import org.semanticweb.HermiT.model.DLPredicate; | ||
| 14 | import org.semanticweb.HermiT.model.Equality; | ||
| 15 | import org.semanticweb.HermiT.model.Individual; | ||
| 16 | import org.semanticweb.HermiT.model.Inequality; | ||
| 17 | import org.semanticweb.HermiT.model.Term; | ||
| 18 | import org.semanticweb.HermiT.model.Variable; | ||
| 19 | |||
| 20 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 21 | import uk.ac.ox.cs.pagoda.util.Namespace; | ||
| 22 | import uk.ac.ox.cs.JRDFox.JRDFStoreException; | 4 | import uk.ac.ox.cs.JRDFox.JRDFStoreException; |
| 5 | import uk.ac.ox.cs.JRDFox.model.Datatype; | ||
| 23 | import uk.ac.ox.cs.JRDFox.model.GroundTerm; | 6 | import uk.ac.ox.cs.JRDFox.model.GroundTerm; |
| 24 | import uk.ac.ox.cs.JRDFox.store.DataStore; | 7 | import uk.ac.ox.cs.JRDFox.store.DataStore; |
| 25 | import uk.ac.ox.cs.JRDFox.model.Datatype; | ||
| 26 | import uk.ac.ox.cs.JRDFox.store.Dictionary; | ||
| 27 | import uk.ac.ox.cs.JRDFox.store.DataStore.UpdateType; | 8 | import uk.ac.ox.cs.JRDFox.store.DataStore.UpdateType; |
| 9 | import uk.ac.ox.cs.JRDFox.store.Dictionary; | ||
| 28 | import uk.ac.ox.cs.JRDFox.store.Resource; | 10 | import uk.ac.ox.cs.JRDFox.store.Resource; |
| 11 | import uk.ac.ox.cs.pagoda.owl.OWLHelper; | ||
| 12 | import uk.ac.ox.cs.pagoda.util.Namespace; | ||
| 13 | |||
| 14 | import java.util.*; | ||
| 29 | 15 | ||
| 30 | public class RDFoxTripleManager { | 16 | public class RDFoxTripleManager { |
| 31 | 17 | ||
| @@ -183,10 +169,11 @@ public class RDFoxTripleManager { | |||
| 183 | int sizeLimit = 10000; | 169 | int sizeLimit = 10000; |
| 184 | 170 | ||
| 185 | private int getResourceID(Term arg, Map<Variable, Integer> assignment) { | 171 | private int getResourceID(Term arg, Map<Variable, Integer> assignment) { |
| 186 | while (termCache.size() > sizeLimit) | 172 | // FIXME infinite loop |
| 187 | termCache.remove(termList.poll()); | 173 | // while (termCache.size() > sizeLimit) |
| 174 | // termCache.remove(termList.poll()); | ||
| 188 | 175 | ||
| 189 | if (arg instanceof Variable) return assignment.get((Variable) arg); | 176 | if (arg instanceof Variable) return assignment.get(arg); |
| 190 | Integer id = null; | 177 | Integer id = null; |
| 191 | if ((id = termCache.get(arg)) != null) | 178 | if ((id = termCache.get(arg)) != null) |
| 192 | return id; | 179 | return id; |
