aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java')
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
index 3c0a001..233963e 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java
@@ -49,7 +49,8 @@ public class MyQueryReasoner extends QueryReasoner {
49 private Collection<String> predicatesWithGap = null; 49 private Collection<String> predicatesWithGap = null;
50 private Boolean satisfiable; 50 private Boolean satisfiable;
51 private ConsistencyManager consistency = new ConsistencyManager(this); 51 private ConsistencyManager consistency = new ConsistencyManager(this);
52 52 BasicQueryEngine limitedSkolemUpperStore;
53
53 public MyQueryReasoner() { 54 public MyQueryReasoner() {
54 setup(true, true); 55 setup(true, true);
55 } 56 }
@@ -102,10 +103,10 @@ public class MyQueryReasoner extends QueryReasoner {
102 103
103 if (multiStageTag && !program.getGeneral().isHorn()) { 104 if (multiStageTag && !program.getGeneral().isHorn()) {
104 lazyUpperStore = getUpperStore("lazy-upper-bound", true); // new MultiStageQueryEngine("lazy-upper-bound", true); // 105 lazyUpperStore = getUpperStore("lazy-upper-bound", true); // new MultiStageQueryEngine("lazy-upper-bound", true); //
106 // TODO CHECK
107 limitedSkolemUpperStore = getUpperStore("limited-skolem-upper-bound", true);
105 } 108 }
106 109
107 // TODO add new upper store creation
108
109 importData(program.getAdditionalDataFile()); 110 importData(program.getAdditionalDataFile());
110 111
111 elho_ontology = new ELHOProfile().getFragment(ontology); 112 elho_ontology = new ELHOProfile().getFragment(ontology);
@@ -151,7 +152,21 @@ public class MyQueryReasoner extends QueryReasoner {
151 Utility.logInfo("time for satisfiability checking: " + t.duration()); 152 Utility.logInfo("time for satisfiability checking: " + t.duration());
152 } 153 }
153 154
154 // TODO add new upper store preprocessing 155 // TODO check
156 if (limitedSkolemUpperStore != null) {
157 limitedSkolemUpperStore.importRDFData(name, datafile);
158 limitedSkolemUpperStore.materialise("saturate named individuals", originalMarkProgram);
159 int tag = limitedSkolemUpperStore.materialiseSkolemly(program, null);
160 if (tag != 1) {
161 limitedSkolemUpperStore.dispose();
162 limitedSkolemUpperStore = null;
163 }
164 if (tag == -1) return false;
165 }
166 if (consistency.checkSkolemUpper()) {
167 satisfiable = true;
168 Utility.logInfo("time for satisfiability checking: " + t.duration());
169 }
155 170
156 trackingStore.importRDFData(name, datafile); 171 trackingStore.importRDFData(name, datafile);
157 trackingStore.materialise("saturate named individuals", originalMarkProgram); 172 trackingStore.materialise("saturate named individuals", originalMarkProgram);
@@ -223,6 +238,9 @@ public class MyQueryReasoner extends QueryReasoner {
223 if (!queryRecord.isBottom() && lazyUpperStore != null) { 238 if (!queryRecord.isBottom() && lazyUpperStore != null) {
224 queryUpperBound(trackingStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables()); 239 queryUpperBound(trackingStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables());
225 } 240 }
241 if (!queryRecord.isBottom() && limitedSkolemUpperStore != null) {
242 queryUpperBound(limitedSkolemUpperStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables());
243 }
226 // END: trying to intersect 244 // END: trying to intersect
227 245
228 queryRecord.addProcessingTime(Step.UpperBound, t.duration()); 246 queryRecord.addProcessingTime(Step.UpperBound, t.duration());