mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
enable logging nla lemmas
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2a4f0e785b
commit
bebcd94703
5 changed files with 37 additions and 0 deletions
|
@ -3,6 +3,10 @@
|
|||
Author: Nikolaj Bjorner, Lev Nachmanson
|
||||
*/
|
||||
|
||||
#ifndef SINGLE_THREAD
|
||||
#include <thread>
|
||||
#endif
|
||||
#include <fstream>
|
||||
#include "math/lp/lar_solver.h"
|
||||
#include "math/lp/nra_solver.h"
|
||||
#include "nlsat/nlsat_solver.h"
|
||||
|
@ -11,6 +15,7 @@
|
|||
#include "util/map.h"
|
||||
#include "util/uint_set.h"
|
||||
#include "math/lp/nla_core.h"
|
||||
#include "smt/params/smt_params_helper.hpp"
|
||||
|
||||
|
||||
namespace nra {
|
||||
|
@ -157,6 +162,23 @@ struct solver::imp {
|
|||
|
||||
TRACE("nra", m_nlsat->display(tout));
|
||||
|
||||
smt_params_helper p(m_params);
|
||||
if (p.arith_nl_log()) {
|
||||
static unsigned id = 0;
|
||||
std::stringstream strm;
|
||||
|
||||
#ifndef SINGLE_THREAD
|
||||
std::thread::id this_id = std::this_thread::get_id();
|
||||
strm << "nla_" << this_id << "." << (++id) << ".smt2";
|
||||
#else
|
||||
strm << "nla_" << (++id) << ".smt2";
|
||||
#endif
|
||||
std::ofstream out(strm.str());
|
||||
m_nlsat->display_smt2(out);
|
||||
out << "(check-sat)\n";
|
||||
out.close();
|
||||
}
|
||||
|
||||
lbool r = l_undef;
|
||||
try {
|
||||
r = m_nlsat->check();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue