Correctly implemented hiding predicates with nested arguments.
This commit is contained in:
@@ -137,4 +137,18 @@ TEST_CASE("[hidden predicate elimination] Hidden predicates are correctly elimin
|
||||
CHECK(output.str() ==
|
||||
"forall V1, V2 (a(V1, V2) <-> exists U1 ((V1 = 1 and V2 = 2 and U1 = 3) or (V1 = 2 and V2 = 4 and U1 = 6)))\n");
|
||||
}
|
||||
|
||||
SECTION("nested arguments are correctly handled when hiding predicates")
|
||||
{
|
||||
input <<
|
||||
"a(X) :- b(c(X)).\n"
|
||||
"b(c(X)) :- c(X).\n"
|
||||
"c(1..4).\n"
|
||||
"#show a/1.";
|
||||
anthem::translate("input", input, context);
|
||||
|
||||
// TODO: simplify further
|
||||
CHECK(output.str() ==
|
||||
"forall V1 (a(V1) <-> exists U1 (c(V1) = c(U1) and U1 in 1..4))\n");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user