Added another simplification step after completion.

This commit is contained in:
2017-06-04 14:36:09 +02:00
parent 4ed4458f1b
commit dcc504ebc0
2 changed files with 10 additions and 3 deletions

View File

@@ -79,6 +79,13 @@ void translate(const char *fileName, std::istream &stream, Context &context)
auto completedFormulas = complete(std::move(scopedFormulas));
// TODO: rethink simplification steps
if (context.simplify)
for (auto &completedFormula : completedFormulas)
simplify(completedFormula);
// TODO: remove variables that are not referenced after simplification
for (const auto &completedFormula : completedFormulas)
{
ast::print(context.logger.outputStream(), completedFormula, printContext);