Skip to content

Commit 1f16a91

Browse files
committed
Fix contains_symbol_prefix in goto-synthesizer
The function should scan all sub-expressions `it` of the given expression `expr` and check if `*it` has a given prefix.
1 parent 44e53c8 commit 1f16a91

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/goto-synthesizer/cegis_verifier.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ static bool contains_symbol_prefix(const exprt &expr, const std::string &prefix)
4444
for(auto it = expr.depth_begin(), itend = expr.depth_end(); it != itend; ++it)
4545
{
4646
if(
47-
expr.id() == ID_symbol &&
48-
has_prefix(id2string(to_symbol_expr(expr).get_identifier()), prefix))
47+
it->id() == ID_symbol &&
48+
has_prefix(id2string(to_symbol_expr(*it).get_identifier()), prefix))
4949
{
5050
return true;
5151
}

0 commit comments

Comments
 (0)