3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-06-18 20:03:38 +00:00

fix obj_map insertions theory_str

This commit is contained in:
Murphy Berzish 2017-02-15 16:08:54 -05:00
parent d67f732c7c
commit 2e27e1cd36

View file

@ -9981,7 +9981,7 @@ expr * theory_str::gen_len_val_options_for_free_var(expr * freeVar, expr * lenTe
// no length assertions for this free variable have ever been added. // no length assertions for this free variable have ever been added.
TRACE("t_str_detail", tout << "no length assertions yet" << std::endl;); TRACE("t_str_detail", tout << "no length assertions yet" << std::endl;);
fvar_len_count_map[freeVar] = 1; fvar_len_count_map.insert(freeVar, 1);
unsigned int testNum = fvar_len_count_map[freeVar]; unsigned int testNum = fvar_len_count_map[freeVar];
expr_ref indicator(mk_internal_lenTest_var(freeVar, testNum), m); expr_ref indicator(mk_internal_lenTest_var(freeVar, testNum), m);
@ -9990,7 +9990,7 @@ expr * theory_str::gen_len_val_options_for_free_var(expr * freeVar, expr * lenTe
// since the map is "effectively empty", we can remove those variables that have left scope... // since the map is "effectively empty", we can remove those variables that have left scope...
fvar_lenTester_map[freeVar].shrink(0); fvar_lenTester_map[freeVar].shrink(0);
fvar_lenTester_map[freeVar].push_back(indicator); fvar_lenTester_map[freeVar].push_back(indicator);
lenTester_fvar_map[indicator] = freeVar; lenTester_fvar_map.insert(indicator, freeVar);
expr * lenTestAssert = gen_len_test_options(freeVar, indicator, testNum); expr * lenTestAssert = gen_len_test_options(freeVar, indicator, testNum);
SASSERT(lenTestAssert != NULL); SASSERT(lenTestAssert != NULL);
@ -10089,7 +10089,7 @@ expr * theory_str::gen_len_val_options_for_free_var(expr * freeVar, expr * lenTe
testNum = fvar_len_count_map[freeVar]; testNum = fvar_len_count_map[freeVar];
indicator = mk_internal_lenTest_var(freeVar, testNum); indicator = mk_internal_lenTest_var(freeVar, testNum);
fvar_lenTester_map[freeVar].push_back(indicator); fvar_lenTester_map[freeVar].push_back(indicator);
lenTester_fvar_map[indicator] = freeVar; lenTester_fvar_map.insert(indicator, freeVar);
} else { } else {
// TODO make absolutely sure this is safe to do if 'indicator' is technically out of scope // TODO make absolutely sure this is safe to do if 'indicator' is technically out of scope
indicator = fvar_lenTester_map[freeVar][i]; indicator = fvar_lenTester_map[freeVar][i];