Fixed continuous numbering of auxiliary variables.
This commit is contained in:
@@ -16,6 +16,12 @@ namespace anthem
|
||||
|
||||
struct Context
|
||||
{
|
||||
void reset()
|
||||
{
|
||||
headTerms.clear();
|
||||
auxiliaryBodyLiteralID = 1;
|
||||
}
|
||||
|
||||
output::Logger logger;
|
||||
|
||||
std::vector<const Clingo::AST::Term *> headTerms;
|
||||
|
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user