File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -151,16 +151,21 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
151
151
// step numbers start at 1
152
152
std::vector<std::size_t > step_to_node (goto_trace.steps .size ()+1 , 0 );
153
153
154
+ goto_tracet::stepst::const_iterator prev_it=goto_trace.steps .end ();
154
155
for (goto_tracet::stepst::const_iterator
155
156
it=goto_trace.steps .begin ();
156
157
it!=goto_trace.steps .end ();
157
- it++)
158
+ it++) // we cannot replace this by a ranged for
158
159
{
159
160
const source_locationt &source_location=it->pc ->source_location ;
160
161
161
162
if (it->hidden ||
162
163
(!it->is_assignment () && !it->is_goto () && !it->is_assert ()) ||
164
+ (prev_it!=goto_trace.steps .end () &&
165
+ prev_it->pc ->source_location ==it->pc ->source_location ) ||
166
+ #if 0
163
167
(it->is_goto() && it->pc->guard.is_true()) ||
168
+ #endif
164
169
source_location.is_nil () ||
165
170
source_location.get_file ().empty () ||
166
171
source_location.get_file ()==" <built-in-additions>" ||
@@ -184,6 +189,8 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
184
189
continue ;
185
190
}
186
191
192
+ prev_it=it;
193
+
187
194
const graphmlt::node_indext node=graphml.add_node ();
188
195
graphml[node].node_name =
189
196
i2string (it->pc ->location_number )+" ." +i2string (it->step_nr );
You can’t perform that action at this time.
0 commit comments