Skip to content

Commit

Permalink
cadical: Initialize external propagator prior to adding clauses. (cvc…
Browse files Browse the repository at this point in the history
…5#11264)

Co-authored-by: Aina Niemetz <[email protected]>
  • Loading branch information
mpreiner and aniemetz authored Oct 4, 2024
1 parent fc5678d commit bb35335
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/prop/cadical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1013,8 +1013,7 @@ CadicalSolver::CadicalSolver(Env& env,

void CadicalSolver::init()
{
d_true = newVar();
d_false = newVar();
d_solver->set("quiet", 1); // CaDiCaL is verbose by default

// walk and lucky phase do not use the external propagator, disable for now
if (d_propagator)
Expand All @@ -1024,9 +1023,11 @@ void CadicalSolver::init()
// ilb currently does not play well with user propagators
d_solver->set("ilb", 0);
d_solver->set("ilbassumptions", 0);
d_solver->connect_external_propagator(d_propagator.get());
}

d_solver->set("quiet", 1); // CaDiCaL is verbose by default
d_true = newVar();
d_false = newVar();
d_solver->add(toCadicalVar(d_true));
d_solver->add(0);
d_solver->add(-toCadicalVar(d_false));
Expand Down Expand Up @@ -1238,7 +1239,6 @@ void CadicalSolver::initialize(context::Context* context,
d_context = context;
d_proxy = theoryProxy;
d_propagator.reset(new CadicalPropagator(theoryProxy, context, *d_solver));
d_solver->connect_external_propagator(d_propagator.get());
if (!d_env.getPlugins().empty())
{
d_clause_learner.reset(new ClauseLearner(*theoryProxy, 0));
Expand Down

0 comments on commit bb35335

Please sign in to comment.