aboutsummaryrefslogtreecommitdiff
path: root/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java')
-rw-r--r--src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java b/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java
index 453b5ca..3fd2fbd 100644
--- a/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java
+++ b/src/uk/ac/ox/cs/pagoda/reasoner/ConsistencyManager.java
@@ -23,6 +23,7 @@ import uk.ac.ox.cs.pagoda.tracking.TrackingRuleEncoder;
23import uk.ac.ox.cs.pagoda.util.Timer; 23import uk.ac.ox.cs.pagoda.util.Timer;
24import uk.ac.ox.cs.pagoda.util.Utility; 24import uk.ac.ox.cs.pagoda.util.Utility;
25import uk.ac.ox.cs.pagoda.util.disposable.Disposable; 25import uk.ac.ox.cs.pagoda.util.disposable.Disposable;
26import uk.ac.ox.cs.pagoda.util.disposable.DisposedException;
26 27
27import java.util.LinkedList; 28import java.util.LinkedList;
28 29
@@ -49,6 +50,8 @@ public class ConsistencyManager extends Disposable {
49 } 50 }
50 51
51 public void extractBottomFragment() { 52 public void extractBottomFragment() {
53 if(isDisposed()) throw new DisposedException();
54
52 if(fragmentExtracted) return; 55 if(fragmentExtracted) return;
53 fragmentExtracted = true; 56 fragmentExtracted = true;
54 57
@@ -141,10 +144,14 @@ public class ConsistencyManager extends Disposable {
141 } 144 }
142 145
143 public QueryRecord[] getQueryRecords() { 146 public QueryRecord[] getQueryRecords() {
147 if(isDisposed()) throw new DisposedException();
148
144 return botQueryRecords; 149 return botQueryRecords;
145 } 150 }
146 151
147 boolean checkRLLowerBound() { 152 boolean checkRLLowerBound() {
153 if(isDisposed()) throw new DisposedException();
154
148 fullQueryRecord = m_queryManager.create(QueryRecord.botQueryText, 0); 155 fullQueryRecord = m_queryManager.create(QueryRecord.botQueryText, 0);
149 AnswerTuples iter = null; 156 AnswerTuples iter = null;
150 157
@@ -175,6 +182,8 @@ public class ConsistencyManager extends Disposable {
175// } 182// }
176 183
177 boolean checkELLowerBound() { 184 boolean checkELLowerBound() {
185 if(isDisposed()) throw new DisposedException();
186
178 fullQueryRecord.updateLowerBoundAnswers(m_reasoner.elLowerStore.evaluate(fullQueryRecord.getQueryText(), fullQueryRecord 187 fullQueryRecord.updateLowerBoundAnswers(m_reasoner.elLowerStore.evaluate(fullQueryRecord.getQueryText(), fullQueryRecord
179 .getAnswerVariables())); 188 .getAnswerVariables()));
180 if(fullQueryRecord.getNoOfSoundAnswers() > 0) { 189 if(fullQueryRecord.getNoOfSoundAnswers() > 0) {
@@ -185,6 +194,8 @@ public class ConsistencyManager extends Disposable {
185 } 194 }
186 195
187 boolean checkUpper(BasicQueryEngine upperStore) { 196 boolean checkUpper(BasicQueryEngine upperStore) {
197 if(isDisposed()) throw new DisposedException();
198
188 if(upperStore != null) { 199 if(upperStore != null) {
189 AnswerTuples tuples = null; 200 AnswerTuples tuples = null;
190 try { 201 try {
@@ -202,6 +213,8 @@ public class ConsistencyManager extends Disposable {
202 } 213 }
203 214
204 boolean check() { 215 boolean check() {
216 if(isDisposed()) throw new DisposedException();
217
205// if (!checkRLLowerBound()) return false; 218// if (!checkRLLowerBound()) return false;
206// if (!checkELLowerBound()) return false; 219// if (!checkELLowerBound()) return false;
207// if (checkLazyUpper()) return true; 220// if (checkLazyUpper()) return true;