CVC4 was printing success when `--force-logic` was used because
internally, `--force-logic` generates a `SetBenchmarkLogicCommand`. This
caused issues with the SMT-COMP trace executor. This commit fixes the
behavior by muting the command if it was not issued by the user.
The issue was likely introduced with #3062.
addTheory(THEORY_SEP);
}
- if (sygus())
- {
- return new SetBenchmarkLogicCommand(d_logic.getLogicString());
- }
- else
- {
- return new SetBenchmarkLogicCommand(name);
- }
+ Command* cmd = new SetBenchmarkLogicCommand(sygus() ? d_logic.getLogicString() : name);
+ cmd->setMuted(!fromCommand);
+ return cmd;
} /* Smt2::setLogic() */
bool Smt2::sygus() const
regress0/parser/constraint.smt2
regress0/parser/declarefun-emptyset-uf.smt2
regress0/parser/force_logic_set_logic.smt2
+ regress0/parser/force_logic_success.smt2
regress0/parser/shadow_fun_symbol_all.smt2
regress0/parser/shadow_fun_symbol_nirat.smt2
regress0/parser/strings20.smt2
--- /dev/null
+; COMMAND-LINE: --force-logic QF_BV --print-success
+; EXPECT: success
+; EXPECT: sat
+(assert true)
+(check-sat)