Skip to content

Commit

Permalink
throttle digit constraints
Browse files Browse the repository at this point in the history
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Apr 23, 2020
1 parent c7878e3 commit 8fe3caa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/smt/theory_seq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,9 @@ bool theory_seq::solve_itos(expr* n, expr_ref_vector const& rs, dependency* dep)
}
expr* u = nullptr;
for (expr* r : rs) {
if (m_util.str.is_unit(r, u)) {
if (m_util.str.is_unit(r, u) && !m_is_digit.contains(u)) {
m_is_digit.insert(u);
m_trail_stack.push(insert_obj_trail<theory_seq, expr>(m_is_digit, u));
literal is_digit = m_ax.is_digit(u);
if (get_context().get_assignment(is_digit) != l_true) {
propagate_lit(dep, 0, nullptr, is_digit);
Expand Down
1 change: 1 addition & 0 deletions src/smt/theory_seq.h
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,7 @@ namespace smt {
re2automaton m_mk_aut;

obj_hashtable<expr> m_fixed; // string variables that are fixed length.
obj_hashtable<expr> m_is_digit; // expressions that have been constrained to be digits

void init(context* ctx) override;
final_check_status final_check_eh() override;
Expand Down

0 comments on commit 8fe3caa

Please sign in to comment.