@@ -152,6 +152,31 @@ std::string graphml_witnesst::convert_assign_rec(
152
152
break ;
153
153
}
154
154
}
155
+ else if (assign.rhs ().id () == ID_with)
156
+ {
157
+ const with_exprt &with_expr = to_with_expr (assign.rhs ());
158
+ const auto &ops = with_expr.operands ();
159
+
160
+ for (std::size_t i = 1 ; i < ops.size (); i += 2 )
161
+ {
162
+ if (!result.empty ())
163
+ result += ' ' ;
164
+
165
+ if (ops[i].id () == ID_member_name)
166
+ {
167
+ const member_exprt member{
168
+ assign.lhs (), ops[i].get (ID_component_name), ops[i + 1 ].type ()};
169
+ result +=
170
+ convert_assign_rec (identifier, code_assignt (member, ops[i + 1 ]));
171
+ }
172
+ else
173
+ {
174
+ const index_exprt index {assign.lhs (), ops[i]};
175
+ result +=
176
+ convert_assign_rec (identifier, code_assignt (index , ops[i + 1 ]));
177
+ }
178
+ }
179
+ }
155
180
else
156
181
{
157
182
exprt clean_rhs=assign.rhs ();
@@ -527,7 +552,7 @@ void graphml_witnesst::operator()(const symex_target_equationt &equation)
527
552
irep_idt identifier=it->ssa_lhs .get_object_name ();
528
553
529
554
graphml[to].has_invariant =true ;
530
- code_assignt assign (it->ssa_full_lhs , it->ssa_rhs );
555
+ code_assignt assign (it->ssa_lhs , it->ssa_rhs );
531
556
graphml[to].invariant =convert_assign_rec (identifier, assign);
532
557
graphml[to].invariant_scope = id2string (it->source .function_id );
533
558
}
0 commit comments