Skip to content

Commit df8ae3b

Browse files
authored
Merge pull request #7354 from FrNecas/frnecas-witness-assume-develop
Only add assumption scope if not empty
2 parents 8fd4d0a + 52c6fcb commit df8ae3b

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/goto-programs/graphml_witness.cpp

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,15 +478,18 @@ void graphml_witnesst::operator()(const goto_tracet &goto_trace)
478478
code_assignt assign{it->full_lhs, it->full_lhs_value};
479479
val.data = convert_assign_rec(lhs_id, assign);
480480

481-
xmlt &val_s = edge.new_element("data");
482-
val_s.set_attribute("key", "assumption.scope");
483-
irep_idt function_id = it->function_id;
484-
const symbolt *symbol_ptr = nullptr;
485-
if(!ns.lookup(lhs_id, symbol_ptr) && symbol_ptr->is_parameter)
481+
if(!it->function_id.empty())
486482
{
487-
function_id = lhs_id.substr(0, lhs_id.find("::"));
483+
xmlt &val_s = edge.new_element("data");
484+
val_s.set_attribute("key", "assumption.scope");
485+
irep_idt function_id = it->function_id;
486+
const symbolt *symbol_ptr = nullptr;
487+
if(!ns.lookup(lhs_id, symbol_ptr) && symbol_ptr->is_parameter)
488+
{
489+
function_id = lhs_id.substr(0, lhs_id.find("::"));
490+
}
491+
val_s.data = id2string(function_id);
488492
}
489-
val_s.data = id2string(function_id);
490493

491494
if(has_prefix(val.data, "\\result ="))
492495
{

0 commit comments

Comments
 (0)