diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2021-03-09 16:07:30 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-09 22:07:30 +0000 |
commit | 6808152d40b0b4293816c18a8ddf83df2afc39f7 (patch) | |
tree | 429c816c274bf825f9ba765941991c0a2d1b14d0 /src/smt/set_defaults.cpp | |
parent | dd92b4235e0a74b08ba02c0af11833bad27335ad (diff) |
Remove logic request (#6089)
This removes use of the logic request utility.
It generally bad practice to change the logic dynamically, e.g. during preprocessing, since it makes it so that CVC4 does not properly initialize. We now insist that logic is changed upfront in set_defaults.
This is in preparation for the smt::Env class, which will change the ownership of logic.
Diffstat (limited to 'src/smt/set_defaults.cpp')
-rw-r--r-- | src/smt/set_defaults.cpp | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/src/smt/set_defaults.cpp b/src/smt/set_defaults.cpp index 91910da47..f37b406b4 100644 --- a/src/smt/set_defaults.cpp +++ b/src/smt/set_defaults.cpp @@ -583,6 +583,12 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver) logic = log; logic.lock(); } + if (options::bvAbstraction()) + { + // bv abstraction may require UF + Notice() << "Enabling UF because bvAbstraction requires it." << std::endl; + needsUf = true; + } if (needsUf // Arrays, datatypes and sets permit Boolean terms and thus require UF || logic.isTheoryEnabled(THEORY_ARRAYS) @@ -604,13 +610,29 @@ void setDefaults(LogicInfo& logic, bool isInternalSubsolver) if (!logic.isTheoryEnabled(THEORY_UF)) { LogicInfo log(logic.getUnlockedCopy()); - Notice() << "Enabling UF because " << logic << " requires it." - << std::endl; + if (!needsUf) + { + Notice() << "Enabling UF because " << logic << " requires it." + << std::endl; + } log.enableTheory(THEORY_UF); logic = log; logic.lock(); } } + if (options::arithMLTrick()) + { + if (!logic.areIntegersUsed()) + { + // enable integers + LogicInfo log(logic.getUnlockedCopy()); + Notice() << "Enabling integers because arithMLTrick requires it." + << std::endl; + log.enableIntegers(); + logic = log; + logic.lock(); + } + } ///////////////////////////////////////////////////////////////////////////// // Set the options for the theoryOf |