diff options
| author | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 18:22:26 +0100 |
|---|---|---|
| committer | RncLsn <rnc.lsn@gmail.com> | 2015-05-19 18:22:26 +0100 |
| commit | 612729386b645b120f8397a007cd8421986af0ad (patch) | |
| tree | f5d15c839092c1dd65e951aa98f4256bfa391a0b /src/uk/ac/ox/cs/pagoda/rules/approximators | |
| parent | 5d54af2638a53721b414a41356a93686a9616272 (diff) | |
| download | ACQuA-612729386b645b120f8397a007cd8421986af0ad.tar.gz ACQuA-612729386b645b120f8397a007cd8421986af0ad.zip | |
Changes in the upper store querying (mainly in MyQueryReasoner).
Diffstat (limited to 'src/uk/ac/ox/cs/pagoda/rules/approximators')
| -rw-r--r-- | src/uk/ac/ox/cs/pagoda/rules/approximators/LimitedSkolemisationApproximator.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/uk/ac/ox/cs/pagoda/rules/approximators/LimitedSkolemisationApproximator.java b/src/uk/ac/ox/cs/pagoda/rules/approximators/LimitedSkolemisationApproximator.java index ba58e23..20ae53b 100644 --- a/src/uk/ac/ox/cs/pagoda/rules/approximators/LimitedSkolemisationApproximator.java +++ b/src/uk/ac/ox/cs/pagoda/rules/approximators/LimitedSkolemisationApproximator.java | |||
| @@ -20,11 +20,10 @@ import java.util.*; | |||
| 20 | public class LimitedSkolemisationApproximator implements TupleDependentApproximator { | 20 | public class LimitedSkolemisationApproximator implements TupleDependentApproximator { |
| 21 | 21 | ||
| 22 | private static final Atom[] EMPTY_BODY = new Atom[0]; | 22 | private static final Atom[] EMPTY_BODY = new Atom[0]; |
| 23 | 23 | private static final Variable X = Variable.create("X"); | |
| 24 | private final int maxTermDepth; | 24 | private final int maxTermDepth; |
| 25 | private final TupleDependentApproximator alternativeApproximator; | 25 | private final TupleDependentApproximator alternativeApproximator; |
| 26 | private final SkolemTermsManager skolemTermsManager; | 26 | private final SkolemTermsManager skolemTermsManager; |
| 27 | |||
| 28 | private Map<AnswerTupleID, Integer> mapIndividualsToDepth; | 27 | private Map<AnswerTupleID, Integer> mapIndividualsToDepth; |
| 29 | 28 | ||
| 30 | public LimitedSkolemisationApproximator(int maxTermDepth) { | 29 | public LimitedSkolemisationApproximator(int maxTermDepth) { |
| @@ -67,8 +66,6 @@ public class LimitedSkolemisationApproximator implements TupleDependentApproxima | |||
| 67 | return result; | 66 | return result; |
| 68 | } | 67 | } |
| 69 | 68 | ||
| 70 | private static final Variable X = Variable.create("X"); | ||
| 71 | |||
| 72 | private Collection<DLClause> getGroundSkolemisation(DLClause clause, | 69 | private Collection<DLClause> getGroundSkolemisation(DLClause clause, |
| 73 | DLClause originalClause, | 70 | DLClause originalClause, |
| 74 | Tuple<Individual> violationTuple) { | 71 | Tuple<Individual> violationTuple) { |
| @@ -78,8 +75,8 @@ public class LimitedSkolemisationApproximator implements TupleDependentApproxima | |||
| 78 | // TODO check: strong assumption, the first tuples are the common ones | 75 | // TODO check: strong assumption, the first tuples are the common ones |
| 79 | TupleBuilder<Individual> commonIndividualsBuilder = new TupleBuilder<>(); | 76 | TupleBuilder<Individual> commonIndividualsBuilder = new TupleBuilder<>(); |
| 80 | for (int i = 0; i < commonVars.length; i++) | 77 | for (int i = 0; i < commonVars.length; i++) |
| 81 | commonIndividualsBuilder.add(violationTuple.get(i)); | 78 | commonIndividualsBuilder.append(violationTuple.get(i)); |
| 82 | Tuple<Individual> commonIndividuals = commonIndividualsBuilder.create(); | 79 | Tuple<Individual> commonIndividuals = commonIndividualsBuilder.build(); |
| 83 | 80 | ||
| 84 | Atom headAtom = clause.getHeadAtom(0); | 81 | Atom headAtom = clause.getHeadAtom(0); |
| 85 | 82 | ||
