blob: 9d8352ea36fde999852c9b42da1564d9b7795aae (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/*
* SPDX-FileCopyrightText: 2021-2023 The Refinery Authors <https://refinery.tools/>
*
* SPDX-License-Identifier: EPL-2.0
*/
package tools.refinery.store.query.literal;
public enum LiteralReduction {
/**
* Signifies that a literal should be preserved in the clause.
*/
NOT_REDUCIBLE,
/**
* Signifies that the literal may be omitted from the cause (if the model being queried is nonempty).
*/
ALWAYS_TRUE,
/**
* Signifies that the clause with the literal may be omitted entirely.
*/
ALWAYS_FALSE;
public LiteralReduction negate() {
return switch (this) {
case NOT_REDUCIBLE -> NOT_REDUCIBLE;
case ALWAYS_TRUE -> ALWAYS_FALSE;
case ALWAYS_FALSE -> ALWAYS_TRUE;
};
}
}
|