diff options
author | 2023-09-13 01:11:28 +0200 | |
---|---|---|
committer | 2023-09-13 01:11:28 +0200 | |
commit | ad61863eee6184f58adbe8900372cccfd2cb9d63 (patch) | |
tree | ea1f0b5417fb7197847a1b328a165ca70d541484 /subprojects | |
parent | refactor(frontend): hide non-existent nodes (diff) | |
download | refinery-ad61863eee6184f58adbe8900372cccfd2cb9d63.tar.gz refinery-ad61863eee6184f58adbe8900372cccfd2cb9d63.tar.zst refinery-ad61863eee6184f58adbe8900372cccfd2cb9d63.zip |
fix: multi-objects with lower bound of 1
If an object has a lower bound of 1, but it is still a multi-object, model
generation can't be finished yet.
Diffstat (limited to 'subprojects')
-rw-r--r-- | subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java index bad96a66..97fda9d5 100644 --- a/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java +++ b/subprojects/store-reasoning/src/main/java/tools/refinery/store/reasoning/translator/multiobject/MultiObjectTranslator.java | |||
@@ -48,11 +48,11 @@ public class MultiObjectTranslator implements ModelStoreConfiguration { | |||
48 | storeBuilder.symbol(COUNT_STORAGE); | 48 | storeBuilder.symbol(COUNT_STORAGE); |
49 | 49 | ||
50 | var aboveLowerBound = Query.of("count#aboveLowerBound", Integer.class, (builder, node, output) -> builder | 50 | var aboveLowerBound = Query.of("count#aboveLowerBound", Integer.class, (builder, node, output) -> builder |
51 | .clause(Integer.class, lowerBound -> List.of( | 51 | .clause( |
52 | LOWER_CARDINALITY_VIEW.call(node, lowerBound), | 52 | MULTI_VIEW.call(node), |
53 | output.assign(sub(lowerBound, IntTerms.constant(1))), | 53 | LOWER_CARDINALITY_VIEW.call(node, output), |
54 | check(greater(output, IntTerms.constant(0))) | 54 | check(greater(output, IntTerms.constant(0))) |
55 | ))); | 55 | )); |
56 | var missingCardinality = Query.of("count#missing", Integer.class, (builder, output) -> builder | 56 | var missingCardinality = Query.of("count#missing", Integer.class, (builder, output) -> builder |
57 | .clause( | 57 | .clause( |
58 | output.assign(aboveLowerBound.aggregate(INT_SUM, Variable.of())) | 58 | output.assign(aboveLowerBound.aggregate(INT_SUM, Variable.of())) |