Skip to content

Commit f133a25

Browse files
author
Daniel Kroening
committed
use colors in BMC status reporting
Failed properties are red, passing ones are green, and the overall result is in bold.
1 parent 33569fa commit f133a25

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/cbmc/all_properties.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,17 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
159159
result() << "\n** Results:" << eom;
160160

161161
for(const auto &goal_pair : goal_map)
162+
{
162163
result() << "[" << goal_pair.first << "] "
163-
<< goal_pair.second.description << ": "
164-
<< goal_pair.second.status_string()
165-
<< eom;
164+
<< goal_pair.second.description << ": ";
165+
166+
if(goal_pair.second.status == goalt::statust::SUCCESS)
167+
result() << green();
168+
else
169+
result() << red();
170+
171+
result() << goal_pair.second.status_string() << reset() << eom;
172+
}
166173

167174
if(bmc.options.get_bool_option("trace"))
168175
{

src/cbmc/bmc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ bmct::run_decision_procedure(prop_convt &prop_conv)
153153

154154
void bmct::report_success()
155155
{
156-
result() << "VERIFICATION SUCCESSFUL" << eom;
156+
result() << bold() << "VERIFICATION SUCCESSFUL" << reset() << eom;
157157

158158
switch(ui_message_handler.get_ui())
159159
{
@@ -180,7 +180,7 @@ void bmct::report_success()
180180

181181
void bmct::report_failure()
182182
{
183-
result() << "VERIFICATION FAILED" << eom;
183+
result() << bold() << "VERIFICATION FAILED" << reset() << eom;
184184

185185
switch(ui_message_handler.get_ui())
186186
{

0 commit comments

Comments
 (0)