This removes the dependency on the Expr layer from src/main.
This requires moving the flushing of NodeManager statistics within SmtEngine.
This is a temporary solution until we have a permanent solution for statistics.
void CommandExecutor::flushStatistics(std::ostream& out) const
{
- d_solver->getExprManager()->getStatistics().flushInformation(out);
- d_smtEngine->getStatistics().flushInformation(out);
+ // SmtEngine + node manager flush statistics is part of the call below
+ d_smtEngine->flushStatistics(out);
d_stats.flushInformation(out);
}
void CommandExecutor::safeFlushStatistics(int fd) const
{
- d_solver->getExprManager()->safeFlushStatistics(fd);
+ // SmtEngine + node manager flush statistics is part of the call below
d_smtEngine->safeFlushStatistics(fd);
d_stats.safeFlushInformation(fd);
}
#include <string>
#include "api/cvc4cpp.h"
-#include "expr/expr_manager.h"
#include "expr/symbol_manager.h"
#include "options/options.h"
#include "smt/smt_engine.h"
#include "api/cvc4cpp.h"
#include "base/configuration.h"
#include "base/output.h"
-#include "expr/expr_iomanip.h"
-#include "expr/expr_manager.h"
#include "main/command_executor.h"
#include "main/interactive_shell.h"
#include "main/main.h"
#include "base/configuration.h"
#include "base/output.h"
-#include "expr/expr_manager.h"
#include "main/command_executor.h"
#include "main/interactive_shell.h"
#include "options/language.h"
#include "parser/parser.h"
#include "parser/parser_builder.h"
#include "parser/parser_exception.h"
-#include "smt/smt_engine.h"
#include "util/result.h"
#include "util/statistics.h"
#include "base/exception.h"
#include "cvc4autoconfig.h"
-#include "expr/expr_manager.h"
#include "options/options.h"
-#include "smt/smt_engine.h"
#include "util/statistics.h"
#include "util/statistics_registry.h"
return d_statisticsRegistry->getStatistic(name);
}
-void SmtEngine::safeFlushStatistics(int fd) const {
+void SmtEngine::flushStatistics(std::ostream& out) const
+{
+ d_nodeManager->getStatisticsRegistry()->flushInformation(out);
+ d_statisticsRegistry->flushInformation(out);
+}
+
+void SmtEngine::safeFlushStatistics(int fd) const
+{
+ d_nodeManager->getStatisticsRegistry()->safeFlushInformation(fd);
d_statisticsRegistry->safeFlushInformation(fd);
}
/** Get the value of one named statistic from this SmtEngine. */
SExpr getStatistic(std::string name) const;
- /** Flush statistic from this SmtEngine. Safe to use in a signal handler. */
+ /** Flush statistics from this SmtEngine and the NodeManager it uses. */
+ void flushStatistics(std::ostream& out) const;
+
+ /**
+ * Flush statistics from this SmtEngine and the NodeManager it uses. Safe to
+ * use in a signal handler.
+ */
void safeFlushStatistics(int fd) const;
/**