help = "print top-level substitutions learned during preprocessing"
description = "With ``-o subs``, cvc5 prints top-level substitutions learned during preprocessing."
example-file = "regress0/printer/subs-output.smt2"
+[[option.mode.POST_ASSERTS]]
+ name = "post-asserts"
+ help = "print assertions corresponding to the input problem after preprocessing"
+ description = "With ``-o post-asserts``, cvc5 prints assertions corresponding to the input problem after preprocessing."
+ example-file = "regress0/printer/post-asserts-output.smt2"
# Stores then enabled output tags.
[[option]]
Trace("smt-proc") << "ProcessAssertions::apply() end" << endl;
dumpAssertions("assertions::post-everything", as);
Trace("assertions::post-everything") << std::endl;
+ if (isOutputOn(OutputTag::POST_ASSERTS))
+ {
+ std::ostream& outPA = d_env.output(OutputTag::POST_ASSERTS);
+ outPA << ";; post-asserts start" << std::endl;
+ dumpAssertionsToStream(outPA, as);
+ outPA << ";; post-asserts end" << std::endl;
+ }
return noConflict;
}
{
return;
}
+ std::stringstream ss;
+ dumpAssertionsToStream(ss, as);
+ Trace(key) << ";;; " << key << " start" << std::endl;
+ Trace(key) << ss.str();
+ Trace(key) << ";;; " << key << " end " << std::endl;
+}
+
+void ProcessAssertions::dumpAssertionsToStream(std::ostream& os, Assertions& as)
+{
// Cannot print unless produce assertions is enabled. Otherwise, the printing
// is misleading, since it does not capture what symbols were provided
// as definitions.
{
assertions.push_back(ap[i]);
}
- std::stringstream ss;
- pb.printBenchmark(ss, logicInfo().getLogicString(), defs, assertions);
- Trace(key) << ";;; " << key << " start" << std::endl;
- Trace(key) << ss.str();
- Trace(key) << ";;; " << key << " end " << std::endl;
+ pb.printBenchmark(os, logicInfo().getLogicString(), defs, assertions);
}
PreprocessingPassResult ProcessAssertions::applyPass(const std::string& pname,
* assertions:`key` if it is enabled.
*/
void dumpAssertions(const std::string& key, Assertions& as);
+ /**
+ * Dump assertions to stream os using the print benchmark utility.
+ */
+ void dumpAssertionsToStream(std::ostream& os, Assertions& as);
/** apply pass */
preprocessing::PreprocessingPassResult applyPass(const std::string& pass,
Assertions& as);
regress0/printer/empty_symbol_name.smt2
regress0/printer/learned-lit-output.smt2
regress0/printer/let_shadowing.smt2
+ regress0/printer/post-asserts-output.smt2
regress0/printer/print_subs.smt2
regress0/printer/symbol_starting_w_digit.smt2
regress0/printer/tuples_and_records.cvc.smt2