Skip to content

Commit eb4f9c2

Browse files
author
Daniel Kroening
authored
Merge pull request #3680 from tautschnig/vs-shadow-cbmc
Avoid shadowing in directory cbmc/ [blocks: #2310]
2 parents 3010386 + 04c18b9 commit eb4f9c2

File tree

5 files changed

+16
-28
lines changed

5 files changed

+16
-28
lines changed

src/cbmc/all_properties.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,10 @@ void bmc_all_propertiest::report(const cover_goalst &cover_goals)
293293
}
294294
}
295295

296-
safety_checkert::resultt bmct::all_properties(
297-
const goto_functionst &goto_functions,
298-
prop_convt &solver)
296+
safety_checkert::resultt
297+
bmct::all_properties(const goto_functionst &goto_functions)
299298
{
300-
bmc_all_propertiest bmc_all_properties(goto_functions, solver, *this);
299+
bmc_all_propertiest bmc_all_properties(goto_functions, prop_conv, *this);
301300
bmc_all_properties.set_message_handler(get_message_handler());
302301
return bmc_all_properties();
303302
}

src/cbmc/bmc.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,7 @@ void bmct::do_conversion()
126126
freeze_program_variables();
127127
}
128128

129-
decision_proceduret::resultt
130-
bmct::run_decision_procedure(prop_convt &prop_conv)
129+
decision_proceduret::resultt bmct::run_decision_procedure()
131130
{
132131
status() << "Passing problem to "
133132
<< prop_conv.decision_procedure_text() << eom;
@@ -343,7 +342,7 @@ safety_checkert::resultt bmct::execute(
343342
}
344343

345344
if(!options.is_set("paths") || symex.path_segment_vccs > 0)
346-
return decide(goto_functions, prop_conv);
345+
return decide(goto_functions);
347346

348347
return safety_checkert::resultt::PAUSED;
349348
}
@@ -426,16 +425,14 @@ safety_checkert::resultt bmct::run(
426425
return execute(goto_model);
427426
}
428427

429-
safety_checkert::resultt bmct::decide(
430-
const goto_functionst &goto_functions,
431-
prop_convt &prop_conv)
428+
safety_checkert::resultt bmct::decide(const goto_functionst &goto_functions)
432429
{
433430
prop_conv.set_message_handler(get_message_handler());
434431

435432
if(options.get_bool_option("stop-on-fail"))
436-
return stop_on_fail(prop_conv);
433+
return stop_on_fail();
437434
else
438-
return all_properties(goto_functions, prop_conv);
435+
return all_properties(goto_functions);
439436
}
440437

441438
void bmct::show()
@@ -451,9 +448,9 @@ void bmct::show()
451448
}
452449
}
453450

454-
safety_checkert::resultt bmct::stop_on_fail(prop_convt &prop_conv)
451+
safety_checkert::resultt bmct::stop_on_fail()
455452
{
456-
switch(run_decision_procedure(prop_conv))
453+
switch(run_decision_procedure())
457454
{
458455
case decision_proceduret::resultt::D_UNSATISFIABLE:
459456
report_success();
@@ -643,7 +640,7 @@ void bmct::perform_symbolic_execution(
643640

644641
if(options.get_bool_option("validate-ssa-equation"))
645642
{
646-
symex.validate(ns, validation_modet::INVARIANT);
643+
symex.validate(validation_modet::INVARIANT);
647644
}
648645

649646
INVARIANT(

src/cbmc/bmc.h

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,9 @@ class bmct:public safety_checkert
177177
// use gui format
178178
ui_message_handlert &ui_message_handler;
179179

180-
virtual decision_proceduret::resultt
181-
run_decision_procedure(prop_convt &prop_conv);
180+
virtual decision_proceduret::resultt run_decision_procedure();
182181

183-
virtual resultt decide(
184-
const goto_functionst &,
185-
prop_convt &);
182+
virtual resultt decide(const goto_functionst &);
186183

187184
void do_conversion();
188185

@@ -193,10 +190,8 @@ class bmct:public safety_checkert
193190
return trace_optionst(options);
194191
}
195192

196-
virtual resultt all_properties(
197-
const goto_functionst &goto_functions,
198-
prop_convt &solver);
199-
virtual resultt stop_on_fail(prop_convt &solver);
193+
virtual resultt all_properties(const goto_functionst &goto_functions);
194+
virtual resultt stop_on_fail();
200195
virtual void report_success();
201196
virtual void report_failure();
202197

src/cbmc/symex_coverage.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ class goto_program_coverage_recordt:public coverage_recordt
9191

9292
void compute_coverage_lines(
9393
const goto_programt &goto_program,
94-
const irep_idt &file_name,
9594
const symex_coveraget::coveraget &coverage,
9695
coverage_lines_mapt &dest);
9796
};
@@ -155,7 +154,6 @@ goto_program_coverage_recordt::goto_program_coverage_recordt(
155154
coverage_lines_mapt coverage_lines_map;
156155
compute_coverage_lines(
157156
gf_it->second.body,
158-
file_name,
159157
coverage,
160158
coverage_lines_map);
161159

@@ -220,7 +218,6 @@ goto_program_coverage_recordt::goto_program_coverage_recordt(
220218

221219
void goto_program_coverage_recordt::compute_coverage_lines(
222220
const goto_programt &goto_program,
223-
const irep_idt &file_name,
224221
const symex_coveraget::coveraget &coverage,
225222
coverage_lines_mapt &dest)
226223
{

src/goto-symex/goto_symex.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ class goto_symext
468468
return _remaining_vccs;
469469
}
470470

471-
void validate(const namespacet &ns, const validation_modet vm) const
471+
void validate(const validation_modet vm) const
472472
{
473473
target.validate(ns, vm);
474474
}

0 commit comments

Comments
 (0)