Skip to content

Commit

Permalink
Merge pull request #222 from diffblue/ebmc-smt2-no-outfile
Browse files Browse the repository at this point in the history
ebmc: send output for --smt2 to console when no --outfile is given
  • Loading branch information
tautschnig authored Dec 2, 2023
2 parents e429921 + d950892 commit d4ed123
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions src/ebmc/ebmc_solver_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,29 @@ ebmc_solver_factoryt ebmc_solver_factory(const cmdlinet &cmdline)
if(smt2_solver.has_value())
{
return
[smt2_solver](const namespacet &ns, message_handlert &message_handler)
{
return ebmc_solvert{std::make_unique<smt2_dect>(
ns,
"ebmc",
"Generated by EBMC " EBMC_VERSION,
"QF_AUFBV",
smt2_solver.value(),
message_handler)};
};
[smt2_solver](const namespacet &ns, message_handlert &message_handler) {
if(smt2_solver == smt2_convt::solvert::GENERIC)
{
// --smt2 but no --outfile given. Send to std::cout.
return ebmc_solvert{std::make_unique<smt2_convt>(
ns,
"ebmc",
"Generated by EBMC " EBMC_VERSION,
"QF_AUFBV",
smt2_solver.value(),
std::cout)};
}
else
{
return ebmc_solvert{std::make_unique<smt2_dect>(
ns,
"ebmc",
"Generated by EBMC " EBMC_VERSION,
"QF_AUFBV",
smt2_solver.value(),
message_handler)};
}
};
}
else
{
Expand Down

0 comments on commit d4ed123

Please sign in to comment.