Fixed misleading error message concerning negated, unsupported body literals.
This commit is contained in:
parent
ef715de6c4
commit
d0cbdb13e5
@ -9,6 +9,7 @@ Features:
|
||||
Bug Fixes:
|
||||
|
||||
* fixes incorrectly simplified rules with comparisons
|
||||
* fixes misleading error message concerning negated, unsupported body literals
|
||||
|
||||
## 0.1.2 (2017-03-23)
|
||||
|
||||
|
@ -144,8 +144,11 @@ struct BodyLiteralTranslateVisitor
|
||||
|
||||
struct BodyBodyLiteralTranslateVisitor
|
||||
{
|
||||
std::experimental::optional<ast::Formula> visit(const Clingo::AST::Literal &literal, const Clingo::AST::BodyLiteral &, Context &context)
|
||||
std::experimental::optional<ast::Formula> visit(const Clingo::AST::Literal &literal, const Clingo::AST::BodyLiteral &bodyLiteral, Context &context)
|
||||
{
|
||||
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
||||
throwErrorAtLocation(bodyLiteral.location, "only positive body literals supported currently", context);
|
||||
|
||||
return literal.data.accept(BodyLiteralTranslateVisitor(), literal, context);
|
||||
}
|
||||
|
||||
|
@ -65,9 +65,6 @@ struct StatementVisitor
|
||||
{
|
||||
const auto &bodyLiteral = *i;
|
||||
|
||||
if (bodyLiteral.sign != Clingo::AST::Sign::None)
|
||||
throwErrorAtLocation(bodyLiteral.location, "only positive literals currently supported", context);
|
||||
|
||||
auto argument = bodyLiteral.data.accept(BodyBodyLiteralTranslateVisitor(), bodyLiteral, context);
|
||||
|
||||
if (!argument)
|
||||
|
Loading…
Reference in New Issue
Block a user