From 6fd8b21066852cbc21e247e7cf0a2f423ebc1658 Mon Sep 17 00:00:00 2001 From: RncLsn Date: Wed, 13 May 2015 19:22:07 +0100 Subject: Fast implementation of all the other things to get something working, but it doesn't. --- .../ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/MyQueryReasoner.java') 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 { private Collection predicatesWithGap = null; private Boolean satisfiable; private ConsistencyManager consistency = new ConsistencyManager(this); - + BasicQueryEngine limitedSkolemUpperStore; + public MyQueryReasoner() { setup(true, true); } @@ -102,10 +103,10 @@ public class MyQueryReasoner extends QueryReasoner { if (multiStageTag && !program.getGeneral().isHorn()) { lazyUpperStore = getUpperStore("lazy-upper-bound", true); // new MultiStageQueryEngine("lazy-upper-bound", true); // + // TODO CHECK + limitedSkolemUpperStore = getUpperStore("limited-skolem-upper-bound", true); } - // TODO add new upper store creation - importData(program.getAdditionalDataFile()); elho_ontology = new ELHOProfile().getFragment(ontology); @@ -151,7 +152,21 @@ public class MyQueryReasoner extends QueryReasoner { Utility.logInfo("time for satisfiability checking: " + t.duration()); } - // TODO add new upper store preprocessing + // TODO check + if (limitedSkolemUpperStore != null) { + limitedSkolemUpperStore.importRDFData(name, datafile); + limitedSkolemUpperStore.materialise("saturate named individuals", originalMarkProgram); + int tag = limitedSkolemUpperStore.materialiseSkolemly(program, null); + if (tag != 1) { + limitedSkolemUpperStore.dispose(); + limitedSkolemUpperStore = null; + } + if (tag == -1) return false; + } + if (consistency.checkSkolemUpper()) { + satisfiable = true; + Utility.logInfo("time for satisfiability checking: " + t.duration()); + } trackingStore.importRDFData(name, datafile); trackingStore.materialise("saturate named individuals", originalMarkProgram); @@ -223,6 +238,9 @@ public class MyQueryReasoner extends QueryReasoner { if (!queryRecord.isBottom() && lazyUpperStore != null) { queryUpperBound(trackingStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables()); } + if (!queryRecord.isBottom() && limitedSkolemUpperStore != null) { + queryUpperBound(limitedSkolemUpperStore, queryRecord, queryRecord.getQueryText(), queryRecord.getAnswerVariables()); + } // END: trying to intersect queryRecord.addProcessingTime(Step.UpperBound, t.duration()); -- cgit v1.2.3