diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-13 19:22:07 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-13 19:22:07 +0100 |
| commit | 6fd8b21066852cbc21e247e7cf0a2f423ebc1658 (patch) | |
| tree | 77b5d7567d0a81cb9593af075f472908f848e445 /src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | |
| parent | d0c209780ac209ba20de1ef2ba68551dd3321b3c (diff) | |
| download | ACQuA-6fd8b21066852cbc21e247e7cf0a2f423ebc1658.tar.gz ACQuA-6fd8b21066852cbc21e247e7cf0a2f423ebc1658.zip | |
Fast implementation of all the other things to get something working, but it doesn't.
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | 26 |
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()); |
