Andrew Reynolds [Wed, 15 Sep 2021 02:04:11 +0000 (21:04 -0500)]
Eliminate global access to options:: from quantifiers rewriter (#7192)
Andrew Reynolds [Tue, 14 Sep 2021 23:29:22 +0000 (18:29 -0500)]
Add get-difficulty to the API (#7194)
Adds smt2 parsing, printing and API support for get-difficulty. Adds unit tests.
Gereon Kremer [Tue, 14 Sep 2021 22:09:19 +0000 (00:09 +0200)]
Final cleanup (#7193)
This PR does some final cleanup on the options generation code.
Andres Noetzli [Tue, 14 Sep 2021 21:54:42 +0000 (14:54 -0700)]
Make `-o raw-benchmark` work with `--parse-only` (#7195)
Before, cvc5 was returning with --parse-only before the code could
reach the code responsible for dumping the raw benchmark. This moves the
check for --parse-only to the appropriate place and updates the
run_regression.py script to use --parse-only.
Andrew Reynolds [Tue, 14 Sep 2021 21:29:32 +0000 (16:29 -0500)]
Support sygus version 2.1 command assume (#7081)
Adds support for global assumptions in sygus files.
Also guards against cases of declare-const, which should be prohibited in sygus.
Andrew Reynolds [Tue, 14 Sep 2021 20:43:47 +0000 (15:43 -0500)]
Utilities in preparation for print benchmark utility (#7190)
This adds a few utilities in preparation for the print benchmark utility, which will replace our own dumping infrastructure.
Andrew Reynolds [Tue, 14 Sep 2021 19:58:01 +0000 (14:58 -0500)]
Add proof manager method to translate difficulty map (#7159)
This method will be called from SmtEngine in the implementation for (get-difficulty).
Gereon Kremer [Tue, 14 Sep 2021 18:19:29 +0000 (20:19 +0200)]
Refactor code generation for option modules (#7182)
This PR refactors the code generation for options/<module>_options.(h|cpp).
Gereon Kremer [Tue, 14 Sep 2021 18:09:27 +0000 (20:09 +0200)]
Turn sphinx generation into a function (#7181)
This PR refactors the generation of the command line help for sphinx to a function, just like all the other code generation methods.
Mathias Preiner [Tue, 14 Sep 2021 18:00:13 +0000 (11:00 -0700)]
bv: Unify bit-blasting code for udiv and urem. (#7188)
This refactor additionally removes the caching for urem/udiv cases when
bit-blasting udiv/urem and eliminates the only rewrite() calls in the
bit-blaster. Caching is not required since repeated calls to udiv/urem
with the same arguments will produce the same circuit. Further, the rewrite()
calls during bit-blasting would further complicate the recording of
bit-blasting proofs and hence is removed.
Mathias Preiner [Tue, 14 Sep 2021 17:39:43 +0000 (10:39 -0700)]
proofs: Properly track pre- and post-rewrites in bbAtom(). (#7147)
This commit refactors the proof bit-blaster to properly track the pre- and post-rewrites in bbAtom(). The individual bit-blast steps are recorded in a term conversion proof generator. The overall bit-blast proof is stored in a BitblastProofGenerator, which tracks the pre- and post-rewrite and includes the bit-blast proof of the TCPG.
Andrew Reynolds [Tue, 14 Sep 2021 15:31:07 +0000 (10:31 -0500)]
Reimplement `--dump=raw-benchmark` as `-o raw-benchmark` (#7191)
Printing the original benchmark is simple, as it is exactly the commands we execute.
This removes the previous code from SmtEngine, which is currently broken.
Andres Noetzli [Mon, 13 Sep 2021 23:14:54 +0000 (16:14 -0700)]
Remove context getters from `TheoryState` (#7174)
This removes TheoryState::getSatContext() and
TheoryState::getUserContext().
Andrew Reynolds [Mon, 13 Sep 2021 20:04:09 +0000 (15:04 -0500)]
Connect difficulty manager to TheoryEngine (#7161)
This also introduces the produceDifficulty option which is analogous to produceUnsatCores.
It requires another unsat cores mode PP_ONLY, indicating that we are only tracking proofs of preprocessing. This option should perhaps be renamed to proofMode instead of unsatCoresMode, since its use is more general than for unsat cores. This will be addressed in a future refactoring.
Gereon Kremer [Mon, 13 Sep 2021 19:21:50 +0000 (21:21 +0200)]
Add Solver::isOutputOn() (#7187)
This PR adds a new api::Solver::isOutputOn() method, including unit tests for both isOutputOn() and getOutput().
Aina Niemetz [Mon, 13 Sep 2021 16:39:19 +0000 (09:39 -0700)]
FP: Rename FpConverter to FpWordBlaster. (#7170)
Gereon Kremer [Mon, 13 Sep 2021 16:29:32 +0000 (18:29 +0200)]
Refactor generation code for getInfo() (#7176)
This PR refactors the code generation for options::getInfo()
Gereon Kremer [Mon, 13 Sep 2021 16:14:58 +0000 (18:14 +0200)]
Add main options to cmake (#7178)
This PR adds main/options.cpp to cmake. Also, it removes the old (now obsolete and unused) options script.
Gereon Kremer [Mon, 13 Sep 2021 16:05:11 +0000 (18:05 +0200)]
Reorder code (#7175)
This PR reorders some options generation code that is out of order after some merges.
Gereon Kremer [Mon, 13 Sep 2021 15:54:55 +0000 (17:54 +0200)]
Refactor options parsing (#7143)
This PR refactors the code for options parsing.
Gereon Kremer [Sat, 11 Sep 2021 19:13:34 +0000 (21:13 +0200)]
Use StatisticsRegistry from Env (#7166)
This commit better integrates the StatisticsRegistry with the environment. It makes the registry an `EnvObj` itself and adds a getter to `EnvObj` to get the registry. It also refactors parts of cvc5 to use this new mechanism to obtain the registry instead of using the (global, static) `smtStatisticsRegistry()` function.
Aina Niemetz [Sat, 11 Sep 2021 04:33:19 +0000 (21:33 -0700)]
checkModel: Extend documentation. (#7177)
Add comment that partial operators are one reason that the current
assertion cannot be checked.
Mathias Preiner [Sat, 11 Sep 2021 03:23:47 +0000 (20:23 -0700)]
bv: Move IsPowerOfTwo rule to preprocessing pass and use EnvObj. (#7179)
IsPowerOfTwo rule is specific to the BvIntroPow2 preprocessing pass and should not be a general bit-vector rewrite rule.
Andrew Reynolds [Sat, 11 Sep 2021 02:54:40 +0000 (21:54 -0500)]
Add casc 28 scripts (#7070)
Aina Niemetz [Fri, 10 Sep 2021 19:27:52 +0000 (12:27 -0700)]
FP: Enable caching in the theory inference manager. (#7168)
Mathias Preiner [Fri, 10 Sep 2021 17:58:35 +0000 (10:58 -0700)]
bv: Use EnvObj::rewrite() and EnvObj::options() in NodeBitblaster. (#7172)
This PR is based on #7171
Aina Niemetz [Fri, 10 Sep 2021 17:47:10 +0000 (10:47 -0700)]
FP: Use EnvObj::rewrite() and options() in theory_fp. (#7169)
Aina Niemetz [Fri, 10 Sep 2021 17:19:32 +0000 (10:19 -0700)]
FP: Do not send trivial lemmas. (#7167)
Fixes #7002.
mudathirmahgoub [Fri, 10 Sep 2021 03:28:48 +0000 (22:28 -0500)]
Add Op.java to the java API (#6387)
This commit adds Op.java OpTest.java and cvc5_Op.cpp to the java api.
Andres Noetzli [Fri, 10 Sep 2021 02:58:42 +0000 (19:58 -0700)]
Use C++17 attributes (#7154)
Currently, we are using non-standard attributes. With C++17, all the
attributes that we use regularly are now standardized. This commit
replaces the compiler-specific attributes with standard ones.
Andrew Reynolds [Fri, 10 Sep 2021 02:47:57 +0000 (21:47 -0500)]
More refactoring of set defaults (#7160)
This moves a large portion of the `finalizeLogic` method to more appropriate places.
It also fixes an issue : `opts.datatypes.dtSharedSelectorsWasSetByUser` was checked with wrong polarity, making a previous commit not effective.
Mathias Preiner [Fri, 10 Sep 2021 01:54:12 +0000 (18:54 -0700)]
bv: Use EnvObj::rewrite() and EnvObj::options() in BvSolver. (#7171)
Gereon Kremer [Fri, 10 Sep 2021 01:18:56 +0000 (03:18 +0200)]
Refactor command-line help (#7157)
This PR refactors how we generate the command-line help message.
Gereon Kremer [Fri, 10 Sep 2021 00:21:57 +0000 (17:21 -0700)]
Use EnvObj-based options in preprocessing (#7165)
This PR is the first step in replacing options access via options::foo() to using the environment (via EnvObj and options().module.foo). It replaces all such options accesses in the preprocessing passes.
Aina Niemetz [Thu, 9 Sep 2021 21:33:08 +0000 (14:33 -0700)]
pp passes: Use EnvObj::rewrite() instead of Rewriter::rewrite(). (#7164)
Andres Noetzli [Thu, 9 Sep 2021 18:37:49 +0000 (11:37 -0700)]
Remove `TheoryState::getEnv()` (#7163)
Gereon Kremer [Thu, 9 Sep 2021 17:34:43 +0000 (10:34 -0700)]
Add Solver::getOutput() (#7162)
Allow access to the Output() macro via the API.
Andrew Reynolds [Thu, 9 Sep 2021 15:26:34 +0000 (10:26 -0500)]
Add difficulty manager (#7151)
Towards supporting a (get-difficulty) command.
This tracks an estimate of the difficulty of preprocessed assertions during solving. It will be connected to TheoryEngine (via RelevanceManager) in a followup PR.
Andrew Reynolds [Thu, 9 Sep 2021 03:05:42 +0000 (22:05 -0500)]
Add difficulty post-processor (#7150)
This is work towards supporting a (get-difficulty) command.
This is a helper class for transforming the difficulty of preprocessed assertions to difficulty of the input assertions.
Andrew Reynolds [Thu, 9 Sep 2021 01:50:09 +0000 (20:50 -0500)]
Disable shared selectors for quantified logics without SyGuS (#7156)
The use of shared selectors may have fairly negative effects when combined with E-matching. The issue is that it allows too many things to match. When shared selectors are disabled, a selector trigger like s(x) will only match terms that access the field of the constructor associated with s. When we use shared selectors, s(x) is converted to e.g. shared_selector_D_Int_1(x), which in turn matches applications of selectors of the same type over any constructor.
This PR disables shared selectors when quantifiers are present and SyGuS is not used.
It also disables shared selectors in single invocation subcalls, thus fixes #3109.
It further makes a minor fix to the datatypes rewriter to ensure that rewritten form does not depend on options.
Andres Noetzli [Thu, 9 Sep 2021 01:28:25 +0000 (18:28 -0700)]
Remove `TheoryState::options()` (#7148)
This commit removes TheoryState::options() by changing more classes to
EnvObjs.
Andrew Reynolds [Thu, 9 Sep 2021 01:16:11 +0000 (20:16 -0500)]
Remove deprecated SyGuS method evaluateWithUnfolding (#7155)
This was a predecessor to the evaluator and TermDbSygus::rewriteNode that is no longer necessary.
This refactors the code so that evaluateWithUnfolding is replaced by rewriteNode as necessary throughout the SyGuS solver.
Note that in a few places, the extended rewriter was being used where TermDbSygus::rewriteNode (which also evaluates recursive function definitions) should have been used.
Andrew Reynolds [Wed, 8 Sep 2021 21:42:30 +0000 (16:42 -0500)]
Add Lfsc print channel utilities (#7123)
These are utilities used for two-pass printing of LFSC proofs.
Andrew Reynolds [Wed, 8 Sep 2021 20:54:22 +0000 (15:54 -0500)]
Improve pre-skolemization, move quantifiers preprocess to own file (#7153)
This also heavily refactors the preskolemization method (now in QuantifiersPreprocess), in preparation for it being enabled by default. This method previously was doing a tree traversal, it now maintains a visited cache.
It makes minor cleanup to the dependencies of this method.
Gereon Kremer [Wed, 8 Sep 2021 19:36:50 +0000 (12:36 -0700)]
Refactor options::set() (#7138)
This PR refactors the code generation and the generate code for options::set().
Gereon Kremer [Wed, 8 Sep 2021 19:14:24 +0000 (12:14 -0700)]
Work on comments (#7139)
This PR fixes / improves the comments in the options scripts.
Gereon Kremer [Wed, 8 Sep 2021 18:59:53 +0000 (11:59 -0700)]
A couple of minor cleanups (#7141)
This PR does a couple of minor cleanups related to options.
Gereon Kremer [Wed, 8 Sep 2021 18:41:50 +0000 (11:41 -0700)]
Refactor code generation for options.h/.cpp (#7126)
This PR refactors the options code generation for the options/options.h/.cpp files.
Andrew Reynolds [Wed, 8 Sep 2021 17:30:31 +0000 (12:30 -0500)]
Towards standard usage of ExtendedRewriter (#7145)
This PR:
Adds extendedRewrite to EnvObj and Rewriter.
Eliminates static calls to Rewriter::rewrite from within the extended rewriter. Instead, the use of extended rewriter is always through Rewriter, which passes itself to the ExtendedRewriter.
Make most uses of extended rewriter non-static. I've added a placeholder method Rewriter::callExtendedRewrite for places in the code that call the extended rewriter are currently difficult to eliminate.
Andrew Reynolds [Wed, 8 Sep 2021 16:33:40 +0000 (11:33 -0500)]
Add option for using bound inference for relevant assertions (#7152)
The method for discarding assertions based on bound inference is quite expensive (40% of runtime) for some benchmarks with quantified formulas from Facebook. This adds an option to disable this, which is done by default for quantified logics.
Andrew Reynolds [Wed, 8 Sep 2021 13:39:31 +0000 (08:39 -0500)]
Add LFSC side condition conversion utility for list variables (#7131)
Required for automatic generation of side conditions from DSL rewrite rules.
mudathirmahgoub [Wed, 8 Sep 2021 08:33:16 +0000 (03:33 -0500)]
Add Datatype.java to the Java API (#6389)
This commit adds Datatype.java DatatypeTest.java and cvc5_Datatype.cpp to the java api.
mudathirmahgoub [Wed, 8 Sep 2021 08:25:23 +0000 (03:25 -0500)]
Add DatatypeConstructor.java, DatatypeConstructorDecl.java, DatatypeDecl.java, DatatypeSelector.java (#6390)
Add DatatypeConstructor.java, DatatypeConstructorDecl.java, DatatypeDecl.java, DatatypeSelector.java and their corresponding c++ files
Andrew Reynolds [Wed, 8 Sep 2021 07:00:23 +0000 (02:00 -0500)]
Use rewriteViaMethod instead of accessing builtin proof checker (#7146)
Andrew Reynolds [Tue, 7 Sep 2021 21:39:52 +0000 (16:39 -0500)]
Refactoring of proof manager initialization (#7073)
No longer takes a backwards reference to SmtEngine.
Also takes minor changes to proof post-processor from proof-new.
Andres Noetzli [Tue, 7 Sep 2021 20:52:23 +0000 (13:52 -0700)]
Use `EnvObj` methods instead of `Theory` methods (#7144)
This removes the methods `getEnv()`, `options()`, `getSatContext()`, and
`getUserContext()` from the `Theory` class because they are now part of
`EnvObj`. Additionally, this commit converts the inference managers to
`EnvObj` because of there were some calls to retrieve the contexts from
`Theory` in those classes.
Aina Niemetz [Tue, 7 Sep 2021 18:23:29 +0000 (11:23 -0700)]
sygus: Eliminate calls to Rewriter::rewrite. (#7142)
This derives sygus unification utility objects from EnvObj where
necessary. There's one remaining occurrence of Rewriter::rewrite in
sygus_unif_rl.cpp, which is a bit tricky to address and thus subject to
a future PR.
Andrew Reynolds [Tue, 7 Sep 2021 03:41:04 +0000 (22:41 -0500)]
Refactoring and fixes of set defaults for quantifiers (#7120)
This PR further refactors set defaults for incompatibility issues related to quantifiers.
It adds a new restriction that was discovered recently: --nl-rlv should not be used in quantified logics. Some regressions are modified that are impacted by this restriction.
Also does minor rearrangements to the order in which default options are set.
Aina Niemetz [Fri, 3 Sep 2021 23:33:33 +0000 (16:33 -0700)]
EnvObj: Add options(), context(), userContext(). (#7137)
This further renames EnvObj::getLogicInfo to EnvObj::logicInfo.
MikolasJanota [Fri, 3 Sep 2021 22:59:46 +0000 (00:59 +0200)]
Avoiding duplicate search in maps (#7055)
This commit identifies a couple of scenarios where an operation required
2 searches into a map/hashmap and replaces them with a single search.
This also makes the code shorter.
Signed-off-by: Mikolas Janota <mikolas.janota@gmail.com>
Aina Niemetz [Fri, 3 Sep 2021 22:36:44 +0000 (15:36 -0700)]
sygus: Make more classes derive from EnvObj. (#7140)
Gereon Kremer [Fri, 3 Sep 2021 19:12:13 +0000 (12:12 -0700)]
Refactor option sanitizations (#7129)
This PR refactors the code that performs sanity checks on the parsed option data.
Andrew Reynolds [Fri, 3 Sep 2021 18:42:18 +0000 (13:42 -0500)]
Standardize Rewriter::rewriteViaMethod call (#7119)
This moves the standard method for rewrites in proofs from TheoryBuiltinProofRuleChecker to Rewriter. The motivation for this change is to make various kinds of rewrite methods (standard rewrite, extended rewrite, extended equality rewrite, evaluate) accessible throughout the code in a standard way. After this PR, it is possible to know variants of the REWRITE proof rule application by having access to the rewriter, instead of having to get the builtin proof rule checker. Note that TheoryBuiltinProofRuleChecker::applyRewrite *cannot* be static since access to the rewriter is not longer permitted to be static.
It also removes some unused infrastructure from Rewriter.
Followup PRs will remove applyRewrite for TheoryBuiltinProofRuleChecker in favor of calling the rewriter directly.
Gereon Kremer [Fri, 3 Sep 2021 18:26:29 +0000 (11:26 -0700)]
Check that alternate is only set for bool (#7125)
This PR slightly changes how the alternate option property is handled and explicitly checks that alternate is only set for bool options.
Gereon Kremer [Fri, 3 Sep 2021 18:02:58 +0000 (11:02 -0700)]
Refactor options::get() and options::getNames() (#7135)
This PR refactors the code generation and the generated code for options::get() and options::getNames().
Andrew Reynolds [Fri, 3 Sep 2021 17:09:57 +0000 (12:09 -0500)]
Make quantifier module classes derive from EnvObj (#7132)
Aina Niemetz [Fri, 3 Sep 2021 16:54:41 +0000 (09:54 -0700)]
sygus: Make CeSingleInv derive from EnvObj. (#7136)
This further reorders the header according to the code style guidelines.
Andrew Reynolds [Fri, 3 Sep 2021 16:33:27 +0000 (11:33 -0500)]
Eliminate backwards ref to SmtEngine from abduction and interpol solvers (#7133)
Aina Niemetz [Fri, 3 Sep 2021 12:34:27 +0000 (05:34 -0700)]
theory: Have more classes in theory with reference to Env derive from EnvObj. (#7130)
Aina Niemetz [Fri, 3 Sep 2021 01:27:30 +0000 (18:27 -0700)]
theory: Have Theory and TheoryArith* derive from EnvObj. (#7128)
Note: the diff in theory.h is only huge because of small changes that caused huge reformat. The effective change is only that it now derives from EnvObj, does not have a member d_env (because it inherits it) and does not need getLogicInfo (because that's in EnvObj).
Gereon Kremer [Fri, 3 Sep 2021 00:42:00 +0000 (17:42 -0700)]
Remove "experimental" options (#7124)
This PR changes all options from experimental to expert and adds a check that only the well-defined option categories are used (common, regular, expert, undocumented).
Aina Niemetz [Fri, 3 Sep 2021 00:31:25 +0000 (17:31 -0700)]
pp: Have PreprocessingPassContext derive from EnvObj. (#7127)
Andrew Reynolds [Thu, 2 Sep 2021 22:32:49 +0000 (17:32 -0500)]
Add LFSC node converter (#6944)
This utility converts from terms used in the internal calculus to terms that capture how they should be printed in LFSC.
Gereon Kremer [Thu, 2 Sep 2021 21:34:40 +0000 (14:34 -0700)]
Refactor options handlers (#7080)
This PR does a major refactoring to the default option handlers (i.e. the piece of code that converts strings to the respective option types). It gets rid of the current multi-layer template specialization in favor of a simple overloaded template function.
Andres Noetzli [Thu, 2 Sep 2021 20:05:59 +0000 (13:05 -0700)]
[Unit Tests] Fix shell test for Editline (#7117)
When using --editline, our interactive_shell_black unit test was not
working because the unit test was redirecting std::cin and std::cout
to std::stringstreams, which does not work with Editline. This commit
refactors our InteractiveShell class to explicitly take the input and
output streams as arguments, which fixes the issue because we do not use
Editline for input streams that are not std::cin. Additionally, the
commit updates the unit test to use SMT-LIB syntax instead of the
deprecated CVC language.
Aina Niemetz [Thu, 2 Sep 2021 19:55:08 +0000 (12:55 -0700)]
Disable sygus-inst for regression close to time limit. (#7122)
Aina Niemetz [Thu, 2 Sep 2021 19:04:11 +0000 (12:04 -0700)]
EnvObj: Restrict access. (#7121)
This makes all members of EnvObj protected in order to prevent creating
EnvObj instances and call member functions. It further uses protected
inheritance (instead of public) for derived classes in order to disallow
`EnvObj* a = new DerivedObj();`.
Gereon Kremer [Thu, 2 Sep 2021 18:50:18 +0000 (11:50 -0700)]
Add API check whether option in getOptionInfo() exists (#7093)
This PR adds a missing check in the API for getOptionInfo().
Gereon Kremer [Thu, 2 Sep 2021 18:21:56 +0000 (11:21 -0700)]
Driver & Options cleanup (#7109)
This PR does some cleanup in the driver and the options. It removes the now obsolete public attribute that allowed using the options in the driver, and removes a bunch of includes from the driver that are no longer necessary.
Andrew Reynolds [Thu, 2 Sep 2021 18:06:46 +0000 (13:06 -0500)]
Remove more instances of ufHo (#7087)
Towards replacing that option with a logic check throughout.
Gereon Kremer [Thu, 2 Sep 2021 17:46:47 +0000 (10:46 -0700)]
Remove options::getAll() (#7111)
options::getAll() returns a list of all options and their current values as strings. The same functionality can be obtained by using options::getNames() and options::get(). This PR does exactly this replacement, getting rid of a large chunk of generated code. Calling getInfo("all-options") may suffer a minor performance hit, but not noticeable in practice.
Andres Noetzli [Thu, 2 Sep 2021 17:19:35 +0000 (10:19 -0700)]
[CI] Add step for running unit/API tests (#7116)
Currently, we configure one of our builds to include unit tests but then
do not compile and run them. This commit adds a step to compile and run
the unit/API tests.
Andrew Reynolds [Thu, 2 Sep 2021 17:02:46 +0000 (12:02 -0500)]
Implement lazy proof checking modes (#7106)
This implements several variants of lazy proof checking in the core proof checker.
Note this extends the ProofNode class with an additional Boolean d_provenChecked indicating whether the d_proven field was checked by the underlying proof checker.
This PR updates the default proof checking mode to lazy. The previous default can now be enabled by --proof-check=eager-simple.
Aina Niemetz [Thu, 2 Sep 2021 16:43:29 +0000 (09:43 -0700)]
Remove PreprocessingPassContext::getSmt(). (#7118)
Andres Noetzli [Thu, 2 Sep 2021 12:26:28 +0000 (05:26 -0700)]
Remove unused `Backtracker` (#7115)
backtrackable.h was defining a datastructure Backtracker, which was
a member in ArrayInfo and Info but it was not doing anything.
Andres Noetzli [Thu, 2 Sep 2021 04:14:56 +0000 (21:14 -0700)]
[Unit Tests] Fix bags rewrite test (#7114)
PR #7103 did not quite fix the unit test: The types of the lambda and
the expected bags were still off. This fixes the unit test.
Aina Niemetz [Thu, 2 Sep 2021 03:44:06 +0000 (20:44 -0700)]
pp: Derive PreprocessingPass from EnvObj. (#7112)
Aina Niemetz [Thu, 2 Sep 2021 03:22:57 +0000 (20:22 -0700)]
Enable sygus-inst for FP, NIA and NRA. (#7098)
Aina Niemetz [Thu, 2 Sep 2021 02:57:21 +0000 (19:57 -0700)]
rewriter: Make rewriteEqualityExt non-static. (#7110)
More work towards getting rid of SmtEngine::currentSmtEngine and
closing #3468.
Aina Niemetz [Thu, 2 Sep 2021 02:10:42 +0000 (19:10 -0700)]
Add class EnvObj. (#7113)
This class will serve as base class for classes that need access to the
environment. This does not yet have classes derive from this base class.
Will update #7110 and #7112 to use this after this is in.
Andres Noetzli [Thu, 2 Sep 2021 00:42:59 +0000 (17:42 -0700)]
Update CI to macOS 11 (#7104)
`macos-latest` is currently using macOS 10.15, so this updates the CI to use `mac-11` (Big Sur).
Aina Niemetz [Wed, 1 Sep 2021 23:54:47 +0000 (16:54 -0700)]
Clean up and document PP context. (#7102)
This marks methods const where possible and adds missing documentation.
Aina Niemetz [Wed, 1 Sep 2021 19:24:03 +0000 (12:24 -0700)]
Clean up TheoryEngine header according to code style guidelines. (#7107)
Haniel Barbosa [Wed, 1 Sep 2021 18:31:56 +0000 (15:31 -0300)]
[proof] [sat] Fix lost reference to reason when processing redundant literals (#7108)
Similarly to the issue when explaining literals, it's necassary to save the
reference to the reason for propagating a redundant literal, as adding
explanations that may be added to the SAT solver during the recursive
elimination of redundant literals may change the original reference.
Andrew Reynolds [Wed, 1 Sep 2021 18:05:48 +0000 (13:05 -0500)]
Print response to get-model using the API (#7084)
This changes our implementation of GetModelCommand so that we use the API to print the model.
It simplifies smt::Model so that this is a pretty printing utility, and not a layer on top of TheoryModel.
It adds getModel as an API method for returning the string representation of the model, analogous to our current support for getProof.
This eliminates the last call to getSmtEngine() from the command layer.
Aina Niemetz [Wed, 1 Sep 2021 14:24:02 +0000 (07:24 -0700)]
rewriter: Make registerTheoryRewriter non-static. (#7101)
More work towards getting rid of SmtEngine::currentSmtEngine and
closing #3468.
mudathirmahgoub [Wed, 1 Sep 2021 13:47:26 +0000 (08:47 -0500)]
Fixed TestTheoryWhiteBagsRewriter.map failure (#7103)
Fixed TestTheoryWhiteBagsRewriter.map failure
Andrew Reynolds [Wed, 1 Sep 2021 02:51:46 +0000 (21:51 -0500)]
Fix issues with cyclic proofs due to double SYMM applications (#7083)
Our way of constructing proofs from the equality engine in very rare cases may cause cyclic proofs due to constructing double applications of SYMM, which are not recognized as assumptions in CDProof. This is due to an interplay between LazyProofChain using an underlying CDProof as its default proof generator, where the proof chain would use the proofs from the CDProof to form a cyclic proof.
This was encountered in 9 SMT-LIB benchmarks in QF_SLIA.
This makes us safer in several places related to double SYMM steps.
Gereon Kremer [Wed, 1 Sep 2021 02:00:58 +0000 (19:00 -0700)]
Make driver::totalTime a TimerStat (#7089)
This makes the `driver::totalTime` statistic a `TimerStat`. This eliminates the need to obtain the overall runtime in the driver and write it to the statistics towards the end of the runtime. This not only eliminates some code in the driver, but also gets rid of the call to `getSmtEngine()` that goes around the API.
One disclaimer: The statistics output changes from seconds as a double (i.e. `1.234`) to milliseconds (i.e. `1234ms`).
Gereon Kremer [Wed, 1 Sep 2021 01:17:24 +0000 (18:17 -0700)]
No longer use direct access to options in driver (#7094)
This PR refactors the driver to no longer directly access the Options object, but instead use Solver::getOption() or Solver::getOptionInfo().