Skip to content

Commit

Permalink
Hook for cegis to freeze program variables
Browse files Browse the repository at this point in the history
  • Loading branch information
polgreen committed Nov 24, 2017
1 parent 8b1f65e commit 8a389f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/cbmc/bmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ void bmct::do_unwind_module()
// this is a hook for hw-cbmc
}

/// Hook used by CEGIS to selectively freeze variables
/// in the SAT solver after the SSA formula is added to the solver.
/// Freezing variables is necessary to make use of incremental
/// solving with MiniSat SimpSolver.
/// Potentially a useful hook for other applications using
/// incremental solving.
void bmct::freeze_program_variables()
{
// this is a hook for cegis
}

void bmct::error_trace()
{
status() << "Building error trace" << eom;
Expand Down Expand Up @@ -131,6 +142,8 @@ void bmct::do_conversion()
forall_expr_list(it, bmc_constraints)
prop_conv.set_to_true(*it);
}
// hook for cegis to freeze synthesis program vars
freeze_program_variables();
}

decision_proceduret::resultt
Expand Down
2 changes: 2 additions & 0 deletions src/cbmc/bmc.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ class bmct:public safety_checkert
virtual void do_unwind_module();
void do_conversion();

virtual void freeze_program_variables();

virtual void show_vcc();
virtual void show_vcc_plain(std::ostream &out);
virtual void show_vcc_json(std::ostream &out);
Expand Down

0 comments on commit 8a389f9

Please sign in to comment.