Skip to content

Commit 8a389f9

Browse files
committed
Hook for cegis to freeze program variables
1 parent 8b1f65e commit 8a389f9

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/cbmc/bmc.cpp

+13
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ void bmct::do_unwind_module()
4545
// this is a hook for hw-cbmc
4646
}
4747

48+
/// Hook used by CEGIS to selectively freeze variables
49+
/// in the SAT solver after the SSA formula is added to the solver.
50+
/// Freezing variables is necessary to make use of incremental
51+
/// solving with MiniSat SimpSolver.
52+
/// Potentially a useful hook for other applications using
53+
/// incremental solving.
54+
void bmct::freeze_program_variables()
55+
{
56+
// this is a hook for cegis
57+
}
58+
4859
void bmct::error_trace()
4960
{
5061
status() << "Building error trace" << eom;
@@ -131,6 +142,8 @@ void bmct::do_conversion()
131142
forall_expr_list(it, bmc_constraints)
132143
prop_conv.set_to_true(*it);
133144
}
145+
// hook for cegis to freeze synthesis program vars
146+
freeze_program_variables();
134147
}
135148

136149
decision_proceduret::resultt

src/cbmc/bmc.h

+2
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ class bmct:public safety_checkert
9292
virtual void do_unwind_module();
9393
void do_conversion();
9494

95+
virtual void freeze_program_variables();
96+
9597
virtual void show_vcc();
9698
virtual void show_vcc_plain(std::ostream &out);
9799
virtual void show_vcc_json(std::ostream &out);

0 commit comments

Comments
 (0)