diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-06-29 02:08:40 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-06-29 02:22:13 +0200 |
commit | 8d79e7f39df0fde9b4f0ba8e6264f2900e9024c6 (patch) | |
tree | 9cc6850dba18ed526eb27a911bc3f73b28752a14 /subprojects/store-reasoning/src | |
parent | fix: FilteredView default value (diff) | |
download | refinery-8d79e7f39df0fde9b4f0ba8e6264f2900e9024c6.tar.gz refinery-8d79e7f39df0fde9b4f0ba8e6264f2900e9024c6.tar.zst refinery-8d79e7f39df0fde9b4f0ba8e6264f2900e9024c6.zip |
feat: ordered query ResultSet
Enable deterministic state-space exploration by ordering activations in
lexicographic order.
This preliminary implementation adds oredering as a wrapper for ResultSet
instances, but more sophisticated support could be built directly into query
engine adapters if a query engine supports deterministic output by default.
* Implements Comparable for tuples with loops unrolled for small tuples by hand.
* Cleans up the contents of the (root of the) tools.refinery.query package.
* Adds ResultSetListener to notify clients about ResultSet changes.
* Adds OrderStatisticTree data structure for determinisitc ordering of keys.
Diffstat (limited to 'subprojects/store-reasoning/src')
4 files changed, 4 insertions, 4 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java index 8f319242..6d5d6f89 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/ReasoningAdapter.java | |||
@@ -6,7 +6,7 @@ | |||
6 | package tools.refinery.store.reasoning; | 6 | package tools.refinery.store.reasoning; |
7 | 7 | ||
8 | import tools.refinery.store.adapter.ModelAdapter; | 8 | import tools.refinery.store.adapter.ModelAdapter; |
9 | import tools.refinery.store.query.ResultSet; | 9 | import tools.refinery.store.query.resultset.ResultSet; |
10 | import tools.refinery.store.query.dnf.Dnf; | 10 | import tools.refinery.store.query.dnf.Dnf; |
11 | import tools.refinery.store.reasoning.representation.AnyPartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.AnyPartialSymbol; |
12 | import tools.refinery.store.reasoning.representation.PartialRelation; | 12 | import tools.refinery.store.reasoning.representation.PartialRelation; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java index 33b6f3c6..1bd3ad2e 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/internal/ReasoningAdapterImpl.java | |||
@@ -10,7 +10,7 @@ import tools.refinery.store.reasoning.ReasoningAdapter; | |||
10 | import tools.refinery.store.reasoning.PartialInterpretation; | 10 | import tools.refinery.store.reasoning.PartialInterpretation; |
11 | import tools.refinery.store.reasoning.representation.PartialSymbol; | 11 | import tools.refinery.store.reasoning.representation.PartialSymbol; |
12 | import tools.refinery.store.query.dnf.Dnf; | 12 | import tools.refinery.store.query.dnf.Dnf; |
13 | import tools.refinery.store.query.ResultSet; | 13 | import tools.refinery.store.query.resultset.ResultSet; |
14 | 14 | ||
15 | public class ReasoningAdapterImpl implements ReasoningAdapter { | 15 | public class ReasoningAdapterImpl implements ReasoningAdapter { |
16 | private final Model model; | 16 | private final Model model; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java index 5ad1d5f8..4e5a6099 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/literal/ModalConstraint.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.reasoning.literal; | |||
7 | 7 | ||
8 | import tools.refinery.store.query.Constraint; | 8 | import tools.refinery.store.query.Constraint; |
9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; | 9 | import tools.refinery.store.query.equality.LiteralEqualityHelper; |
10 | import tools.refinery.store.query.Reduction; | 10 | import tools.refinery.store.query.literal.Reduction; |
11 | import tools.refinery.store.query.term.Parameter; | 11 | import tools.refinery.store.query.term.Parameter; |
12 | 12 | ||
13 | import java.util.List; | 13 | import java.util.List; |
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java index e7b67ae4..2a151aa2 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/base/BaseDecisionInterpretation.java | |||
@@ -7,7 +7,7 @@ package tools.refinery.store.reasoning.translator.base; | |||
7 | 7 | ||
8 | import tools.refinery.store.map.Cursor; | 8 | import tools.refinery.store.map.Cursor; |
9 | import tools.refinery.store.model.Interpretation; | 9 | import tools.refinery.store.model.Interpretation; |
10 | import tools.refinery.store.query.ResultSet; | 10 | import tools.refinery.store.query.resultset.ResultSet; |
11 | import tools.refinery.store.reasoning.MergeResult; | 11 | import tools.refinery.store.reasoning.MergeResult; |
12 | import tools.refinery.store.reasoning.PartialInterpretation; | 12 | import tools.refinery.store.reasoning.PartialInterpretation; |
13 | import tools.refinery.store.reasoning.ReasoningAdapter; | 13 | import tools.refinery.store.reasoning.ReasoningAdapter; |