diff options
Diffstat (limited to 'subprojects/store-query/src/main/java/tools/refinery/store/query/literal/LiteralReduction.java')
-rw-r--r-- | subprojects/store-query/src/main/java/tools/refinery/store/query/literal/LiteralReduction.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/LiteralReduction.java b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/LiteralReduction.java new file mode 100644 index 00000000..146089f6 --- /dev/null +++ b/subprojects/store-query/src/main/java/tools/refinery/store/query/literal/LiteralReduction.java | |||
@@ -0,0 +1,26 @@ | |||
1 | package tools.refinery.store.query.literal; | ||
2 | |||
3 | public enum LiteralReduction { | ||
4 | /** | ||
5 | * Signifies that a literal should be preserved in the clause. | ||
6 | */ | ||
7 | NOT_REDUCIBLE, | ||
8 | |||
9 | /** | ||
10 | * Signifies that the literal may be omitted from the cause (if the model being queried is nonempty). | ||
11 | */ | ||
12 | ALWAYS_TRUE, | ||
13 | |||
14 | /** | ||
15 | * Signifies that the clause with the literal may be omitted entirely. | ||
16 | */ | ||
17 | ALWAYS_FALSE; | ||
18 | |||
19 | public LiteralReduction negate() { | ||
20 | return switch (this) { | ||
21 | case NOT_REDUCIBLE -> NOT_REDUCIBLE; | ||
22 | case ALWAYS_TRUE -> ALWAYS_FALSE; | ||
23 | case ALWAYS_FALSE -> ALWAYS_TRUE; | ||
24 | }; | ||
25 | } | ||
26 | } | ||