diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-03-01 02:15:50 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-03-01 11:10:39 +0100 |
commit | da5d898b3bad6f55efd6619f0abee0ec8aa1de4b (patch) | |
tree | d752bb975189a52aaaa5211e64dec42ea0b152fe /subprojects/store-reasoning/src/main/java | |
parent | chore(deps): bump dependencies (diff) | |
download | refinery-da5d898b3bad6f55efd6619f0abee0ec8aa1de4b.tar.gz refinery-da5d898b3bad6f55efd6619f0abee0ec8aa1de4b.tar.zst refinery-da5d898b3bad6f55efd6619f0abee0ec8aa1de4b.zip |
refactor: more direct access to VIATRA result set
Accessing VIATRA result sets through IQueryResultProvider requires a lot
of indirection, allocations, and locking.
We use reflection instead to have direct access to the underlying
Indexer instead.
Unfortunately, projection to arbitrary tuple masks (with wildcard
entries in a tuple) is completely broken in VIATRA when RETE update
propagation is delayed. While a new, ad-hoc projection indexer gets
added to the RETE net immediately, it is not populated with the
projection results until updates are flushed in the query engine.
Therefore, when encountering an ad-hoc projection for the first time,
the projection results will always be empty (thus usually out of date).
While declaring the desired projections ahead of time would be a
possible solution, for now, we completely remove ad-hoc projection
support. If projections are needed on the ModelQuery level, we should
create an API for declaring projections for each registered Dnf.
Diffstat (limited to 'subprojects/store-reasoning/src/main/java')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java (renamed from subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Seed.java) | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Seed.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java index 779eadbe..042c2636 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/Seed.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/seed/Seed.java | |||
@@ -6,6 +6,8 @@ import tools.refinery.store.tuple.Tuple; | |||
6 | public interface Seed<T> { | 6 | public interface Seed<T> { |
7 | int arity(); | 7 | int arity(); |
8 | 8 | ||
9 | T getReducedValue(); | ||
10 | |||
9 | T get(Tuple key); | 11 | T get(Tuple key); |
10 | 12 | ||
11 | Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount); | 13 | Cursor<Tuple, T> getCursor(T defaultValue, int nodeCount); |