Skip to content

Commit ea7975f

Browse files
committed
Remove unused goto_functions parameters
These were all unused. Cover and fault-localization still use goto-functions, as they use it to discover assertions that symex never reached and which therefore do not appear in equation.SSA_steps.
1 parent 51bb367 commit ea7975f

File tree

2 files changed

+10
-18
lines changed

2 files changed

+10
-18
lines changed

src/cbmc/bmc.cpp

+7-11
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,7 @@ void bmct::error_trace()
104104
}
105105

106106
/// outputs witnesses in graphml format
107-
void bmct::output_graphml(
108-
resultt result,
109-
const goto_functionst &goto_functions)
107+
void bmct::output_graphml(resultt result)
110108
{
111109
const std::string graphml=options.get_option("graphml-witness");
112110
if(graphml.empty())
@@ -413,7 +411,7 @@ safety_checkert::resultt bmct::execute(const goto_functionst &goto_functions)
413411
symex.remaining_vccs==0)
414412
{
415413
report_success();
416-
output_graphml(resultt::SAFE, goto_functions);
414+
output_graphml(resultt::SAFE);
417415
return safety_checkert::resultt::SAFE;
418416
}
419417

@@ -508,12 +506,12 @@ safety_checkert::resultt bmct::decide(
508506
prop_conv.set_message_handler(get_message_handler());
509507

510508
if(options.get_bool_option("stop-on-fail"))
511-
return stop_on_fail(goto_functions, prop_conv);
509+
return stop_on_fail(prop_conv);
512510
else
513511
return all_properties(goto_functions, prop_conv);
514512
}
515513

516-
void bmct::show(const goto_functionst &goto_functions)
514+
void bmct::show()
517515
{
518516
if(options.get_bool_option("show-vcc"))
519517
{
@@ -526,15 +524,13 @@ void bmct::show(const goto_functionst &goto_functions)
526524
}
527525
}
528526

529-
safety_checkert::resultt bmct::stop_on_fail(
530-
const goto_functionst &goto_functions,
531-
prop_convt &prop_conv)
527+
safety_checkert::resultt bmct::stop_on_fail(prop_convt &prop_conv)
532528
{
533529
switch(run_decision_procedure(prop_conv))
534530
{
535531
case decision_proceduret::resultt::D_UNSATISFIABLE:
536532
report_success();
537-
output_graphml(resultt::SAFE, goto_functions);
533+
output_graphml(resultt::SAFE);
538534
return resultt::SAFE;
539535

540536
case decision_proceduret::resultt::D_SATISFIABLE:
@@ -545,7 +541,7 @@ safety_checkert::resultt bmct::stop_on_fail(
545541
dynamic_cast<bv_cbmct &>(prop_conv), equation, ns);
546542

547543
error_trace();
548-
output_graphml(resultt::UNSAFE, goto_functions);
544+
output_graphml(resultt::UNSAFE);
549545
}
550546

551547
report_failure();

src/cbmc/bmc.h

+3-7
Original file line numberDiff line numberDiff line change
@@ -211,21 +211,17 @@ class bmct:public safety_checkert
211211
virtual resultt all_properties(
212212
const goto_functionst &goto_functions,
213213
prop_convt &solver);
214-
virtual resultt stop_on_fail(
215-
const goto_functionst &goto_functions,
216-
prop_convt &solver);
214+
virtual resultt stop_on_fail(prop_convt &solver);
217215
virtual void show_program();
218216
virtual void report_success();
219217
virtual void report_failure();
220218

221219
virtual void error_trace();
222-
void output_graphml(
223-
resultt result,
224-
const goto_functionst &goto_functions);
220+
void output_graphml(resultt result);
225221

226222
void get_memory_model();
227223
void slice();
228-
void show(const goto_functionst &);
224+
void show();
229225

230226
bool cover(
231227
const goto_functionst &goto_functions,

0 commit comments

Comments
 (0)