Skip to content

Commit 24a9ca0

Browse files
committed
Graphml output: do not output assumptions containing internal identifiers
1 parent b1fd150 commit 24a9ca0

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

src/goto-programs/graphml_witness.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -285,14 +285,22 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
285285
{
286286
irep_idt identifier=it->lhs_object.get_identifier();
287287

288-
xmlt &val=edge.new_element("data");
289-
val.set_attribute("key", "assumption");
290-
code_assignt assign(it->lhs_object, it->lhs_object_value);
291-
val.data=convert_assign_rec(identifier, assign);
292-
293-
xmlt &val_s=edge.new_element("data");
294-
val_s.set_attribute("key", "assumption.scope");
295-
val_s.data=id2string(it->pc->source_location.get_function());
288+
if(id2string(it->lhs_object.get_identifier()).find('$')==
289+
std::string::npos &&
290+
(!it->lhs_object_value.is_constant() ||
291+
!it->lhs_object_value.has_operands() ||
292+
!has_prefix(id2string(it->lhs_object_value.op0().get(ID_value)),
293+
"INVALID-")))
294+
{
295+
xmlt &val=edge.new_element("data");
296+
val.set_attribute("key", "assumption");
297+
code_assignt assign(it->lhs_object, it->lhs_object_value);
298+
val.data=convert_assign_rec(identifier, assign);
299+
300+
xmlt &val_s=edge.new_element("data");
301+
val_s.set_attribute("key", "assumption.scope");
302+
val_s.data=id2string(it->pc->source_location.get_function());
303+
}
296304
}
297305
else if(it->type==goto_trace_stept::GOTO &&
298306
it->pc->is_goto())

0 commit comments

Comments
 (0)