summaryrefslogtreecommitdiff
path: root/src/theory/uf
AgeCommit message (Collapse)Author
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 .
2020-12-02Update copyright headers.Aina Niemetz
2020-12-02Rename macro Message to CVC4Message. (#5576)Aina Niemetz
2020-11-23Change UF ho to ppRewrite instead of expand definition (#5499)Andrew Reynolds
UF uses expandDefinitions to convert fully applied HO_APPLY to APPLY_UF. The more appropriate place to do this is in Theory::ppRewrite.
2020-11-12(proof-new) Separate explanation stages in proof equality engine (#5356)Andrew Reynolds
This fixes potential cycles in assertLemma commands in the proof equality engine by using separate proof data structures for the topmost 2 stages of proof generation for equality engine proofs. This fix is required to support datatype proofs for lemmas. This PR also removes support for the ProofStepBuffer interface in ProofEqEngine, since it is unused, and suffers similar issues and would require a different unique fix.
2020-11-12(proof-new) Fix true explanations of propagations in pf equality engine (#5338)Andrew Reynolds
This ensures we construct proper proofs for propagations whose conclusions are of the form (=> true lit). Literals may be propagated with "true" as an explanation in datatypes, e.g. discriminators for datatypes with 1 constructor.
2020-10-23[proof-new] Fix n-ary kind handling in EqEngine explanations (#5332)Haniel Barbosa
Adding missing cases of kinds that are n-ary but whose partial applications are not true terms in the equality engine. This in the case not only for APPLY_UF but also for the APPLY_* kinds for datatypes.
2020-10-23Fix related to preregistering boolean term variables in strings (#5331)Andrew Reynolds
We should only add trigger predicates for string predicates, and not arbitrary Boolean terms (which can now occur since we are handling parametric sequences). This avoids a debug assertion failure reported on as a followup to #4370. In that benchmark BOOLEAN_TERM_VARIABLE was being added as a trigger predicate.
2020-10-22Remove unused equality engine types (#5319)Andrew Reynolds
This is leftover from the old proof infrastructure.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback