diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-21 14:46:44 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-21 14:46:44 +0100 |
| commit | c9c8d03e957fa56df5dc1304f7a81dfa61b7b70e (patch) | |
| tree | 216b255980cbdf3d0cfca0d67b38641adb15bbdd /src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | |
| parent | d81b086fe329fa69891eba0a4b1f73e44183620d (diff) | |
| download | ACQuA-c9c8d03e957fa56df5dc1304f7a81dfa61b7b70e.tar.gz ACQuA-c9c8d03e957fa56df5dc1304f7a81dfa61b7b70e.zip | |
Removed extended queries (involving classes MyQueryReasoner and QueryRecord). Executed LightTests successfully.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java index 2a49e24..cc0e647 100644 --- a/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java +++ b/src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | |||
| @@ -208,14 +208,10 @@ class MyQueryReasoner extends QueryReasoner { | |||
| 208 | private boolean queryUpperStore(BasicQueryEngine upperStore, QueryRecord queryRecord, | 208 | private boolean queryUpperStore(BasicQueryEngine upperStore, QueryRecord queryRecord, |
| 209 | Tuple<String> extendedQuery, Step step) { | 209 | Tuple<String> extendedQuery, Step step) { |
| 210 | 210 | ||
| 211 | queryUpperBound(upperStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables()); | 211 | if(queryRecord.hasNonAnsDistinguishedVariables()) |
| 212 | 212 | queryUpperBound(upperStore, queryRecord, extendedQuery.get(0), queryRecord.getAnswerVariables()); | |
| 213 | if(queryRecord.hasNonAnsDistinguishedVariables()) { | 213 | else |
| 214 | if(!queryRecord.processed()) | 214 | queryUpperBound(upperStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables()); |
| 215 | queryUpperBound(upperStore, queryRecord, extendedQuery.get(0), queryRecord.getAnswerVariables()); | ||
| 216 | if(!queryRecord.processed()) | ||
| 217 | queryUpperBound(upperStore, queryRecord, extendedQuery.get(1), queryRecord.getDistinguishedVariables()); | ||
| 218 | } | ||
| 219 | 215 | ||
| 220 | queryRecord.addProcessingTime(step, t.duration()); | 216 | queryRecord.addProcessingTime(step, t.duration()); |
| 221 | if(queryRecord.processed()) { | 217 | if(queryRecord.processed()) { |
| @@ -245,28 +241,23 @@ class MyQueryReasoner extends QueryReasoner { | |||
| 245 | 241 | ||
| 246 | Tuple<String> extendedQueryTexts = queryRecord.getExtendedQueryText(); | 242 | Tuple<String> extendedQueryTexts = queryRecord.getExtendedQueryText(); |
| 247 | 243 | ||
| 248 | // BasicQueryEngine upperStore; | 244 | Utility.logDebug("Tracking store"); |
| 249 | // if(queryRecord.isBottom()) upperStore = trackingStore; | ||
| 250 | // upperStore = queryRecord.isBottom() || lazyUpperStore == null ? trackingStore : lazyUpperStore; | ||
| 251 | |||
| 252 | // TODO | ||
| 253 | // if(queryRecord.isBottom() || (lazyUpperStore == null && limitedSkolemUpperStore == null)) | ||
| 254 | // queryUpperStore(trackingStore, queryRecord, extendedQueryTexts); | ||
| 255 | // else { | ||
| 256 | |||
| 257 | if(queryUpperStore(trackingStore, queryRecord, extendedQueryTexts, Step.SIMPLE_UPPER_BOUND)) | 245 | if(queryUpperStore(trackingStore, queryRecord, extendedQueryTexts, Step.SIMPLE_UPPER_BOUND)) |
| 258 | return null; | 246 | return null; |
| 259 | 247 | ||
| 260 | if(!queryRecord.isBottom()) { | 248 | if(!queryRecord.isBottom()) { |
| 249 | Utility.logDebug("Lazy store"); | ||
| 261 | if(lazyUpperStore != null && queryUpperStore(lazyUpperStore, queryRecord, extendedQueryTexts, Step.LAZY_UPPER_BOUND)) | 250 | if(lazyUpperStore != null && queryUpperStore(lazyUpperStore, queryRecord, extendedQueryTexts, Step.LAZY_UPPER_BOUND)) |
| 262 | return null; | 251 | return null; |
| 252 | Utility.logDebug("Skolem store"); | ||
| 263 | if(limitedSkolemUpperStore != null && queryUpperStore(limitedSkolemUpperStore, queryRecord, extendedQueryTexts, Step.L_SKOLEM_UPPER_BOUND)) | 253 | if(limitedSkolemUpperStore != null && queryUpperStore(limitedSkolemUpperStore, queryRecord, extendedQueryTexts, Step.L_SKOLEM_UPPER_BOUND)) |
| 264 | return null; | 254 | return null; |
| 265 | } | 255 | } |
| 266 | 256 | ||
| 267 | t.reset(); | 257 | t.reset(); |
| 268 | try { | 258 | try { |
| 269 | elAnswer = elLowerStore.evaluate(extendedQueryTexts.get(0), queryRecord.getAnswerVariables(), | 259 | elAnswer = elLowerStore.evaluate(extendedQueryTexts.get(0), |
| 260 | queryRecord.getAnswerVariables(), | ||
| 270 | queryRecord.getLowerBoundAnswers()); | 261 | queryRecord.getLowerBoundAnswers()); |
| 271 | Utility.logDebug(t.duration()); | 262 | Utility.logDebug(t.duration()); |
| 272 | queryRecord.updateLowerBoundAnswers(elAnswer); | 263 | queryRecord.updateLowerBoundAnswers(elAnswer); |
