Skip to content

Commit a1c44e1

Browse files
committed
Fixed function inversion.
Now takes into account the multi-arity of plus (was previously assumed to be binary).
1 parent a857372 commit a1c44e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/solvers/refinement/string_refinement.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -1076,8 +1076,10 @@ std::map<exprt, int> string_refinementt::map_representation_of_sum(
10761076
to_process.pop_back();
10771077
if(cur.id()==ID_plus)
10781078
{
1079-
to_process.push_back(std::make_pair(cur.op1(), positive));
1080-
to_process.push_back(std::make_pair(cur.op0(), positive));
1079+
for(const exprt &op : cur.operands())
1080+
{
1081+
to_process.push_back(std::make_pair(op, positive));
1082+
}
10811083
}
10821084
else if(cur.id()==ID_minus)
10831085
{

0 commit comments

Comments
 (0)