5 #include <carl-io/SMTLIBStream.h>
12 namespace validation {
18 template<Val
idationOutputFormat SOF>
21 template<Val
idationOutputFormat SOF>
26 carl::io::SMTLIBStream sls;
27 sls.setInfo(
"smt-lib-version",
"2.0");
28 for (
const auto& s: ValidationCollector::getInstance().points()) {
29 if (s->formulas().empty())
continue;
31 for (
const auto& kv: s->formulas()) {
33 sls.comment(s->identifier() +
" #" + std::to_string(
id) +
" (" + std::get<2>(kv) +
")");
34 sls.echo(s->identifier() +
" #" + std::to_string(
id) +
" (" + std::get<2>(kv) +
")");
35 sls.setOption(
"interactive-mode",
"true");
36 sls.setInfo(
"status", (std::get<1>(kv) ?
"sat" :
"unsat"));
37 #ifndef VALIDATION_STORE_STRINGS
38 sls.declare(std::get<0>(kv).logic());
39 sls.declare(carl::variables(std::get<0>(kv)));
40 sls.assertFormula(std::get<0>(kv));
42 sls << std::get<0>(kv);
60 file.open(filename, std::ios::out);
void validation_formulas_to_smtlib_file(const std::string &filename)
auto validation_formulas_as_smtlib()
std::ostream & operator<<(std::ostream &os, ValidationPrinter< SOF >)
Class to create the formulas for axioms.