3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-13 02:34:43 +00:00

Bugfix for theory_fpa construction and destruction.

This commit is contained in:
Christoph M. Wintersteiger 2015-11-09 13:54:28 +00:00
parent 689ed9fa12
commit 5995c753d3
2 changed files with 24 additions and 6 deletions

View file

@ -142,7 +142,8 @@ namespace smt {
m_trail_stack(*this),
m_fpa_util(m_converter.fu()),
m_bv_util(m_converter.bu()),
m_arith_util(m_converter.au())
m_arith_util(m_converter.au()),
m_is_initialized(false)
{
params_ref p;
p.set_bool("arith_lhs", true);
@ -151,10 +152,24 @@ namespace smt {
theory_fpa::~theory_fpa()
{
ast_manager & m = get_manager();
dec_ref_map_values(m, m_conversions);
dec_ref_map_values(m, m_wraps);
dec_ref_map_values(m, m_unwraps);
if (m_is_initialized) {
ast_manager & m = get_manager();
dec_ref_map_values(m, m_conversions);
dec_ref_map_values(m, m_wraps);
dec_ref_map_values(m, m_unwraps);
}
else {
SASSERT(m_conversions.empty());
SASSERT(m_wraps.empty());
SASSERT(m_unwraps.empty());
}
m_is_initialized = false;
}
void theory_fpa::init(context * ctx) {
smt::theory::init(ctx);
m_is_initialized = true;
}
app * theory_fpa::fpa_value_proc::mk_value(model_generator & mg, ptr_vector<expr> & values) {