cvc5.git
3 years agoAdd simple BV solver (#5065)
Mathias Preiner [Tue, 22 Sep 2020 22:40:48 +0000 (15:40 -0700)]
Add simple BV solver (#5065)

This PR adds a simple BV solver that sends bit-blasting lemmas to the internal MiniSat.

3 years agoAdd skeleton for theory of bags (multisets) (#5100)
mudathirmahgoub [Tue, 22 Sep 2020 21:59:41 +0000 (16:59 -0500)]
Add skeleton for theory of bags (multisets) (#5100)

This PR adds initial headers and mostly empty source files for the theory of bags (multisets).
It acts as a basis for future commits.
It includes straightforward implementation for typing rules an enumerator for bags.

3 years agoFix compilation without LibPoly (#5118)
Andres Noetzli [Tue, 22 Sep 2020 19:13:33 +0000 (12:13 -0700)]
Fix compilation without LibPoly (#5118)

Commit e969318 introduced the ICP-based
solver for nonlinear arithmetic. That code, however, depends on LibPoly.
When configuring CVC4 without LibPoly, the code doesn't compile because
the class ICPSolver is missing. This commit adds a dummy version if
ICPSolver to remedy the issue.

3 years agoAdd method to get Python object from constant value term in Python API (#5083)
makaimann [Tue, 22 Sep 2020 18:58:03 +0000 (11:58 -0700)]
Add method to get Python object from constant value term in Python API (#5083)

This PR addresses issue https://github.com/CVC4/CVC4/issues/5014. It simply interprets the SMT-LIB string representation and produces a Python object. It currently supports booleans, ints, reals, bit-vectors, and arrays. The method (`toPythonObj`) is only valid to call if `isConst` returns true.

3 years agoUpdate copyright header script to support CMake and Python files (#5067)
Mathias Preiner [Tue, 22 Sep 2020 16:51:56 +0000 (09:51 -0700)]
Update copyright header script to support CMake and Python files (#5067)

This PR updates the update-copyright.pl script to also update/add copyright headers to CMake specific files. It further fixes a small typo in the header.

3 years agoICP-based solver for nonlinear arithmetic (#5017)
Gereon Kremer [Tue, 22 Sep 2020 15:49:46 +0000 (17:49 +0200)]
ICP-based solver for nonlinear arithmetic (#5017)

This PR adds a new icp-based solver to be integrated into the nonlinear extension.
It is not meant to be used as a stand-alone ICP solver. It does not implement splits (only propagations) and implements a rather aggressive budget mechanism that aims to quickly stop propagation to allow other solvers to take over. Additionally, it enforces a maximum bit size to avoid divergence.

3 years agoRequire dumping in a dumping test (#5108)
yoni206 [Tue, 22 Sep 2020 01:44:26 +0000 (18:44 -0700)]
Require dumping in a dumping test (#5108)

Add ; REQUIRES: dumping to a dumping test.
Fixes nightlies.

3 years ago(proof-new) Add the arrays proof checker (#5047)
Andrew Reynolds [Mon, 21 Sep 2020 17:09:33 +0000 (12:09 -0500)]
(proof-new) Add the arrays proof checker (#5047)

Includes adding the standard method for constructing the extensionality skolem using the skolem manager.

3 years agoMore flexible design for model manager distributed (#4976)
Andrew Reynolds [Sun, 20 Sep 2020 15:59:36 +0000 (10:59 -0500)]
More flexible design for model manager distributed (#4976)

This PR makes it so that the distributed model manager can be used independently of the architecture for equality engine management for theories, meaning the choice of using a separate equality engine for the model can be done in both the current distributed architecture, or the proposed central architecture (where there would be 2 equality engines, the central one and the model one). The "central model manager" on the other hand will only be combined with the central architecture. This will make it easier to test the centralized equality engine manager, since all things related to model construction can be preserved when using a central architecture.

This PR moves some of the responsibilities from the (distributed) equality engine manager to the distributed model manager, including the management of the context of the model equality engine and the allocation of its equality engine.

This PR is not intended to make any behavior changes to the current architecture.

3 years agoStandardize equality engine notifications in sets (#5098)
Andrew Reynolds [Sat, 19 Sep 2020 15:57:51 +0000 (10:57 -0500)]
Standardize equality engine notifications in sets (#5098)

3 years agoFix assertion list for globally defined recursive functions (#5084)
Andrew Reynolds [Fri, 18 Sep 2020 20:49:40 +0000 (15:49 -0500)]
Fix assertion list for globally defined recursive functions (#5084)

This was uncovered by a (spurious) proof checking failure on proof-new.

3 years agoAdd the shared solver (#4982)
Andrew Reynolds [Fri, 18 Sep 2020 17:52:16 +0000 (12:52 -0500)]
Add the shared solver (#4982)

This PR adds the definition for the "shared solver", it does not connect it to TheoryEngine/CombinationEngine yet. This is an object that behaves like a "glue" theory solver and has a special role in TheoryEngine.

In the current architecture, the "SharedTermsDatabase" is the "shared solver", although in the central architecture, the shared solver will be required to behave differently. This PR adds the abstract definition of shared solver, where notice SharedSolverDistributed is a thin layer on top of SharedTermsDatabase.

In a followup PR, CombinationEngine will maintain a shared solver and ~5 blocks of code in TheoryEngine will be callbacks to the SharedSolver. Also, eventually the code for SharedTermsDatabase should be split: the parts involving equality reason/propagation/explanation should be migrated into SharedSolverDistributed, and the parts related to registration will remain in SharedTermsDatabase (to also be used in the planned SharedSolverCentral).

FYI @barrettcw

3 years agobv2int: quantifiers support (#5080)
yoni206 [Fri, 18 Sep 2020 17:12:04 +0000 (10:12 -0700)]
bv2int: quantifiers support (#5080)

This PR adds quantifiers support for bv2int preprocessing pass, and adds regressions that use quantifiers.

3 years agoFix muzzled builds (#5093)
Andres Noetzli [Fri, 18 Sep 2020 16:53:23 +0000 (09:53 -0700)]
Fix muzzled builds (#5093)

Commit 2c2f05c moved some function
definitions from dump.h to dump.cpp, which is good. However, the
corresponding definitions for muzzled builds weren't moved, so muzzled builds
defined the operator << multiple times. This made our nightly
competition build fail. This commit fixes the issue by moving the
alternative definitions to the source file as well.

3 years ago[proof-new] Proof utilities for normalizing clauses at the Node level (#5089)
Haniel Barbosa [Fri, 18 Sep 2020 16:32:47 +0000 (13:32 -0300)]
[proof-new] Proof utilities for normalizing clauses at the Node level (#5089)

Extends Theory Proof Step Buffer. These utilities are used so that we can account for the fact that Minisat silenly does these transformations on added clauses.

3 years agoLogic exception for arrays indexed by arrays (#5073)
Andrew Reynolds [Fri, 18 Sep 2020 15:07:12 +0000 (10:07 -0500)]
Logic exception for arrays indexed by arrays (#5073)

This throws a logic exception when a term of array type whose index is also an array is registered to the theory of arrays.

It refactors the preRegisterTermInternal method of arrays so that all non-equality terms are added to the equality engine in the same block of code, which also checks for the type.

Fixes #4237.

FYI @barrettcw

3 years ago[Strings] Fix extended equality rewriter (#5092)
Andres Noetzli [Fri, 18 Sep 2020 14:40:26 +0000 (07:40 -0700)]
[Strings] Fix extended equality rewriter (#5092)

Fixes #5090. Our extended equality rewriter was performing the following
unsound rewrite:

(= (str.++ Str13 Str5 Str16 Str13) (str.++ Str5 Str16 Str13 "cjyfqapanogtdznjbtqlfrmmfauwjdpvnhfpfhzsxaarlfvlvs")) ---> (and (= (str.++ Str13 Str5) Str5) (= (str.++ Str16 Str13) (str.++ Str16 Str13 "cjyfqapanogtdznjbtqlfrmmfauwjdpvnhfpfhzsxaarlfvlvs")))
The rule being applied was SPLIT_EQ_STRIP_R. The rewrite was applied
due to the following circumstances:

The rewriter found that (str.++ Str13 Str5) is strictly shorter than (str.++ Str5 Str16 Str13 "cjyfqapanogtdznjbtqlfrmmfauwjdpvnhfpfhzsxaarlfvlvs")
The rewriter stripped the symbolic length of the former from the
latter
stripSymbolicLength() was only able to strip the first component, so
there was a remaining length of (str.len Str13)
The rule SPLIT_EQ_STRIP_R, however, was implicitly assuming that the
symbolic length can either be stripped completly or not at all and was
not considering the case where only a part of the length can be
stripped.

The commit adds a flag to stripSymbolicLength() that makes the
function only return true if the whole length can be stripped from the
input. The commit also refactors the code in stripSymbolicLength()
slightly.

Note: It is not necessary to try to do something smart in the case where
only a partial prefix can be stripped because the rewriter tries to
apply the rule to all the different prefix combinations anyway.

3 years ago(proof-new) Updates to proof node updater algorithm (#5088)
Andrew Reynolds [Fri, 18 Sep 2020 02:38:42 +0000 (21:38 -0500)]
(proof-new) Updates to proof node updater algorithm (#5088)

This updates the proof node updater so that we apply updates to a fixed point, stopping if the proof node is not updated or if the callback explicitly tells us not to continue. This also fixes an issue where proof nodes would be updated to SCOPE and incorrectly traversed after updating.

This additionally adds debugging feature to proof node updater to track the moment at which an unexpected free assumption is introduced by an update.

3 years ago(proof-new) Rewrites involving operators in term conversion proof generator (#5072)
Andrew Reynolds [Fri, 18 Sep 2020 02:06:44 +0000 (21:06 -0500)]
(proof-new) Rewrites involving operators in term conversion proof generator (#5072)

In some cases, e.g. witness form conversion, we require traversing to operators in term conversion proofs. This updates the term conversion generator to support (term-context-sensitive) rewrites involving operators using HO_CONG. This requires updating the term context utilities with support for operators.

3 years ago(proof-new) Fixes for theory engine proof generator (#5087)
Andrew Reynolds [Thu, 17 Sep 2020 21:57:05 +0000 (16:57 -0500)]
(proof-new) Fixes for theory engine proof generator (#5087)

Fixes an issue where conflicts stored in the theory engine proof generator where expecting to be (=> F false) instead of (not F).

3 years ago[proof-new] Have mkScope agnostic to True assumptions (#5086)
Haniel Barbosa [Thu, 17 Sep 2020 21:22:21 +0000 (18:22 -0300)]
[proof-new] Have mkScope agnostic to True assumptions (#5086)

3 years ago(cad-solver) Fix square-free-basis computation (#5085)
Gereon Kremer [Thu, 17 Sep 2020 20:44:53 +0000 (22:44 +0200)]
(cad-solver) Fix square-free-basis computation (#5085)

This PR fixes a subtle issue when making the polynomials of two subsequent (overlapping) intervals relative square-free. We now make sure that the resulting polynomials are ignored (if constant) or pushed to the lower dimension (if lower main variable). Also, we now appropriately update the main polynomials of the corresponding intervals.

3 years agoReduce recursion in term formula removal (#5052)
Andrew Reynolds [Thu, 17 Sep 2020 19:43:24 +0000 (14:43 -0500)]
Reduce recursion in term formula removal (#5052)

This reduces the use of recursion in term formula removal module. The recursion depth is now limited to the number of term positions on a path where a formula must be removed, instead of being limited to the overall formula depth. This PR also fixes some documentation.

Notice for its main cache d_tfCache, this class uses a CDInsertHashMap (instead of a CDHashMap) which does not allow inserting more than once, hence an auxliary "processedChildren" vector had to be introduced to track whether we have processed children. It's not clear to me whether we should just use the more standard CDHashMap, which would simplify this.

One non-linear arithmetic regression went unsat -> unknown, I added --nl-ext-tplanes to fix this.

This should fix #4889. It is possible to further reduce the recursion in this pass, which can be done on a followup PR if needed.

3 years agoUse new inference manager in transcendental solver (#5022)
Gereon Kremer [Thu, 17 Sep 2020 13:54:02 +0000 (15:54 +0200)]
Use new inference manager in transcendental solver (#5022)

This refactors the transcendental solver to add lemmas to the new inference manager instead of using the old lemma collection scheme.

3 years agoDo not allow to build Python bindings if building statically (#4784)
Andrew V. Jones [Thu, 17 Sep 2020 07:18:43 +0000 (08:18 +0100)]
Do not allow to build Python bindings if building statically (#4784)

This PR disables building the Python bindings if you're doing a static build (which makes sense, because there's no such thing as a "static" Python module).

Signed-off-by: Andrew V. Jones andrew.jones@vector.com
3 years agoFurther standardization of datatypes (#5076)
Andrew Reynolds [Thu, 17 Sep 2020 05:22:20 +0000 (00:22 -0500)]
Further standardization of datatypes (#5076)

We now have no custom calls to equality engine explain, and only 2 manual calls to equality engine (in its entailment check). This also updates the notify class to the standard one.

This commit makes datatypes ready to start work on proofs.

3 years agoDumping internal define-funs with no arguments (#5077)
yoni206 [Thu, 17 Sep 2020 03:34:40 +0000 (20:34 -0700)]
Dumping internal define-funs with no arguments (#5077)

Currently, --dump=assertions:... fails if a define-fun command is executed internally (an example for this can be found here.

The failure occurs because the printer expects a range type whenever a define-fun command is executed. However, when this command is used for 0-ary functions (variables), the getter for the range fails.

This PR fixes this by asking for a range only if the type is indeed a function. Otherwise, the original type is printed.

A test that currently fails but passes with this PR is included.

3 years agoOnly rewrite replace_re(_all) if regexp is const (#5075)
Andres Noetzli [Wed, 16 Sep 2020 20:36:05 +0000 (13:36 -0700)]
Only rewrite replace_re(_all) if regexp is const (#5075)

Fixes #5074. This commit fixes an issue in the rewriter of
str.replace_re and str.replace_re_all. For both operators, we do two
kinds of rewrites: (1) If the first argument is a constant, then we
check whether the regular expression appears in that constant and (2) we
check whether the regular expression matches the empty string. Both of
those checks were assuming a constant regular expression but there was
no guard in place for it. This commit adds the missing guard.

3 years agoDump commands in internal code using command printing functions. (#5040)
Abdalrhman Mohamed [Wed, 16 Sep 2020 17:45:01 +0000 (12:45 -0500)]
Dump commands in internal code using command printing functions. (#5040)

This is work towards migrating commands to the new API. Internal code that creates command objects just for dumping is replaced with direct calls to functions that print the those commands.

3 years agoAdd buffered inference manager to TheorySep (#5038)
Andrew Reynolds [Wed, 16 Sep 2020 16:57:59 +0000 (11:57 -0500)]
Add buffered inference manager to TheorySep (#5038)

This makes TheorySep use a standard buffered inference manager. Notice the behavior in TheorySep::doPending was simplified to assert both facts and lemmas. Previously, this was doing something strange: if there were any lemmas, then both facts and lemmas would be processed as lemmas, otherwise the facts would be processed as facts. Notice that TheorySep currently does not use facts by default. This design can be addressed in the future.

Note this PR eliminates the need for a custom explain method in TheorySep.

3 years ago[proof-new] Adds Lazy CDProof chain data-structure (#5060)
Haniel Barbosa [Wed, 16 Sep 2020 16:25:33 +0000 (13:25 -0300)]
[proof-new] Adds Lazy CDProof chain data-structure (#5060)

A proof generator to facilitate connection of locally independent but globally dependent proofs. In particular this will be used to model the resolution chains done in Minisat.

3 years agoRefactor collectModelInfo in TheoryArith (#5027)
Andrew Reynolds [Wed, 16 Sep 2020 15:21:40 +0000 (10:21 -0500)]
Refactor collectModelInfo in TheoryArith (#5027)

This is work towards updating the arithmetic solver to the new standard, and in particular isolating TheoryArithPrivate as the "linear solver", and TheoryArith as the overall approach for arithmetic.

This transfers ownership of the non-linear extension from TheoryArithPrivate to TheoryArith. The former still has a pointer to the non-linear extension, which will be removed with further refactoring.

This PR additionally moves the code that handles the interplay of the non-linear extension in TheoryArithPrivate::collectModelInfo to TheoryArith, and simplifies the model interface for TheoryArithPrivate.

3 years agobv2int: support models in tests (#5068)
yoni206 [Wed, 16 Sep 2020 04:31:10 +0000 (21:31 -0700)]
bv2int: support models in tests (#5068)

Previous changes in this preprocessing pass have already enabled model generation when using it.
However, the satisfiable tests still had --no-check-models.

The changes in this PR:

All --no-check-models from current tests for the preprocessing pass are removed.
Refactoring of the relevant part of the code.
Solves CVC4/cvc4-projects#128.

Remark: disabling white-spaces when reviewing this PR is recommended.

3 years ago[proof-new] Extending eqproof conversion to HO congruence (#5071)
Haniel Barbosa [Wed, 16 Sep 2020 03:30:49 +0000 (00:30 -0300)]
[proof-new] Extending eqproof conversion to HO congruence (#5071)

3 years ago[proof-new] Resolution rules and checkers (#5070)
Haniel Barbosa [Wed, 16 Sep 2020 03:05:10 +0000 (00:05 -0300)]
[proof-new] Resolution rules and checkers (#5070)

3 years ago[proof-new] A simple proof generator for buffered proof steps (#5069)
Haniel Barbosa [Wed, 16 Sep 2020 02:36:21 +0000 (23:36 -0300)]
[proof-new] A simple proof generator for buffered proof steps (#5069)

This commit also modifies proof equality engine to use this new proof generator rather than the FactProofGenerator, on which this new one is based.

Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
3 years ago(proof-new) Make proofs mandatory in proof equality engine (#5059)
Andrew Reynolds [Wed, 16 Sep 2020 01:47:43 +0000 (20:47 -0500)]
(proof-new) Make proofs mandatory in proof equality engine (#5059)

All uses of proof equality engine are now guarded such that the ordinary equality engine is used when proofs are not enabled. Thus, we can make proofs mandatory in proof equality engine. This eliminates the need for some guards.

Some indentation changed, but there are no additions in this PR.

3 years agoMove sets member propagation to SolverState (#5045)
Andrew Reynolds [Tue, 15 Sep 2020 16:07:21 +0000 (11:07 -0500)]
Move sets member propagation to SolverState (#5045)

This eliminates the parent relationship from solver state to theory sets.

3 years agoRename system tests to api tests and remove obsolete Java test. (#5066)
Aina Niemetz [Tue, 15 Sep 2020 04:21:03 +0000 (21:21 -0700)]
Rename system tests to api tests and remove obsolete Java test. (#5066)

3 years agoMove quantifiers engine private to own file (#5053)
Andrew Reynolds [Tue, 15 Sep 2020 03:13:38 +0000 (22:13 -0500)]
Move quantifiers engine private to own file (#5053)

This moves and renames the quantifiers engine private class to QuantifiersModules. This is in preparation for using a standard state and inference manager object in TheoryQuantifiers and QuantifiersEngine.

Initializing quantifiers engine is a bit non-standard since it is intentionally a separate entity from TheoryQuantifiers. However, the plan is for quantifiers engine to use the state and inference manager of TheoryQuantifiers.

This PR additionally moves the initialization of quantifiers modules to a QuantifiersEngine::finishInit() method. The motivation for is that we do not have a state and inference manager during construction of QuantifiersEngine, since these will live in TheoryQuantifiers and will be passed to QuantifiersEngine during TheoryQuantifiers::finishInit. This means that we need a final pass to initialize quantifiers engine after these are initialized, which thus must come as the last step of TheoryEngine::finishInit.

The next PR will connect the state and inference manager to QuantifiersEngine during TheoryQuantifiers::finishInit. Then, the plan is for many of the core utilities in QuantifiersEngine to migrate to state/inference manager, and finally for its modules to reference state and inference manager instead of QuantifiersEngine.

3 years agoFix needsModel method for CEGQI (#5048)
Andrew Reynolds [Tue, 15 Sep 2020 02:58:08 +0000 (21:58 -0500)]
Fix needsModel method for CEGQI (#5048)

There was a bug in CEGQI's needModel method which could say that it doesnt need a model built when there are no active quantifiers. However, computing active quantifiers is not done in QuantifiersEngine::check until after this method is called, meaning it was using stale data on whether a quantifier was active or not. This could lead to the use of bogus models in CEGQI in incremental mode in some corner cases, leading to the assertion failure in #5019.

Fixes #5019.

3 years agoStandard equality engine notify class for Theory (#5042)
Andrew Reynolds [Tue, 15 Sep 2020 02:19:15 +0000 (21:19 -0500)]
Standard equality engine notify class for Theory (#5042)

This makes a standard equality engine notify class that forwards the 3 mandatory callbacks to the provided inference manager (the other 3 callbacks may be specific to the theory). It updates TheoryUF to use this class, other theories will be updated to this style as more inference manager are added.

Notice that we could also forward the other 3 callbacks in this class to Theory, making eqNotifyNewClass, eqNotifyMerge, and eqNotifyDisequal virtual methods in Theory, which can be done on a future PR if needed.

3 years agoFix ABC build (#5061)
Andres Noetzli [Tue, 15 Sep 2020 02:09:03 +0000 (19:09 -0700)]
Fix ABC build (#5061)

For some reason, our ABC build was including cnf_stream.h in an
extern "C" block instead of outside of it, which made the build fail
because the header indirectly includes cdqueue.h, which uses
templates. This change is older
(e9bfbb2)
but only started causing problems with our nightly builds recently.

3 years agoInterpolation: Add implementation for SyGuS interpolation module (final) (#5063)
Ying Sheng [Tue, 15 Sep 2020 01:47:15 +0000 (09:47 +0800)]
Interpolation: Add implementation for SyGuS interpolation module (final) (#5063)

Add interface for SyGuS Interpolation module. Adding the API for (get-interpol s B), which is aim for computes an I that A->I and I->B. Here A is the assertions in the stack.

3 years agobv2int: simpler translation for plus and times (#5055)
yoni206 [Mon, 14 Sep 2020 21:46:51 +0000 (14:46 -0700)]
bv2int: simpler translation for plus and times (#5055)

This PR makes the translation of plus and times by:

using plain mod rather than introducing a skolem. If this proves to be a bottleneck, we can try to tackle it where mod is treated in the solver in the future. This will make it easier to introduce support for quantifiers, as we don't need to introduce new variables under quantification.
Making sure everything is binarized in more places of the translation.

3 years agoRefactoring the rewriter of sets (#4856)
Andrew Reynolds [Mon, 14 Sep 2020 17:49:58 +0000 (12:49 -0500)]
Refactoring the rewriter of sets (#4856)

Changes it so that we don't flatten unions if at least one child is non-constant, since this may lead to children that are non-constant by mixing constant/non-constant elements and is generally expensive for large unions of singleton elements.

The previous rewriting policy was causing an incorrect model in a separation logic benchmark reported by Andrew Jones, due to unions of constant elements that were unsorted (and hence not considered constants). We now have the invariant that all subterms that are unions of constant elements are set constants.

Note this PR changes the normal form of set constants to be (union (singleton c1) ... (union (singleton cn-1) (singleton cn) ... ) not (union ... (union (singleton c1) (singleton c2)) ... (singleton cn)).

It changes a unit test which was impacted by this change which was failing due to hardcoding the enumeration order in the unit test. The test is now agnostic to the order of elements.

3 years agoFix type for Windows build (#5062)
Andres Noetzli [Mon, 14 Sep 2020 15:15:31 +0000 (08:15 -0700)]
Fix type for Windows build (#5062)

The BVToInt preprocessing pass was using uint, which appears to be
undefined when we cross-compile for Windows. This commit fixes the issue
by using size_t.

3 years agoStandardize uses of inference manager in datatypes (#5035)
Andrew Reynolds [Mon, 14 Sep 2020 07:52:28 +0000 (02:52 -0500)]
Standardize uses of inference manager in datatypes (#5035)

Datatypes now has an inference manager. This is work towards making it use the inference manager in all places where it should.

In particular, this makes many of the places where conflicts are determined using `InferenceManager::conflictExp` (explained conflict) instead of `InferenceManager::conflict` + custom calls to explain in TheoryDatatypes.  The goal here is to ensure that all explanations from the equality engine are managed by inference manager, which is required for proofs.

3 years ago(proof-new) Add SMT proof manager (#5054)
Andrew Reynolds [Sat, 12 Sep 2020 03:38:04 +0000 (22:38 -0500)]
(proof-new) Add SMT proof manager (#5054)

This module is responsible for constructing the proof checker, proof node manager, and implementing dumping and checking of the final proof.

This PR includes setting up some connections into the various modules for proof production.

3 years ago(proof-new) Update TheoryEngine lemma and conflict to TrustNode (#5056)
Andrew Reynolds [Sat, 12 Sep 2020 01:02:33 +0000 (20:02 -0500)]
(proof-new) Update TheoryEngine lemma and conflict to TrustNode (#5056)

This updates the theory engine interfaces for conflicts and lemmas to be in terms of TrustNode not Node.

This also updates the return value of getExplanation methods in TheoryEngine to TrustNode, but it does not yet add the proof generation code to that method yet, which will come in a separate PR.

3 years agoMove finite model minimization to UF last call effort (#5050)
Andrew Reynolds [Fri, 11 Sep 2020 21:01:11 +0000 (16:01 -0500)]
Move finite model minimization to UF last call effort (#5050)

This moves model minimization happen in TheoryUF's last call effort check instead of being a custom call in quantifiers finite model finding. This is both a better design and avoids bugs when quantifiers are not enabled (for QF_UF+cardinality constraints).

Fixes #4850.

3 years ago(proof-new) Handle mismatched assumptions in proof equality engine during mkScope...
Andrew Reynolds [Fri, 11 Sep 2020 20:15:53 +0000 (15:15 -0500)]
(proof-new) Handle mismatched assumptions in proof equality engine during mkScope (#5012)

This modifies the fix for Boolean equalities with constants so that is addressed lazily during ProofNodeManager mkScope instead of when asserting assumptions to the proof equality engine. This ensures that the default method for asserting facts to the equality engine for external assertions does not have any special cases.

A previously abandoned solution to this issue had made this a part of CDProof. Instead, this PR modifies the mkScope method only. The fix makes mkScope robust to any assumption mismatches in mkScope that can be fixed by rewriting, not just Boolean equality with constants. It is intended to be used infrequently as a last resort when mkScope has mismatched assumptions. The handling of mismatches due to symmetry remains in this method.

3 years ago(proof-new) Use deep copy for final lemma step in proof equality engine (#5013)
Andrew Reynolds [Fri, 11 Sep 2020 19:38:13 +0000 (14:38 -0500)]
(proof-new) Use deep copy for final lemma step in proof equality engine (#5013)

Previously, strings on proof-new used a ProofStepBuffer for deriving the final conclusion of lemmas in proof equality engine (assertLemma). This was recently changed to use the more standard ProofGenerator interface of assertLemma. However, there was a bug in this method: the steps from this proof need to be deep copied into the proof we are generating or otherwise the explanation of these literals are not connected in the CDProof. This updates the proof equality engine so that it instructs the proof generator to do a deep copy in this case. Notice this is very rarely more than a single step.

3 years agoAdd witness to cvc printer. (#5057)
Andrew Reynolds [Fri, 11 Sep 2020 00:09:11 +0000 (19:09 -0500)]
Add witness to cvc printer. (#5057)

3 years agobv2int: refactoring the main translation loop (#5051)
yoni206 [Thu, 10 Sep 2020 17:23:30 +0000 (10:23 -0700)]
bv2int: refactoring the main translation loop (#5051)

This PR introduces a refactoring of the main translation loop in bv2int preprocessing pass.
Many parts are wrapped by helper functions and so the main loop becomes smaller.

remark: selecting "Hide whitespace changes" cuts the diff by ~50%.

3 years agoParser error for wrong number of datatypes (#5049)
Andrew Reynolds [Thu, 10 Sep 2020 03:34:36 +0000 (22:34 -0500)]
Parser error for wrong number of datatypes (#5049)

Fixes #4973.

3 years agobv2int: improvement in lazy failures (#5020)
yoni206 [Thu, 10 Sep 2020 01:32:55 +0000 (18:32 -0700)]
bv2int: improvement in lazy failures (#5020)

Previously, in case we encountered a term we cannot translate to integers (e.g. a bit-vector array), we would fail.
This PR improves that behavior by keeping the original term, and potentially wrapping it BV_TO_NAT and INT_TO_BV operators.

A test which includes a bit-vector array is included, which was not supported before.

In addition, the treatment of uninterpreted functions is refactored and documented better.

3 years agoUse state and inference manager in UF CardinalityExtension (#5036)
Andrew Reynolds [Thu, 10 Sep 2020 00:19:41 +0000 (19:19 -0500)]
Use state and inference manager in UF CardinalityExtension (#5036)

Previously, the cardinality extension of UF maintained its own (SAT-context-dependent) conflict flag, made custom calls to output channel, and maintained its own cache of lemmas. This standardizes the CardinalityExtension so that it uses state and inference manager of UF, which means that UF and the cardinality extension are fully syncronized concerning whether we are in a conflicting state at all times (d_state.isInConflict). It further cleans up some of the interfaces in CardinalityExtension. This required adding a forwarding method for setIncomplete in inference manager.

3 years ago(proof-new) Minor changes to proof node updater (#5011)
Andrew Reynolds [Wed, 9 Sep 2020 22:10:05 +0000 (17:10 -0500)]
(proof-new) Minor changes to proof node updater (#5011)

This includes some changes to proof node updater that are not currently on master.

This includes:
(1) Explicitly passing the result of the current proof node we are updating,
(2) Caching the results of updates based on Node. In other words, proofs (in the same scope) that we have already seen that prove the same thing as the current proof node are reused.

It also enables the compilation of proof post-processor, which was missing on master and makes Rewriter of SmtEngine public which is required for doing so.

3 years ago(proof-new) Make proofs in term formula removal term context sensitive (#5008)
Andrew Reynolds [Wed, 9 Sep 2020 20:53:30 +0000 (15:53 -0500)]
(proof-new) Make proofs in term formula removal term context sensitive (#5008)

Previously term formula removal proofs didnt not take the term context into account. This updates it to make use of the term context sensitive support in TConvProofGenerator. More generally, it uses the term context computation as the standard way of caching the results of rewrites in this class (regardless of proofs).

3 years ago(proof-new) Generalize single step helper in eager proof generator (#5046)
Andrew Reynolds [Wed, 9 Sep 2020 20:11:01 +0000 (15:11 -0500)]
(proof-new) Generalize single step helper in eager proof generator (#5046)

This allows single step proofs to have premises, closed by a SCOPE. This will be useful for array lemmas.

3 years agoFixes for regular expressions + sygus (#5044)
Andrew Reynolds [Wed, 9 Sep 2020 19:12:52 +0000 (14:12 -0500)]
Fixes for regular expressions + sygus (#5044)

Includes not constructing a default value for non-first class types (e.g. RegLan) and a missing printer case for re.diff.

3 years agoAdd is_singleton operator to the theory of sets (#5033)
mudathirmahgoub [Wed, 9 Sep 2020 18:19:40 +0000 (13:19 -0500)]
Add is_singleton operator to the theory of sets (#5033)

This pull request adds a new operator is_singleton for sets to determine whether a set is a singleton.
Before this operator, the user either uses an existential quantifier or the cardinality operator in smtlib. The former affects the performance especially when polarity is negative. The latter requires the cardinality extension in sets theory.
The implementation of is_singleton only uses an internal existential quantifier with the hope of optimizing it later.
New rewriting rules:

(is_singleton (singleton x)) is rewritten as true.
(is_singleton A) is rewritten as (= A (singleton x)) where x is a fresh skolem of the same type of elements of A.
(choose (singleton x)) is rewritten as x.

3 years agoSplit term registry from theory state in sets (#5037)
Andrew Reynolds [Wed, 9 Sep 2020 01:36:08 +0000 (20:36 -0500)]
Split term registry from theory state in sets (#5037)

Currently, the theory state object SolverState in sets sends lemmas and has a reference to the parent theory. This PR is work towards eliminating these dependencies.

This adds a TermRegistry object which is responsible for some of the tasks currently done by SolverState, including all those involving lemmas.

Notice this also makes a bug fix in getUnivSetEqClass where the universe set was being returned instead of its representative.

A followup PR will make SolverState maintain SAT-context-dependent membership lists which is also required for breaking the dependence on the parent theory.

4 years agoFix printing of fp values. (#5041)
Mathias Preiner [Tue, 8 Sep 2020 18:51:23 +0000 (11:51 -0700)]
Fix printing of fp values. (#5041)

Fixes #5032

4 years agoMake CVC/API BV div/mod semantics match SMT-LIB (#4997)
Andres Noetzli [Tue, 8 Sep 2020 17:33:59 +0000 (10:33 -0700)]
Make CVC/API BV div/mod semantics match SMT-LIB (#4997)

This commit changes the semantics of the CVC language and with the
default semantics of the API for `BVUDIV`, `BVUREM`, `BVSDIV`, `BVSREM`,
and `BVSMOD` to match the semantics of SMT-LIB >=2.6. Relatedly, the
commit also adds comments to our API documentation for the different
semantics enabled by the `bv-div-zero-const` option.

4 years agoEliminate a custom use of TheorySep in quantifiers engine for EPR (#5039)
Andrew Reynolds [Tue, 8 Sep 2020 16:45:38 +0000 (11:45 -0500)]
Eliminate a custom use of TheorySep in quantifiers engine for EPR (#5039)

This moves the initialization of the connection between separation logic and EPR to the separation logic theory, which is a more logical place for this. This eliminates a backwards reference to theory engine from quantifiers engine.

4 years agoAdd asLemma flag to theory inference process (#5030)
Andrew Reynolds [Fri, 4 Sep 2020 22:52:11 +0000 (17:52 -0500)]
Add asLemma flag to theory inference process (#5030)

This is required for strings, which uses the same data structure, InferInfo, for both lemmas and facts. This ensures the process method of theory inference knows where we are a pending lemma or a pending fact.

It also makes a few changes necessary for the proof-new branch, including disabling the proof node manager in the inference manager for datatypes.

4 years ago[Regressions] Fix regression issues related to BV proofs (#5029)
Haniel Barbosa [Fri, 4 Sep 2020 22:06:03 +0000 (19:06 -0300)]
[Regressions] Fix regression issues related to BV proofs (#5029)

4 years ago(new theory) Update TheoryBV to new standard for collectModelValues (#5025)
Andrew Reynolds [Fri, 4 Sep 2020 21:00:24 +0000 (16:00 -0500)]
(new theory) Update TheoryBV to new standard for collectModelValues (#5025)

This makes collectModelValues the main model interface in BV instead of collectModelInfo. BV is no longer responsible for asserting its equality engine or computing relevant/asserted terms.

This involved updating the interface on many subsolvers of BvSolverLazy. This includes moving the responsibility of addSharedTerm (regarding trigger terms) from the subsolvers to TheoryBV, this eventually will be automatically handled in Theory once all theories are migrated to the new standard.

This ensures that TheoryBV is updated to the new standard (check was already migrated on c9e23f6).

4 years agoFix non-lib-poly-build issues (#5028)
Haniel Barbosa [Fri, 4 Sep 2020 19:13:01 +0000 (16:13 -0300)]
Fix non-lib-poly-build issues  (#5028)

4 years agoUse Result::Sat instead of BenchmarkStatus in printers. (#5026)
Abdalrhman Mohamed [Fri, 4 Sep 2020 15:42:33 +0000 (10:42 -0500)]
Use Result::Sat instead of BenchmarkStatus in printers. (#5026)

This PR modifies the printers to use Result::Sat, "internal" version of BenchmarkStatus, for printing benchmark status commands.

4 years agoUse arith::InferenceManager for CAD lemmas (#5015)
Gereon Kremer [Fri, 4 Sep 2020 14:59:49 +0000 (16:59 +0200)]
Use arith::InferenceManager for CAD lemmas (#5015)

This makes the CAD solver use the new arith::InferenceManager instead of the previously used lemma collection scheme.

4 years agoChange the unavailable ABC mercury repository for the ABC solver code base on GitHub...
Malte Mues [Fri, 4 Sep 2020 10:35:24 +0000 (12:35 +0200)]
Change the unavailable ABC mercury repository for the ABC solver code base on  GitHub (#4989)

Signed-off-by: Malte Mues (mail.mues@gmail.com)
4 years agoSplit lazy bit-vector solver from TheoryBV (#5009)
Mathias Preiner [Fri, 4 Sep 2020 01:34:19 +0000 (18:34 -0700)]
Split lazy bit-vector solver from TheoryBV  (#5009)

This commit separates the lazy bit-vector solver from TheoryBV, which is now a thin wrapper around a bit-vector solver d_internal . This will allow us to easily swap out the bit-vector solver in the future.

4 years agoAdd interfaces for making trust nodes in TheoryInferenceManager. (#5016)
Andrew Reynolds [Fri, 4 Sep 2020 00:15:30 +0000 (19:15 -0500)]
Add interfaces for making trust nodes in TheoryInferenceManager. (#5016)

This gives theories a finer grained control over explained lemmas and conflicts.

A theory may now use an inference manager to construct "explained" lemmas/conflicts e.g. via mkLemmaExp, subsequently do any theory-specific debugging or modification to that lemma before sending it via trustedLemma.

This is required for the new strings inference manager on proof-new.

This also adds a missing variant of conflicts for the proof equality engine. It also does a minor simplification of a previous variant for constructing conflicts from proof equality engine based on a proof step buffer.

4 years agoUpdate sets inference manager to inherit from InferenceManagerBuffered (#5007)
Andrew Reynolds [Thu, 3 Sep 2020 23:31:36 +0000 (18:31 -0500)]
Update sets inference manager to inherit from InferenceManagerBuffered (#5007)

This updates the inference manager of sets to inherit from the standard base class InferenceManagerBuffered.

It matches that base class almost exactly, with cosmetic changes.

Notice that sets currently has a design issue: the state object sends lemmas and hence currently requires a pointer to the theory. This will be untangled in a future PR.

This PR makes a few very minor changes to the behavior, including not to use the "preprocess" property for subtype lemmas.

4 years agoAdded a new rule to simplify (bvugt (bvurem T x) x) (#4993)
Gereon Kremer [Thu, 3 Sep 2020 22:58:03 +0000 (00:58 +0200)]
Added a new rule to simplify (bvugt (bvurem T x) x) (#4993)

Motivated by #4936, this PR adds a new BV rewrite rule:
(bvugt (bvurem T x) x) ==> (ite (= x 0) (bvugt T 0) false)
Fixes #4936.

4 years agoMinor cleanup of quantifiers engine (#4994)
Andrew Reynolds [Thu, 3 Sep 2020 21:00:26 +0000 (16:00 -0500)]
Minor cleanup of quantifiers engine (#4994)

Eventually, QuanitifersEngine should not depend on TheoryEngine. This is a first step in this direction. It eliminates some uses of TheoryEngine and eliminates a unnecessary friend relationship between quantifiers::TermDb and TheoryEngine. Further refactoring will be done in future PRs.

4 years agoChanging the handled operators in bv2int preprocessing pass (#4970)
yoni206 [Thu, 3 Sep 2020 20:28:48 +0000 (13:28 -0700)]
Changing the handled operators in bv2int preprocessing pass (#4970)

Some of the bit-vector operators are directly translated to integers, while others are eliminated before the translation.
This PR changes the set of operators that we eliminate (and as a consequence, also the set of operators that we handle directly):

The only bit-wise operator that is translated is bvand. The rest are now eliminated.
bvneg is now eliminated.
The various division operators are still eliminated, but using different rewrite rules.
zero-extend and sign-extend are now handled directly.
shifting is changed to favor ITEs over non-linear multiplication.

4 years agoBasic integration of arith::InferenceManager (#4999)
Gereon Kremer [Thu, 3 Sep 2020 14:27:56 +0000 (16:27 +0200)]
Basic integration of arith::InferenceManager (#4999)

This PR adds a first basic integration of the arith::InferenceManager into the arithmetic theory and the nonlinear extension in particular.
While the lemma collection mechanism (in the nonlinear extension) remains unchanged, the lemmas are ultimately not directly pushed to the output channel but instead added to the inference manager. Additionally, we no longer use the cache within the nonlinear extension but instead rely on the inference manager.
This PR is based on #4960.

4 years agoMake nonlinear extension (more) deterministic (#4996)
Gereon Kremer [Thu, 3 Sep 2020 13:39:58 +0000 (15:39 +0200)]
Make nonlinear extension (more) deterministic (#4996)

This PR tries to make the nonlinear extension more deterministic by keeping the order of input assertion (instead of taking them from a hash set). This makes the ordering somewhat more robust against varying node ids, which proved to be a problem for debugging...
Also adds a few logging messages at interesting places.

4 years agoDrop {INCLUDE,LIBRARY,RUNTIME}_INSTALL_DIR variables in CMakeLists.txt (#4979)
FabianWolff [Thu, 3 Sep 2020 01:48:36 +0000 (03:48 +0200)]
Drop {INCLUDE,LIBRARY,RUNTIME}_INSTALL_DIR variables in CMakeLists.txt (#4979)

On Debian (for instance), libraries aren't installed into `/usr/lib/`, but into something like `/usr/lib/x86_64-linux-gnu/`. In particular, this means that setting the `LIBRARY_INSTALL_DIR` to `lib` in the top-level `CMakeLists.txt` file is wrong.

Luckily, there is a simple solution: CMake provides [`CMAKE_INSTALL_LIBDIR`](https://cmake.org/cmake/help/v3.0/module/GNUInstallDirs.html) for this very purpose, which has sensible defaults and can be set by the user. In particular, since `CMAKE_INSTALL_LIBDIR` is a standardized variable, tools like the ones used for building Debian packages can set it to what they want it to be, whereas using a custom variable like `LIBRARY_INSTALL_DIR` wouldn't work in this setting.

Signed-off-by: Fabian Wolff <fabi.wolff@arcor.de>
4 years agoMake ExtTheory independent of Theory (#5010)
Andrew Reynolds [Thu, 3 Sep 2020 01:18:48 +0000 (20:18 -0500)]
Make ExtTheory independent of Theory (#5010)

This makes it so that ExtTheory uses a generic callback instead of relying on Theory.

The primary purpose of this commit is to eliminate the connection of TheoryBV and ExtTheory. This commit moves all things related to ExtTheory in BV into CoreSolver.

It also refactors the use of ExtTheory in strings and arithmetic.

4 years ago(proof-new) Support proofs of quantifier instantiation (#5001)
Andrew Reynolds [Thu, 3 Sep 2020 00:47:52 +0000 (19:47 -0500)]
(proof-new) Support proofs of quantifier instantiation (#5001)

This adds basic support for proofs of quantifier instantiation, which is the main method for sending lemmas from TheoryQuantifiers. Quantifier instantiation is also heavily used for solving extended string functions.

4 years ago(proof-new) Improve debugging infrastructure for open proofs (#4984)
Andrew Reynolds [Thu, 3 Sep 2020 00:13:54 +0000 (19:13 -0500)]
(proof-new) Improve debugging infrastructure for open proofs (#4984)

This includes more versions of checking whether a proof node is closed and standardizing output.

4 years agoFix CryptoMiniSat build, regression (#5006)
Andres Noetzli [Wed, 2 Sep 2020 23:20:31 +0000 (16:20 -0700)]
Fix CryptoMiniSat build, regression (#5006)

This commit fixes builds that include CryptoMiniSat after commit
8ad308b removed them. It also fixes one
of the regressions that requires unsat cores but was run when the build
was configured without them.

4 years ago[Python API] Add missing methods to Datatype/Term (#4998)
Andres Noetzli [Wed, 2 Sep 2020 21:02:26 +0000 (14:02 -0700)]
[Python API] Add missing methods to Datatype/Term (#4998)

Fixes #4942. The Python API was missing some methods related to
datatypes. Most importantly, it was missing mkDatatypeSorts, which
meant that datatypes with unresolved placeholders could not be resolved.
This commit adds missing methods and ports the corresponding tests of
datatype_api_black.h to Python. The commit also adds support for
__getitem__ in Term.

4 years agoRemove #line directives from generated files. (#5005)
Gereon Kremer [Wed, 2 Sep 2020 20:15:30 +0000 (22:15 +0200)]
Remove #line directives from generated files. (#5005)

This PR removes any usage of the #line directive.
We no longer consider it particularly useful, and it obstructs reproducible builds (see #4980).
Fixes #4980.

4 years ago(proof-new) Updates to builtin proof checker (#4962)
Andrew Reynolds [Wed, 2 Sep 2020 19:32:24 +0000 (14:32 -0500)]
(proof-new) Updates to builtin proof checker (#4962)

This includes support for some trusted rules (whose use is to come). It also modifies THEORY_REWRITE so that it is a "trusted" rule, that is, it is not re-checked. The reason for this is that TheoryRewriter is not deterministic. An example of non-determinism in TheoryRewriter are rules that introduce bound variables (e.g. quantifiers rewriter) since these bound variables are fresh each time it is invoked. Non-deterministic theory rewriters cannot be rechecked, which was leading to failures on proof-new at proof check time. The other way to fix this would be to cache TheoryRewriter responses, but then the checker would only be verifying that the caching was being done properly. This is not worthwhile.

4 years ago(proof-new) Add proof support in TheoryUF (#5002)
Andrew Reynolds [Wed, 2 Sep 2020 19:01:39 +0000 (14:01 -0500)]
(proof-new) Add proof support in TheoryUF (#5002)

This makes TheoryUF use a standard theory inference manager, which thus makes it proof producing when proof-new is enabled.

This additionally cleans HoExtension so that it does not keep a backwards reference to TheoryUF and instead takes its inference manager. This additionally adds two rules for higher-order that are required to make its equality engine proofs correct.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
4 years agoUse SMT-COMP configuration for competition build (#4995)
Andres Noetzli [Wed, 2 Sep 2020 18:30:57 +0000 (11:30 -0700)]
Use SMT-COMP configuration for competition build (#4995)

This commit changes our `competition` build to include the libraries
that we have used for SMT-COMP by default. This makes it easier for
users to reproduce our SMT-COMP configuration for performance
measurements. We are using GPL libraries for this build type, so the
commit adds color to highlight the fact that this build type produces a
GPL build.

4 years ago(proof-new) Make term conversion proof generator optionally term-context sensitive...
Andrew Reynolds [Wed, 2 Sep 2020 18:01:10 +0000 (13:01 -0500)]
(proof-new) Make term conversion proof generator optionally term-context sensitive (#4972)

This will be used by TermFormulaRemoval.

4 years agoMigrating from using the 'glpk-cut-log' repo to using an official GPLK release +...
Andrew V. Jones [Wed, 2 Sep 2020 17:17:32 +0000 (18:17 +0100)]
Migrating from using the 'glpk-cut-log' repo to using an official GPLK release + a set of patches (#4775)

This PR attempts to migrate from @timothy-king's repo for glpk-cut-log to using a set of patches against the official release that 'glpk-cut-log' was based off of (4.52).

This is in preparation of trying to rework these patches to be against the latest GPLK release (4.65). If we can do this, then it makes it easier for CVC4's dependancy on GPLK to be able to follow upstream (rather than being stuck on a release that is 6.5 years old!).

I have added GPLK as an option for CI, but I do not know if we actually want this. My concern with adding this to CI is that we're then not testing non-GPL builds, which doesn't seem ideal.

However, before starting to rework the patches to be against 4.65, I want to make sure that things are actually working/stable against 4.52; so having at least one CI target that does use GPLK would be great.

Signed-off-by: Andrew V. Jones andrew.jones@vector.com
4 years agoIntroduce an internal version of Commands. (#4988)
Abdalrhman Mohamed [Wed, 2 Sep 2020 16:50:41 +0000 (11:50 -0500)]
Introduce an internal version of Commands. (#4988)

This PR is a step towards the migration of Commands to the public API. Node versions of some Commands are introduced for internal use (as necessary). The DumpManager is refactored to make use of those commands.

4 years agoMinor updates to theory inference manager (#5004)
Andrew Reynolds [Wed, 2 Sep 2020 16:11:48 +0000 (11:11 -0500)]
Minor updates to theory inference manager (#5004)

These updates are inspired by the current inference manager for sets.

4 years ago(new theory) Update TheoryArrays to the new standard (#5000)
Andrew Reynolds [Wed, 2 Sep 2020 15:56:53 +0000 (10:56 -0500)]
(new theory) Update TheoryArrays to the new standard (#5000)

This includes using the standard d_conflict flag in TheoryState and splitting its check into 3 callbacks.

It also deletes some unused code and eliminates an assertion (line 791 of theory_arrays.cpp) which doesn't hold in a central architecture.

Further work on standardization for arrays will add an InferenceManager to guard its uses of asserting facts to equality engine (both for proofs and configurable theory combination).

FYI @barrettcw

4 years agoUse std::unique_ptr instead of std::shared_ptr for inference manager (#5003)
Gereon Kremer [Wed, 2 Sep 2020 15:21:03 +0000 (17:21 +0200)]
Use std::unique_ptr instead of std::shared_ptr for inference manager (#5003)

We now use std::unique_ptr instead of std::shared_ptr when storing TheoryInference objects.

4 years agoAdd ArithLemma and arith::InferenceManager (#4960)
Gereon Kremer [Wed, 2 Sep 2020 13:48:12 +0000 (15:48 +0200)]
Add ArithLemma and arith::InferenceManager (#4960)

This PR adds a new ArithLemma that is essentiall NlLemma, but derived from the new theory::Lemma and meant to be used all across the arithmetic theory.
Also, based on theory::InferenceManagerBuffered this PR adds arith::InferenceManager that shall become the sole interface between the arithmetic theory and the OutputChannel.

4 years ago(new theory) Update TheorySets to the new interface (#4951)
Andrew Reynolds [Wed, 2 Sep 2020 13:17:39 +0000 (08:17 -0500)]
(new theory) Update TheorySets to the new interface (#4951)

This updates the theory of sets to the new interface (see #4929).