File tree Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Expand file tree Collapse file tree 3 files changed +34
-11
lines changed Original file line number Diff line number Diff line change @@ -78,20 +78,16 @@ safety_checkert::resultt bmc_all_propertiest::operator()()
78
78
{
79
79
if (it->is_assert ())
80
80
{
81
- irep_idt property_id;
81
+ irep_idt property_id = it-> get_property_id () ;
82
82
83
- if (it->source .pc ->is_assert ())
84
- property_id=it->source .pc ->source_location .get_property_id ();
85
- else if (it->source .pc ->is_goto ())
83
+ if (property_id.empty ())
84
+ continue ;
85
+
86
+ if (it->source .pc ->is_goto ())
86
87
{
87
- // this is likely an unwinding assertion
88
- property_id=id2string (
89
- it->source .pc ->source_location .get_function ())+" .unwind." +
90
- std::to_string (it->source .pc ->loop_number );
91
- goal_map[property_id].description =it->comment ;
88
+ // goto may yield an unwinding assertion
89
+ goal_map[property_id].description = it->comment ;
92
90
}
93
- else
94
- continue ;
95
91
96
92
goal_map[property_id].instances .push_back (it);
97
93
}
Original file line number Diff line number Diff line change @@ -1007,3 +1007,27 @@ void symex_target_equationt::SSA_stept::validate(
1007
1007
break ;
1008
1008
}
1009
1009
}
1010
+
1011
+ irep_idt symex_target_equationt::SSA_stept::get_property_id () const
1012
+ {
1013
+ PRECONDITION (is_assert ());
1014
+
1015
+ irep_idt property_id;
1016
+
1017
+ if (source.pc ->is_assert ())
1018
+ {
1019
+ property_id = source.pc ->source_location .get_property_id ();
1020
+ }
1021
+ else if (source.pc ->is_goto ())
1022
+ {
1023
+ // this is likely an unwinding assertion
1024
+ property_id = id2string (source.pc ->source_location .get_function ()) +
1025
+ " .unwind." + std::to_string (source.pc ->loop_number );
1026
+ }
1027
+ else
1028
+ {
1029
+ // return empty
1030
+ }
1031
+
1032
+ return property_id;
1033
+ }
Original file line number Diff line number Diff line change @@ -279,6 +279,9 @@ class symex_target_equationt:public symex_targett
279
279
// NOLINTNEXTLINE(whitespace/line_length)
280
280
bool is_atomic_end () const { return type==goto_trace_stept::typet::ATOMIC_END; }
281
281
282
+ // return the property ID if this is an assertion step
283
+ irep_idt get_property_id () const ;
284
+
282
285
// we may choose to hide
283
286
bool hidden=false ;
284
287
You can’t perform that action at this time.
0 commit comments