mirror of
https://github.com/Z3Prover/z3
synced 2025-08-20 10:10:21 +00:00
write validation in bv format too
This commit is contained in:
parent
37bf5fefca
commit
58c14ba2f9
1 changed files with 46 additions and 18 deletions
|
@ -251,6 +251,16 @@ namespace intblast {
|
|||
else
|
||||
name_esc = "<none>";
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
static unsigned num_check = 0;
|
||||
num_check += 1;
|
||||
|
||||
{
|
||||
fs::path filename = std::string("validation/int-") + std::to_string(num_check) + ".smt2";
|
||||
fs::create_directories(filename.parent_path());
|
||||
IF_VERBOSE(1, verbose_stream() << "validation check written to file " << filename << "\n");
|
||||
std::ofstream file(filename);
|
||||
|
||||
file << "(set-logic ALL)\n";
|
||||
file << "(set-info :source |\n";
|
||||
file << " Name: " << name_esc << "\n";
|
||||
|
@ -262,8 +272,26 @@ namespace intblast {
|
|||
m_solver->pop(1);
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
// if (num_check == 68)
|
||||
{
|
||||
fs::path filename = std::string("validation/bv-") + std::to_string(num_check) + ".smt2";
|
||||
std::ofstream file(filename);
|
||||
|
||||
file << "(set-logic ALL)\n";
|
||||
file << "(set-info :source |\n";
|
||||
file << " Name: " << name_esc << "\n";
|
||||
file << original_es << "\n|)\n";
|
||||
|
||||
m_solver->push();
|
||||
m_solver->assert_expr(original_es);
|
||||
m_solver->display(file) << "(check-sat)\n";
|
||||
m_solver->pop(1);
|
||||
|
||||
file.close();
|
||||
}
|
||||
|
||||
// if (num_check == 62)
|
||||
// std::abort();
|
||||
|
||||
r = l_false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue