}
if (options::getDumpInstantiations(d_options)
- && ((options::getInstFormatMode(d_options)
- != options::InstFormatMode::SZS
- && (res.isSat()
- || (res.isSatUnknown()
- && res.getUnknownExplanation()
- == api::Result::INCOMPLETE)))
- || isResultUnsat))
+ && GetInstantiationsCommand::isEnabled(d_solver.get(), res))
{
getterCommands.emplace_back(new GetInstantiationsCommand());
}
#include "expr/symbol_manager.h"
#include "expr/type_node.h"
#include "options/options.h"
+#include "options/printer_options.h"
#include "options/smt_options.h"
#include "printer/printer.h"
#include "proof/unsat_core.h"
/* -------------------------------------------------------------------------- */
GetInstantiationsCommand::GetInstantiationsCommand() : d_solver(nullptr) {}
+bool GetInstantiationsCommand::isEnabled(api::Solver* solver,
+ const api::Result& res)
+{
+ return (solver->getOptions().printer.instFormatMode
+ != options::InstFormatMode::SZS
+ && (res.isSat()
+ || (res.isSatUnknown()
+ && res.getUnknownExplanation() == api::Result::INCOMPLETE)))
+ || res.isUnsat() || res.isEntailed();
+}
void GetInstantiationsCommand::invoke(api::Solver* solver, SymbolManager* sm)
{
try
public:
GetInstantiationsCommand();
+ static bool isEnabled(api::Solver* solver, const api::Result& res);
void invoke(api::Solver* solver, SymbolManager* sm) override;
void printResult(std::ostream& out, uint32_t verbosity = 2) const override;
Command* clone() const override;