diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2021-05-05 18:09:24 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-05 18:09:24 -0500 |
commit | 2283ee3b0327441c29caf26be977c1e4cd13c637 (patch) | |
tree | 18bc8401f863fab8cb5f57d0c28a729650303d44 /src/theory/quantifiers/quantifiers_modules.cpp | |
parent | dde3aac0417c10cdd1f8217f653bcdf95d94290c (diff) |
Do not have quantifiers model inherit from theory model (#6493)
This is work towards making the initialization of theory engine, theory models, quantifiers engine more flexible.
This makes it so that the specialized quantifiers models classes (FirstOrderModel) do not inherit from TheoryModel. There is no longer any reason for this, since FirstOrderModel does not have any override methods.
As a result of this PR, there is only one kind of TheoryModel and it is constructed immediately when ModelManager is constructed.
This required refactoring the initialization of when FirstOrderModel is constructed in ModelBuilder classes in quantifiers.
This also avoids the need for casting TheoryModel to FirstOrderModel.
Diffstat (limited to 'src/theory/quantifiers/quantifiers_modules.cpp')
-rw-r--r-- | src/theory/quantifiers/quantifiers_modules.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/theory/quantifiers/quantifiers_modules.cpp b/src/theory/quantifiers/quantifiers_modules.cpp index 704a65bfb..f6b8f30f4 100644 --- a/src/theory/quantifiers/quantifiers_modules.cpp +++ b/src/theory/quantifiers/quantifiers_modules.cpp @@ -28,7 +28,6 @@ QuantifiersModules::QuantifiersModules() d_alpha_equiv(nullptr), d_inst_engine(nullptr), d_model_engine(nullptr), - d_builder(nullptr), d_bint(nullptr), d_qcf(nullptr), d_sg_gen(nullptr), @@ -45,6 +44,7 @@ void QuantifiersModules::initialize(QuantifiersState& qs, QuantifiersInferenceManager& qim, QuantifiersRegistry& qr, TermRegistry& tr, + QModelBuilder* builder, std::vector<QuantifiersModule*>& modules) { // add quantifiers modules @@ -80,23 +80,10 @@ void QuantifiersModules::initialize(QuantifiersState& qs, d_bint.reset(new BoundedIntegers(qs, qim, qr, tr)); modules.push_back(d_bint.get()); } + if (options::finiteModelFind() || options::fmfBound()) { - Trace("quant-init-debug") - << "Initialize model engine, mbqi : " << options::mbqiMode() << " " - << options::fmfBound() << std::endl; - if (tr.useFmcModel()) - { - Trace("quant-init-debug") << "...make fmc builder." << std::endl; - d_builder.reset(new fmcheck::FullModelChecker(qs, qr, qim)); - } - else - { - Trace("quant-init-debug") - << "...make default model builder." << std::endl; - d_builder.reset(new QModelBuilder(qs, qr, qim)); - } - d_model_engine.reset(new ModelEngine(qs, qim, qr, tr, d_builder.get())); + d_model_engine.reset(new ModelEngine(qs, qim, qr, tr, builder)); modules.push_back(d_model_engine.get()); } if (options::quantDynamicSplit() != options::QuantDSplitMode::NONE) |