From ca648afb2a7574991b1dc9817c1b8e2546548073 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Tue, 26 Jan 2021 12:43:50 -0600 Subject: Refactor quantifiers engine initialization (#5813) This is a step towards breaking up the quantifiers engine. The key change is that QuantifiersEngine will not be passed as a pointer to the modules it contains. This PR makes it so that necessary modules take a QuantifiersState, which will eventually be extended as needed with additional query methods. For now, modules will take both until the dependencies on QuantifersEngine are removed. This required that QuantifiersEngine now lives in TheoryQuantifiers, instead of in TheoryEngine, since the QuantifiersEngine must be initialized with QuantifiersState, which is a member of TheoryQuantifiers. Now, TheoryEngine retrieves the QuantifiersEngine from TheoryQuantifiers prior to finishing initialization on theories. --- src/theory/quantifiers/sygus/synth_conjecture.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/theory/quantifiers/sygus/synth_conjecture.cpp') diff --git a/src/theory/quantifiers/sygus/synth_conjecture.cpp b/src/theory/quantifiers/sygus/synth_conjecture.cpp index ad125a70f..b007f8716 100644 --- a/src/theory/quantifiers/sygus/synth_conjecture.cpp +++ b/src/theory/quantifiers/sygus/synth_conjecture.cpp @@ -43,8 +43,10 @@ namespace theory { namespace quantifiers { SynthConjecture::SynthConjecture(QuantifiersEngine* qe, + QuantifiersState& qs, SygusStatistics& s) : d_qe(qe), + d_qstate(qs), d_stats(s), d_tds(qe->getTermDatabaseSygus()), d_hasSolution(false), @@ -56,7 +58,7 @@ SynthConjecture::SynthConjecture(QuantifiersEngine* qe, d_exampleInfer(new ExampleInfer(d_tds)), d_ceg_pbe(new SygusPbe(qe, this)), d_ceg_cegis(new Cegis(qe, this)), - d_ceg_cegisUnif(new CegisUnif(qe, this)), + d_ceg_cegisUnif(new CegisUnif(qe, qs, this)), d_sygus_ccore(new CegisCoreConnective(qe, this)), d_master(nullptr), d_set_ce_sk_vars(false), @@ -235,7 +237,7 @@ void SynthConjecture::assign(Node q) d_feasible_strategy.reset( new DecisionStrategySingleton("sygus_feasible", d_feasible_guard, - d_qe->getSatContext(), + d_qstate.getSatContext(), d_qe->getValuation())); d_qe->getDecisionManager()->registerStrategy( DecisionManager::STRAT_QUANT_SYGUS_FEASIBLE, d_feasible_strategy.get()); -- cgit v1.2.3