Fixed incorrect handling of implications with Booleans.

This commit is contained in:
2017-04-08 20:17:01 +02:00
parent 2ef3ef24a1
commit 37526bcc8e
3 changed files with 60 additions and 15 deletions

View File

@@ -69,4 +69,17 @@ TEST_CASE("[completion] Rules are completed", "[completion]")
CHECK(output.str() == "q\nr\nt\ns\n");
}
SECTION("useless implications")
{
input << "#true :- p, q(N), t(1, 2).\n"
"#true.\n"
"h :- #false.";
REQUIRE_NOTHROW(anthem::translate("input", input, context));
// TODO: implement completion for unused predicates
CHECK(output.str() == "not h\n");
}
// TODO: test collecting free variables
}