Skip to content

Promote set_all_frozen to decision_proceduret to remove a dynamic_cast #8404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/goto-checker/single_loop_incremental_symex_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,9 @@ single_loop_incremental_symex_checkert::single_loop_incremental_symex_checkert(
{
setup_symex(symex, ns, options, ui_message_handler);

// Freeze all symbols if we are using a prop_conv_solvert
prop_conv_solvert *prop_conv_solver = dynamic_cast<prop_conv_solvert *>(
&property_decider.get_decision_procedure());
if(prop_conv_solver != nullptr)
prop_conv_solver->set_all_frozen();
// Freeze all symbols (will be a no-op unless we are using a
// prop_conv_solvert)
property_decider.get_decision_procedure().set_all_frozen();
}

void output_incremental_status(
Expand Down
6 changes: 6 additions & 0 deletions src/solvers/decision_procedure.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ class decision_proceduret
/// but solver-specific representation.
virtual exprt handle(const exprt &) = 0;

/// Make sure simplification steps internal to the decision procedure do not
/// result in variables being removed.
virtual void set_all_frozen()
{
}

/// Result of running the decision procedure
enum class resultt
{
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/prop/prop_conv_solver.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class prop_conv_solvert : public conflict_providert,

void set_frozen(literalt);
void set_frozen(const bvt &);
void set_all_frozen();
void set_all_frozen() override;

literalt convert(const exprt &expr) override;
bool is_in_conflict(const exprt &expr) const override;
Expand Down
Loading