Skip to content

Commit 326016d

Browse files
committed
Do not pass around prop_conv
It's a class member anyway.
1 parent 75216f4 commit 326016d

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
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: 7 additions & 10 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;
@@ -345,7 +344,7 @@ safety_checkert::resultt bmct::execute(
345344
}
346345

347346
if(!options.is_set("paths") || symex.path_segment_vccs > 0)
348-
return decide(goto_functions, prop_conv);
347+
return decide(goto_functions);
349348

350349
return safety_checkert::resultt::PAUSED;
351350
}
@@ -428,16 +427,14 @@ safety_checkert::resultt bmct::run(
428427
return execute(goto_model);
429428
}
430429

431-
safety_checkert::resultt bmct::decide(
432-
const goto_functionst &goto_functions,
433-
prop_convt &prop_conv)
430+
safety_checkert::resultt bmct::decide(const goto_functionst &goto_functions)
434431
{
435432
prop_conv.set_message_handler(get_message_handler());
436433

437434
if(options.get_bool_option("stop-on-fail"))
438-
return stop_on_fail(prop_conv);
435+
return stop_on_fail();
439436
else
440-
return all_properties(goto_functions, prop_conv);
437+
return all_properties(goto_functions);
441438
}
442439

443440
void bmct::show()
@@ -453,9 +450,9 @@ void bmct::show()
453450
}
454451
}
455452

456-
safety_checkert::resultt bmct::stop_on_fail(prop_convt &prop_conv)
453+
safety_checkert::resultt bmct::stop_on_fail()
457454
{
458-
switch(run_decision_procedure(prop_conv))
455+
switch(run_decision_procedure())
459456
{
460457
case decision_proceduret::resultt::D_UNSATISFIABLE:
461458
report_success();

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

0 commit comments

Comments
 (0)