File tree 4 files changed +9
-9
lines changed 4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ json_objectt test_inputst::to_json(
71
71
}
72
72
73
73
json_arrayt goal_refs;
74
- for (const auto &goal_id : goto_trace.get_all_property_ids ())
74
+ for (const auto &goal_id : goto_trace.get_failed_property_ids ())
75
75
{
76
76
goal_refs.push_back (json_stringt (goal_id));
77
77
}
@@ -105,7 +105,7 @@ xmlt test_inputst::to_xml(
105
105
}
106
106
}
107
107
108
- for (const auto &goal_id : goto_trace.get_all_property_ids ())
108
+ for (const auto &goal_id : goto_trace.get_failed_property_ids ())
109
109
{
110
110
xmlt &xml_goal = xml_result.new_element (" goal" );
111
111
xml_goal.set_attribute (" id" , id2string (goal_id));
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ const goto_tracet &goto_trace_storaget::insert(goto_tracet &&trace)
28
28
const goto_tracet &goto_trace_storaget::insert_all (goto_tracet &&trace)
29
29
{
30
30
traces.push_back (std::move (trace));
31
- const auto &all_property_ids = traces.back ().get_all_property_ids ();
31
+ const auto &all_property_ids = traces.back ().get_failed_property_ids ();
32
32
DATA_INVARIANT (
33
33
!all_property_ids.empty (), " a trace must violate at least one assertion" );
34
34
for (const auto &property_id : all_property_ids)
Original file line number Diff line number Diff line change @@ -773,13 +773,13 @@ void show_goto_trace(
773
773
774
774
const trace_optionst trace_optionst::default_options = trace_optionst();
775
775
776
- std::vector <irep_idt> goto_tracet::get_all_property_ids () const
776
+ std::set <irep_idt> goto_tracet::get_failed_property_ids () const
777
777
{
778
- std::vector <irep_idt> property_ids;
778
+ std::set <irep_idt> property_ids;
779
779
for (const auto &step : steps)
780
780
{
781
- if (step.is_assert ())
782
- property_ids.push_back (step.property_id );
781
+ if (step.is_assert () && !step. cond_value )
782
+ property_ids.insert (step.property_id );
783
783
}
784
784
return property_ids;
785
785
}
Original file line number Diff line number Diff line change @@ -201,8 +201,8 @@ class goto_tracet
201
201
return steps.back ();
202
202
}
203
203
204
- // / Returns the property IDs of all assertions in the trace
205
- std::vector <irep_idt> get_all_property_ids () const ;
204
+ // / Returns the property IDs of all failed assertions in the trace
205
+ std::set <irep_idt> get_failed_property_ids () const ;
206
206
};
207
207
208
208
// / Options for printing the trace using show_goto_trace
You can’t perform that action at this time.
0 commit comments