3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-15 23:35:26 +00:00

add debugging facilities for github issues #384 #367

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2015-12-22 10:43:18 -08:00
parent 65da0f9f3a
commit 9c6271dded
14 changed files with 529 additions and 479 deletions

View file

@ -331,7 +331,7 @@ bool theory_seq::check_length_coherence_tbd() {
if (is_var(f) && f == e) {
expr_ref emp(m_util.str.mk_empty(m.get_sort(e)), m);
TRACE("seq", tout << "Unsolved " << mk_pp(e, m) << "\n";);
#if 0
#if 1
if (!assume_equality(e, emp)) {
// e = emp \/ e = unit(head.elem(e))*tail(e)
sort* char_sort = 0;
@ -341,9 +341,11 @@ bool theory_seq::check_length_coherence_tbd() {
expr_ref head(m_util.str.mk_unit(v), m);
expr_ref conc(m_util.str.mk_concat(head, tail), m);
add_axiom(mk_eq(e, emp, false), mk_eq(e, conc, false));
assume_equality(tail, emp);
}
#endif
coherent = false;
m_branch_variable_head = j + 1;
return false;
}
}
return coherent;

View file

@ -30,6 +30,7 @@ namespace smt {
seq_util u;
symbol_set m_strings;
unsigned m_next;
char m_char;
std::string m_unique_prefix;
obj_map<sort, expr*> m_unique_sequences;
expr_ref_vector m_trail;
@ -41,6 +42,7 @@ namespace smt {
m_model(md),
u(m),
m_next(0),
m_char(0),
m_unique_prefix("#B"),
m_trail(m)
{
@ -99,6 +101,11 @@ namespace smt {
expr* v0 = get_fresh_value(seq);
return u.re.mk_to_re(v0);
}
if (u.is_char(s)) {
//char s[2] = { ++m_char, 0 };
//return u.str.mk_char(zstring(s), 0);
return u.str.mk_char(zstring("a"), 0);
}
NOT_IMPLEMENTED_YET();
return 0;
}