Fix precedence of interval operator
The interval operator has a lower precedence than, for example, binary operations. This was unexpected and incorrectly implemented in the output functions. For now, this is fixed by enclosing intervals in parentheses to avoid misinterpretations. The existing unit tests are adjusted to the updated output format.
This commit is contained in:
@@ -40,7 +40,7 @@ TEST_CASE("[simplification] Rules are simplified correctly", "[simplification]")
|
||||
input << ":- not covered(I), I = 1..n.";
|
||||
anthem::translate("input", input, context);
|
||||
|
||||
CHECK(output.str() == "((not covered(U1) and U1 in 1..n) -> #false)\n");
|
||||
CHECK(output.str() == "((not covered(U1) and U1 in (1..n)) -> #false)\n");
|
||||
}
|
||||
|
||||
SECTION("comparisons")
|
||||
|
Reference in New Issue
Block a user