Skip to content

Commit 6ec155b

Browse files
author
Joel Allred
committed
Call supert::set_to on non-symbol lhs
When string_refinementt::set_to() is called on an equality where the lhs is not a symbol, we must call supert::set_to(). We also assert that the equality is not of refined string type.
1 parent c1f4db1 commit 6ec155b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/solvers/refinement/string_refinement.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,14 @@ void string_refinementt::set_to(const exprt &expr, bool value)
429429
PRECONDITION(value ||
430430
!refined_string_typet::is_refined_string_type(rhs.type()));
431431

432+
PRECONDITION(lhs.id()==ID_symbol || !is_char_array(rhs.type()));
433+
PRECONDITION(lhs.id()==ID_symbol ||
434+
!refined_string_typet::is_refined_string_type(rhs.type()));
435+
436+
// If lhs is not a symbol, let supert::set_to() handle it.
432437
if(lhs.id()!=ID_symbol)
433438
{
434-
warning() << "ignoring " << from_expr(ns, "", expr) << eom;
439+
non_string_axioms.push_back(std::make_pair(expr, value));
435440
return;
436441
}
437442

0 commit comments

Comments
 (0)