aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/store-reasoning/src/test/java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-01 19:21:04 +0200
committerLibravatar Kristóf Marussy <kristof@marussy.com>2024-06-01 20:17:48 +0200
commit77e19919f6001b5ea29e707968d97a97d09743d6 (patch)
tree50885b976aea6c30117caa9fa3c572c2b0386eff /subprojects/store-reasoning/src/test/java
parentfeat: partial references (diff)
downloadrefinery-77e19919f6001b5ea29e707968d97a97d09743d6.tar.gz
refinery-77e19919f6001b5ea29e707968d97a97d09743d6.tar.zst
refinery-77e19919f6001b5ea29e707968d97a97d09743d6.zip
refactor(reasoning): candidate view should always be a refinement of partial
Merge the candidate may/must queries with the partial may/must queries so that reasoning in the candidate model uses "Gentzen-style" assumptions about the candidate values of partal symbols that would be computed as unknown. This should not lead to performance degradation, because the corresponding joins were already being computed in the stopping criterion. In many cases, the extra clauses are immediately optimized away by the query optimizer anyways.
Diffstat (limited to 'subprojects/store-reasoning/src/test/java')
-rw-r--r--subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java
index e87b2684..85147921 100644
--- a/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java
+++ b/subprojects/store-reasoning/src/test/java/tools/refinery/store/reasoning/translator/typehierarchy/TypeHierarchyPartialModelTest.java
@@ -149,7 +149,7 @@ class TypeHierarchyPartialModelTest {
149 149
150 var personCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, person); 150 var personCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, person);
151 assertThat(personCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE)); 151 assertThat(personCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
152 assertThat(personCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE)); 152 assertThat(personCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
153 153
154 var memberInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, member); 154 var memberInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, member);
155 assertThat(memberInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE)); 155 assertThat(memberInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
@@ -157,7 +157,7 @@ class TypeHierarchyPartialModelTest {
157 157
158 var memberCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, member); 158 var memberCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, member);
159 assertThat(memberCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE)); 159 assertThat(memberCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));
160 assertThat(memberCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE)); 160 assertThat(memberCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
161 161
162 var studentInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, student); 162 var studentInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, student);
163 assertThat(studentInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE)); 163 assertThat(studentInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
@@ -165,7 +165,7 @@ class TypeHierarchyPartialModelTest {
165 165
166 var studentCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, student); 166 var studentCandidateInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.CANDIDATE, student);
167 assertThat(studentCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE)); 167 assertThat(studentCandidateInterpretation.get(Tuple.of(1)), is(TruthValue.FALSE));
168 assertThat(studentCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.FALSE)); 168 assertThat(studentCandidateInterpretation.get(Tuple.of(3)), is(TruthValue.ERROR));
169 169
170 var teacherInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, teacher); 170 var teacherInterpretation = reasoningAdapter.getPartialInterpretation(Concreteness.PARTIAL, teacher);
171 assertThat(teacherInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE)); 171 assertThat(teacherInterpretation.get(Tuple.of(1)), is(TruthValue.TRUE));