Skip to content

Commit 9b72b60

Browse files
block unsound itos solutions. #2721
Signed-off-by: Nikolaj Bjorner <[email protected]>
1 parent 29e1fb6 commit 9b72b60

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/smt/theory_seq.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3793,6 +3793,11 @@ void theory_seq::add_itos_axiom(expr* e) {
37933793
app_ref stoi(m_util.str.mk_stoi(e), m);
37943794
add_axiom(~ge0, mk_preferred_eq(stoi, n));
37953795

3796+
// itos(n) does not start with "0"
3797+
// at(itos(n),0) != "0"
3798+
// alternative: n >= 0 => itos(stoi(itos(n))) = itos(n)
3799+
add_axiom(~mk_eq(m_util.str.mk_at(e,zero), m_util.str.mk_string(symbol("0")), false));
3800+
// add_axiom(~ge0, mk_preferred_eq(m_util.str.mk_itos(stoi), e));
37963801
}
37973802

37983803

0 commit comments

Comments
 (0)