diff options
author | Mathias Preiner <mathias.preiner@gmail.com> | 2019-12-17 13:43:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-17 13:43:44 -0800 |
commit | e9499c41f405df8b42fd9ae10004b1b91a869106 (patch) | |
tree | fa1475f43a3e61b8f6ffdcb903b65919eba28661 /src/theory/theory_engine.cpp | |
parent | 9b2914ed9f7b14ecf535ffe9e1328d0fa042e072 (diff) |
Generate code for options with modes. (#3561)
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
Diffstat (limited to 'src/theory/theory_engine.cpp')
-rw-r--r-- | src/theory/theory_engine.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/theory/theory_engine.cpp b/src/theory/theory_engine.cpp index 0a70ddab4..7549bd973 100644 --- a/src/theory/theory_engine.cpp +++ b/src/theory/theory_engine.cpp @@ -29,6 +29,7 @@ #include "options/options.h" #include "options/proof_options.h" #include "options/quantifiers_options.h" +#include "options/theory_options.h" #include "preprocessing/assertion_pipeline.h" #include "proof/cnf_proof.h" #include "proof/lemma_proof.h" @@ -2001,7 +2002,7 @@ void TheoryEngine::staticInitializeBVOptions( const std::vector<Node>& assertions) { bool useSlicer = true; - if (options::bitvectorEqualitySlicer() == bv::BITVECTOR_SLICER_ON) + if (options::bitvectorEqualitySlicer() == options::BvSlicerMode::ON) { if (!d_logicInfo.isPure(theory::THEORY_BV) || d_logicInfo.isQuantified()) throw ModalException( @@ -2016,11 +2017,11 @@ void TheoryEngine::staticInitializeBVOptions( "Slicer does not currently support model generation. Use " "--bv-eq-slicer=off"); } - else if (options::bitvectorEqualitySlicer() == bv::BITVECTOR_SLICER_OFF) + else if (options::bitvectorEqualitySlicer() == options::BvSlicerMode::OFF) { return; } - else if (options::bitvectorEqualitySlicer() == bv::BITVECTOR_SLICER_AUTO) + else if (options::bitvectorEqualitySlicer() == options::BvSlicerMode::AUTO) { if ((!d_logicInfo.isPure(theory::THEORY_BV) || d_logicInfo.isQuantified()) || options::incrementalSolving() @@ -2242,7 +2243,12 @@ void TheoryEngine::checkTheoryAssertionsWithModel(bool hardFailure) { } } -std::pair<bool, Node> TheoryEngine::entailmentCheck(theory::TheoryOfMode mode, TNode lit, const EntailmentCheckParameters* params, EntailmentCheckSideEffects* seffects) { +std::pair<bool, Node> TheoryEngine::entailmentCheck( + options::TheoryOfMode mode, + TNode lit, + const EntailmentCheckParameters* params, + EntailmentCheckSideEffects* seffects) +{ TNode atom = (lit.getKind() == kind::NOT) ? lit[0] : lit; if( atom.getKind()==kind::AND || atom.getKind()==kind::OR || atom.getKind()==kind::IMPLIES ){ //Boolean connective, recurse |