summaryrefslogtreecommitdiff
path: root/src/theory/uf
AgeCommit message (Collapse)Author
2021-07-14Generalize congruence handling for HO in eq proofs (#6883)Haniel Barbosa
Previously we were not considering proofs for HO equalities (i.e., between operators) that were transitivity chains. This commit generalizes the elaboration procedure in eq_proof to do so.
2021-07-14Refactor setup of proof equality engine for central EE (#6831)Andrew Reynolds
Users of an equality engine should each use the same proof equality engine that wraps it. This ensures that theory inference managers do so, by tracking the official proof equality engine for an equality engine in theory inference manager. This is in preparation for (proper equality proofs for) central equality engine. It also adds some debugging code that is highly useful for debugging issues related to when equalities are processed in theory inference manager.
2021-06-30Do not notify during equality engine initialization (#6817)Andrew Reynolds
This is an alternative fix to https://github.com/cvc5/cvc5/pull/6808. This ensures that we do not notify the provided class of an equality engine during initialization.
2021-06-22Minor simplification to equality engine notifications (#6726)Andrew Reynolds
This removes the d_performNotify flag from equality engine which was supposedly used to guard a very old dependency concerning notifications during initialization. We are now robust to this and hence the flag can be removed.
2021-06-22Set up fine grained equality notifications (#6734)Andrew Reynolds
This adds fields to equality engine setup information which will be used to hook up theories to the central equality engine. This PR does not impact any behavior. This is in preparation for the central equality engine.
2021-06-08Make TheoryUF compatible with central equality engine (#6695)Andrew Reynolds
Work towards central equality engine. This does some minor reorganization to TheoryUF, related to UF+cardinality constraints that makes it compatible with central equality engine. In particular, preNotifyFact is removed in favor of adding conflicts after cardinality constraints are added to the equality engine. This ensures that the central equality engine can explain conflicts that involve cardinality constraints (which will no longer be the responsibility of UF when --ee-mode=central).
2021-05-26 More precise includes of `Node` constants (#6617)Andres Noetzli
We store constants, e.g., BitVector and Rational, in our node infrastructure. As a result, we were indirectly including some headers in almost all files, e.g., the GMP headers. This commit changes that by forward-declaring the classes for the constants. As a result, we have to include headers like util/rational.h explicitly when we use Rational but it saves about 3 minutes in compile time (CPU time). The commit changes RoundingMode from an enum to an enum class such that it can be forward declared.
2021-05-24Move proof utilities to src/proof/ (#6611)Andrew Reynolds
This moves all generic proof utilites from src/expr/ and src/theory/ to src/proof/. It also changes the include for term conversion proof generator to conv_proof_generator in preparation to rename this utility on a followup PR (to avoid confusion with the use of "Term").
2021-05-20Remove old unsat cores (#6581)Haniel Barbosa
This commit removes the remaining old proof code and the code to produce unsat cores based on it.
2021-05-13Add std::hash overloads for Node, TNode and TypeNode. (#6534)Mathias Preiner
Eliminates NodeHashFunction, TNodeHashFunction and TypeNodeHashFunction.
2021-04-23Move implementation of UF rewriter to cpp (#6393)Andrew Reynolds
2021-04-21UF: Move implementation of type rules to cpp. (#6403)Aina Niemetz
2021-04-15Rename occurrences of CVC4 to CVC5. (#6351)Aina Niemetz
This renames everything but GitHub links and build system related macros. Switching the build system to cvc5 will be the last step in the renaming process.
2021-04-14Refactor / reimplement statistics (#6162)Gereon Kremer
This PR refactors how we collect statistics. It splits the current statistic values into the values and a proxy object. The actual values now live inside the registry (making the ownership model way easier) while the proxy object are handed to whoever wants to collect a new statistic. It also extends the C++ API to obtain and inspect the statistics. To change the ownership, this PR needs to touch every single statistic in the whole codebase and change how it is registered.
2021-04-14Rename public and private headers in src/include. (#6352)Aina Niemetz
2021-04-12Fix computation of whether a type is finite (#6312)Andrew Reynolds
This PR generalizes TypeNode::isFinite / TypeNode::isInterpretedFinite with TypeNode::getCardinalityClass. It then uses this method to fix our computation of when a type should be treated as finite. Fixes #4260, fixes #6100 (that benchmark now says unknown without an error).
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-09Rename CVC4__ header guards to CVC5__. (#6326)Aina Niemetz
2021-04-08Add identifiers for sources of incompleteness (#6311)Andrew Reynolds
This PR classifies all internal kinds of incompleteness as identifiers. It makes it so TheoryEngine records an identifier when its incomplete flag is set. The next step will be to possibly communicate this value to the user.
2021-04-07Set incomplete if not applying ho extensionality (#6281)Andrew Reynolds
If the user manually disables ho-extensionality via expert option --no-uf-ho-ext, we should answer "unknown" instead of "sat" when applicable. Fixes #4318.
2021-04-07(proof-new) Proper implementation of proof node cloning (#6285)Andrew Reynolds
Previously, we were traversing proof node as a tree, now we use a dag traversal. This also makes sure that proofs work when we have a external proof conversion and we are in incremental mode. In such cases, the final proof must be cloned to ensure that we do not overwrite proof nodes, which may be reused across multiple check-sat.
2021-04-07Replace calls to NodeManager::mkSkolem with SkolemManager::mkDummySkolem (#6291)Andrew Reynolds
This is in preparation for refactoring skolem creation throughout the code base to improve proofs and migrate Theory::expandDefinitions to Rewriter::expandDefinitions. This PR also eliminates some unused code in TheoryArithPrivate. Followup PRs will start formalizing/eliminating calls to mkDummySkolem.
2021-04-06Remove template argument from `NodeBuilder` (#6290)Andres Noetzli
Currently, NodeBuilder takes a single template argument: An integer that determines the expected number of arguments. This argument is used to determine the size of the d_inlineNvChildSpace array. This array is used to construct nodes inline. The advantage of this is that we don't have to allocate a NodeValue on the heap for the node under construction until we are sure that the node is new. While templating the array size may save some stack space (or avoid a heap allocation if we statically know that we a fixed number of children and that number is greater than 10), it complicates the code and leads to longer compile times. Thus, this commit removes the template argument and moves some of the NodeBuilder code to a source file for faster compilation. CPU build time before change (debug build): 2429.68s CPU build time after change (debug build): 2228.44s Signed-off-by: Andres Noetzli noetzli@amazon.com
2021-04-05[proof-new] Registering proof checkers uniformly from the SMT solver (#6275)Haniel Barbosa
Each theory has its own proof checker, responsible for checking the rules pertaining to that theory. The main proof checker uses these specialized checkers. Previously the main proof checker (of the proof node manager used across the SMT solver) was connected to these theory proof checkers during initialization of the theory. This commit adds an interface to the theories for retrieving its proof checker (analogous to how one retrieves the rewriter of a theory) which is used by a new method in the theory engine to register a theory proof checker to a given proof checker according to a theory id. This is in preparation for the new unsat cores based on proofs.
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-29Move decision manager into theory inference manager (#6231)Andrew Reynolds
This makes it so that the decision manager is accessible from TheoryInferenceManager. This is work towards breaking circular dependencies in quantifiers, and also helps simplify several other dependencies in e.g. UF and datatypes.
2021-03-22 Function types are always first-class (#6167)Andrew Reynolds
This eliminates one of the dependencies of TypeNode on options. In particular, this makes it so that function types are always considered first-class. This change makes it so that higher-order types can always be constructed; logic exceptions should occur if they are used in constraints.
2021-03-21Clean up remaining raw uses of output channel (#6161)Andrew Reynolds
After this PR, with only a few exceptions, all calls to output channel for lemmas, conflicts are made through inference manager. This is work towards standardizing the statistics for theories.
2021-03-20Improved tracing for equivalence classes of EE (#6169)Andrew Reynolds
Helps debugging model issues.
2021-03-18Eliminate dependency on quantifiers engine in quantifiers model (#6165)Andrew Reynolds
2021-03-12[proof-new] Fix arity check when building equality engine proofs (#6133)Haniel Barbosa
Broken in dc679ed.
2021-03-11First refactoring of statistics classes (#6105)Gereon Kremer
This PR does a first round of refactoring on the statistics, in particular the Stat class and derived classes. It significantly shrinks the class hierarchy, modernizes some code (e.g. use std::chrono instead of clock_gettime), removes unused features (e.g. nesting of statistics) and does some general cleanup and consolidation. Subsequent PRs are planned to change the ownership model (right now every module owns the Stat object) which makes the whole register / unregister mechanism obsolete.
2021-03-11Delete Expr layer. (#6117)Aina Niemetz
2021-03-10Move ExprManager::isNAryKind to NodeManager. (#6107)Aina Niemetz
This also renames metakind::getLowerBoundForKind and metakind::getUpperBoundForKind for consistency. Note that the NodeManager class needs to be reordered to comply to our style guidelines. This PR does not reorder but introduces a public block at the top (where the rest of the public interface of the class should go eventually).
2021-03-10(proof-new) Update ppRewrite to use skolem lemmas (#6102)Andrew Reynolds
This is required for proofs. The internal calculus no longer uses witness forms for reasoning, and hence we cannot return witness terms in ppRewrite. This is required to fix a debug failure, as well as making life easier on external proof conversions. As a result of this PR, for example, given (P a) as input to ppRewrite, previous we returned: (P (witness ((x T)) (A x))) now we return: (P k), with skolem lemma ( (A k), k ) Followup PRs will remove the use of WITNESS in ppRewrite (e.g. in sets and strings); this PR modifies arithmetic to not return WITNESS in response to ppRewrite.
2021-03-09Some more cleanup of includes (#6083)Gereon Kremer
This PR does some more cleanup of the includes.
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-03-03More cleanup of includes to reduce compilation times (#6037)Gereon Kremer
Similar to #6031, this PR implements suggestions from iwyu to reduce the number of includes in header files by introducing forward declarations and moving includes to source files.
2021-03-02Clean up includes to reduce compile times (#6031)Gereon Kremer
This PR cleans up a ton of includes, based on the suggestions of iwyu. Mostly, it removes includes from header files in favor of forward declarations and adds includes to source files.
2021-02-23Add interface to TheoryState for sort inference and facts (#5967)Andrew Reynolds
This eliminates the need for direct references to TheoryEngine from quantifiers and UF+cardinality. This PR also eliminates an unnecessary reference to TheoryEngine in TheoryModelBuilder and breaks a few more dependencies in quantifiers modules.
2021-02-19Refactoring theory inference process (#5920)Andrew Reynolds
This PR refactors TheoryInference so that it is not responsible for calling back into InferenceManager, instead it sets data so that InferenceManagerBuffered has enough information to do this itself. It also makes the decision of whether to cache lemmas in theory inference manager a global choice per-theory instead of per-lemma.
2021-02-18Add statistic for InferenceId to TheoryInferenceManager. (#5913)Gereon Kremer
This PR uses the IntegralHistogramStat to obtain statistics about the sent inferences within the TheoryInferenceManager. All theories are adapted to provide a proper name (prefix) for the name of the statistic.
2021-02-17TheoryIds for UF theory. (#5901)Gereon Kremer
This PR introduces new InferenceId for the uf theory and uses them instead of InferenceId::UNKNOWN.
2021-02-11Make most methods of TheoryInferenceManager expect an InferenceId. (#5897)Gereon Kremer
This PR makes most methods of the TheoryInferenceManager expect an InferenceId. All classes that inherit from TheoryInferenceManager are adapted accordingly and InferenceIds are passed everywhere. In some cases, there are no appropriate InferenceIds yet. We use InferenceId::UNKNOWN for the time being and introduce proper values in future PRs. The InferenceIds are not yet used, but will be used for statistics and debug output.
2021-02-02Cleanup some includes (#5847)Andrew Reynolds
In particular, theory_engine.h is included many places spuriously. A few blocks of code changed indentation, updated to guidelines.
2020-12-10Refactor KindMap (#5646)Gereon Kremer
The KindMap class is only used in the EqualityEngine and implements way more than necessary. This PR removes all the functionality that is never used.
2020-12-09Fixed a bunch of clang warnings. (#5637)Gereon Kremer
2020-12-03Use mkAnd where the number of children may be less than two. (#5551)Gereon Kremer
An AND was constructed from a vector that may only hold a single or no element. This PR uses mkAnd instead. Fixes #5550 .
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback