Skip to content

Commit f181ee2

Browse files
peterschrammeltautschnig
authored andcommitted
Remove obsolete sourcecode element in graphml
1 parent 95ac2d1 commit f181ee2

File tree

2 files changed

+6
-37
lines changed

2 files changed

+6
-37
lines changed

src/goto-programs/graphml_witness.cpp

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -333,35 +333,13 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
333333
else if(it->type==goto_trace_stept::typet::GOTO &&
334334
it->pc->is_goto())
335335
{
336+
#if 0
337+
// TODO: this requires knowledge about the phase of the
338+
// condition in the source code
336339
xmlt &val=edge.new_element("data");
337-
val.set_attribute("key", "sourcecode");
338-
exprt clean_cond=it->cond_expr;
339-
remove_l0_l1(clean_cond);
340-
const std::string cond=from_expr(ns, "", clean_cond);
341-
const std::string neg_cond=
342-
from_expr(ns, "", not_exprt(clean_cond));
343-
val.data="["+(it->cond_value ? cond : neg_cond)+"]";
344-
345-
#if 0
346-
xmlt edge2("edge");
347-
edge2.set_attribute("source", graphml[from].node_name);
348-
edge2.set_attribute("target", graphml[sink].node_name);
349-
350-
xmlt &data_f2=edge2.new_element("data");
351-
data_f2.set_attribute("key", "originfile");
352-
data_f2.data=id2string(graphml[from].file);
353-
354-
xmlt &data_l2=edge2.new_element("data");
355-
data_l2.set_attribute("key", "startline");
356-
data_l2.data=id2string(graphml[from].line);
357-
358-
xmlt &val2=edge2.new_element("data");
359-
val2.set_attribute("key", "sourcecode");
360-
val2.data="["+(it->cond_value ? neg_cond : cond)+"]";
361-
362-
graphml[sink].in[from].xml_node=edge2;
363-
graphml[from].out[sink].xml_node=edge2;
364-
#endif
340+
val.set_attribute("key", "control");
341+
val.data=(it->cond_value?"condition-false":"condition-true");
342+
#endif
365343
}
366344

367345
graphml[to].in[from].xml_node=edge;

src/xmllang/graphml.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -403,15 +403,6 @@ bool write_graphml(const graphmlt &src, std::ostream &os)
403403
key.set_attribute("id", "producer");
404404
}
405405

406-
// <key attr.name="sourcecode" attr.type="string" for="edge" id="sourcecode"/>
407-
{
408-
xmlt &key=graphml.new_element("key");
409-
key.set_attribute("attr.name", "sourcecode");
410-
key.set_attribute("attr.type", "string");
411-
key.set_attribute("for", "edge");
412-
key.set_attribute("id", "sourcecode");
413-
}
414-
415406
// <key attr.name="startline" attr.type="int" for="edge" id="startline"/>
416407
{
417408
xmlt &key=graphml.new_element("key");

0 commit comments

Comments
 (0)