PR #7240 changed the printing of set-info to always include quote the
value. This commit changes the policy to only quote a symbol if
necessary using existing an existing helper method. Otherwise,
(set-info :status sat) is for example printed as (set-info :status |sat|), which is a bit unusual and may break certain scripts.
const std::string& flag,
const std::string& value) const
{
- out << "(set-info :" << flag << " |" << value << "|)" << std::endl;
+ out << "(set-info :" << flag << " " << cvc5::quoteSymbol(value) << ")"
+ << std::endl;
}
void Smt2Printer::toStreamCmdGetInfo(std::ostream& out,