Fixed continuous numbering of auxiliary variables.

This commit is contained in:
2016-11-24 16:50:35 +01:00
parent fc89a65ce7
commit 442fa8791a
3 changed files with 18 additions and 2 deletions

View File

@@ -16,6 +16,12 @@ namespace anthem
struct Context
{
void reset()
{
headTerms.clear();
auxiliaryBodyLiteralID = 1;
}
output::Logger logger;
std::vector<const Clingo::AST::Term *> headTerms;

View File

@@ -28,8 +28,7 @@ struct StatementVisitor
void visit(const Clingo::AST::Rule &rule, const Clingo::AST::Statement &, Context &context)
{
// TODO: implement more nicely
context.headTerms.clear();
context.reset();
auto &outputStream = context.logger.outputStream();