summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-03-09Update copyright headers to 2021. (#6081)Aina Niemetz
2021-03-08New C++ API: Migrate to Node layer. (#6070)Aina Niemetz
The following items will be added / adressed in subsequent PRs: * migrate statistics tracking for variables and bound variables * migrate adding of listeners when variables and bound variables are created * consistent and clean NodeManagerScope handling (out of scope for this PR) * clean up all interfaces to use const references when possible
2021-03-08Fix handling of negation of Boolean bound variables in FMF (#6066)Andrew Reynolds
Fixes #5922. We were not correctly handling when a Boolean bound variable was negated.
2021-03-08(proof-new) Separating optimizations for strings skolem caching (#6064)Andrew Reynolds
This PR ensures that several optimizations are not performed in the reference implementation of skolem sharing (d_useOpts=false). This is to ensure that the many of the rules in the strings proof checker do not depend on the rewriter. These errors were caught by the LFSC proof checker.
2021-03-08(proof-new) Prepare arithmetic for changes to ppRewrite (#6063)Andrew Reynolds
Due to recent simplifications in the internal calculus, we will no longer reason about WITNESS terms in conclusions of ProofNode, instead WITNESS terms will only be for bookkeeping.This means that some implementations of ppRewrite must change to return SKOLEM instead of WITNESS terms. Since witness terms are currently used as a way of specifying "replace t by skolem k, and send a lemma about k", a followup PR will update Theory::ppRewrite to take an additional argument std::vector<SkolemLemma>& lems where new lemmas must be explicitly added to a vector (instead of encoded as witness). Then, all Theory::ppRewrite will return skolems instead of witness terms. This PR changes arithmetic in preparation for this change. Notice that I'm introducing SkolemLemma in this PR, which is a very common pattern that can simplify some of our interfaces, e.g. see https://github.com/CVC4/CVC4/blob/master/src/smt/term_formula_removal.h#L93, https://github.com/CVC4/CVC4/blob/master/src/prop/prop_engine.h#L94. Note that the indentation of code in operator_elim.cpp changed.
2021-03-08Simplify theory preprocessing (#6058)Andrew Reynolds
Theory preprocessing now theory-preprocesses lemmas until fixed point. This eliminates the old code for rewriting them only, which is no longer necessary as theory-preprocessing subsumes rewriting.
2021-03-08Fix justification heuristic again (#6074)Gereon Kremer
This PR replaces all TNode types in datatypes by Node within justification heuristic. Fixes #6073. Unfortunately, the example from #6073 times out now, thus there is no new regression.
2021-03-08Do not process conjunctions as facts in strings (#6065)Andrew Reynolds
This changes things so we process inferences with AND conclusions as lemmas always. This fixes #6056, that benchmark times out.
2021-03-05Remove partial UDIV/UREM operators. (#6069)Mathias Preiner
This commit removes the partial UDIV/UREM operator handling. BITVECTOR_UDIV and BITVECTOR_UREM are now total.
2021-03-06Remove SMT-LIB 2.5 and 2.0 support. (#6068)Mathias Preiner
This commit removes parser and printer support for old SMT-LIB standards and also converts all regression tests to 2.6.
2021-03-05Initial implementation of an optimization solver with unit tests. (#5849)mcjuneho
2021-03-05Reimplement time limit mechanism for windows (#6049)Gereon Kremer
As noted in #5034, --tlimit is not working properly on windows. It turns out that the timer mechanism provided by the windows API are not suitable for our use case. Thus, this PR implements a generic std::thread-based timer mechanism which is used whenever the POSIX timers (setitimer) are not available. It also adds some documentation on the timer options and the reasons we ended up with this. Fixes #5034.
2021-03-04New C++ API: Clean up usage of interal datatype classes. (#6055)Aina Niemetz
This disables the temporarily available internals of datatype classes.
2021-03-04Add initial bit-blaster for proof logging. (#6053)Aina Niemetz
Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
2021-03-04New C++ Api: Clean up usage of internal types in Term. (#6054)Aina Niemetz
This disables the temporarily available internals of Term. Note: getExpr() is still available and will be disabled when the API is fully converted to Nodes.
2021-03-04Add proper define for libpoly usage (#6050)Gereon Kremer
When adding libpoly, we forgot to add a proper define to cvc4autoconfig and included real_algebraic_number.h everywhere to get this define. This PR introduces the CVC4_POLY_IMP define and removes all obsolete includes to real_algebraic_number.h.
2021-03-04Ignore isInConflict when adding conflicts (#5995)Gereon Kremer
Right now, the inference manager infrastructure drops conflicts (and literal propagations) if the solver already is in a conflict. This PR removes this behavior. The current setup in linear arithmetic requires adding conflicts, even when already in conflict, and experiments showed a small but beneficial effect of this change.
2021-03-04New C++ API: Clean up usage of internal Type/TypeNodes. (#6044)Aina Niemetz
This disables the temporarily available internals of Sort.
2021-03-04New C++ API: Clean up usage of internal Result. (#6043)Aina Niemetz
This disables the temporarily available internals of Result. It further changes the interface for getUnknownExplanation, which now returns an enum value instead of a string.
2021-03-03New C++ API: Clean up usage of internal types in Op. (#6045)Aina Niemetz
This disables the temporarily available internals of Op.
2021-03-03(proof-new) Simplifications to arithmetic operator elimination and ↵Andrew Reynolds
preprocessing (#6040) Due to refactoring in theory preprocessor, which does fixed point preprocessing on created lemmas, several things can be simplified in arithmetic operator elimination. This is required for further simplification to witness forms in the internal proof calculus.
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-03Remove uses of SExpr class. (#6035)Abdalrhman Mohamed
This PR is a step towards removing SExpr class. It replaces SExpr with std::string for set-info and set-option commands.
2021-03-03Add tuple projection operator (#5904)mudathirmahgoub
This PR adds tuple projection operator to the theory of data types. It Also adds helper functions for selecting elements from a tuple.
2021-03-02Remove non-ASCII characters from source files. (#6039)Mathias Preiner
Make collect_tags.py more robust for non-ASCII characters.
2021-03-02Improve handling of utf8 encoded inputs (#5694)Gereon Kremer
This PR fixes an issue where utf8 encoded inputs are incorrectly parsed into CVC4::String. We now use std::mbtowc to first turn the char sequence from the std::string input into a std::wstring and then process this std::wstring one charactor (wchar_t) at a time. Fixes #5673
2021-03-02Add aarch64 (ARM64) cross-compile support. (#6033)Mathias Preiner
This commit adds support for cross-compiling for aarch64 platforms and simplifies cross-compilation handling for Windows. The configure script now automatically downloads and cross-compiles the required dependencies ANTLR3 and GMP when passing option --arm64 or --win64. Fixes #1479 #5769.
2021-03-02Fix nightly errors. (#6034)Mathias Preiner
Fixes warnings with CVC4_FALLTHROUGH and -Werror for debug/production with gcc/clang. Clang detects that a CVC4_FALLTHROUGH after an Assert(false); is unreachable and issues a warning, while gcc issues a warning about an implicit fall-through if CVC4_FALLTHROUGH is not present.
2021-03-02Introduce quantifiers term registry (#5983)Andrew Reynolds
This groups utilities related to ground terms into TermRegistry which will be passed to quantifier modules.
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-03-01Refactor collection of debug and trace tags (#5996)Gereon Kremer
We have a mechanism to collect all debug and trace tags used throughout the code base to allow checking for valid tags. This mechanism relies on a collection of more or less readable shell scripts. #5921 hinted to a problem with the current setup, as it passes all source files via command line. This PR refactors this setup so that the scripts collect the files internally, and only the base directory is passed on the command line. As I was touching this code anyway, I ported everything to python and combined it into a single script, in the hope to make it more maintainable. Fixes #5921.
2021-02-27google test: theory: Migrate theory_white. (#6006)Aina Niemetz
This moves test utils for theory tests to test_smt.h and consolidates two implementations of dummy theories into one.
2021-02-26Some formatting and better tracing in prop engine (#6022)Haniel Barbosa
Miscellaneous changes from proof-new.
2021-02-26Minor improvement and fix to smt2 printer (#6009)Andrew Reynolds
This permits access to the static method string smtKindString(Kind k, Variant v) which is required for LFSC proof conversion. It also makes a fix to how a string kind is printed.
2021-02-26Optionally permit creation of non-flat function types (#6010)Andrew Reynolds
This is required for creating the representation of closues in LFSC, which are of the form ((forall x T) P) where notice that forall has non-flat function type (-> Int Sort (-> Bool Bool)).
2021-02-25Store Node instead of TNode (#5993)Gereon Kremer
The justification heuristic stores a "copy" of assertions as TNode. As witnessed by #5938, these TNodes may invalid. This PR changes this to store Nodes instead. Fixes #5938.
2021-02-25(proof-new) Fix regular expression unfolding under substitution (#5958)Andrew Reynolds
This case was previously unhandled and exercised by a recently added regression.
2021-02-26Move (optional) rewrite from TrustSubstitutionMap to SubstitutionMap. (#5992)Gereon Kremer
This PR adds optional rewriting to the SubstitutionMap class. Before, only the new TrustSubstitutionMap added optional rewriting, leading to unexpected inconsistencies between the two. In particular, cases exist where the substitution and the rewriting cancel each other (see #5943). This PR moves the optional rewriting from TrustSubstitutionMap into SubstitutionMap. While the former enables it by default, it is disabled by default for the latter and thus does not change current behavior. We now use this new option in an assertion in the non-clausal simplification. Fixes #5943.
2021-02-25Datatypes lemmas: share only external types (#5997)yoni206
Forcing lemmas in datatypes used to be done only for external types. This was changed to consider all types, which is not needed. This PR brings back the restriction to external types.
2021-02-24Enable -Werror. (#5969)Mathias Preiner
2021-02-24Ensure static-learning adds rewritten assertions. (#5982)Gereon Kremer
The static-learning preprocessing sometimes added non-rewritten assertions, despite being used in a part of the preprocessor that assumes all assertions to be rewritten. This may then break other passes further down, in the case of #5729 the non-clausal simplification which explicitly asserts that assertions are rewritten. This PR rewrites the respective assertion properly in the static-learning pass. Fixes #5729.
2021-02-24(proof-new) Add proofs for CAD solver (#5981)Gereon Kremer
This PR adds proofs for the CAD solver, based on the proof generator from the previous PR. Note that the level of detail of these CAD proofs is significantly higher than for other proofs. Making these proofs more fine-grained and maybe at some point accessible to proof checkers is probably still quite a bit of work. Thus, the CAD proof rules are both trusted rules for now.
2021-02-23Add state and inference manager to inst match generator (#5968)Andrew Reynolds
In preparation for refactoring E-matching to not pass QuantifiersEngine pointer to its utilities.
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-23Switch to C++17. (#5959)Mathias Preiner
Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2021-02-23Add proof for mult sign lemma (#5966)Gereon Kremer
This PR adds the proof for a nonlinear refinement lemma that infers the sign of a monomial from the sign of the variables.
2021-02-23[proof-new] Fix dangling pointer in SAT proof generation (#5963)Haniel Barbosa
When a clause is being explained, the negation of each of its literals, other than the one it propagates, needs to be explained. This process may lead to the creation of new clauses in the SAT solver (because if a literal being explained was propagated and an explanation was not yet given, it will then be computed and added). This may lead to changes in the memory where clauses are, which may break the reference to the original clause being explained. To avoid this issue we store the literals in the reason before we start explaining their negations. We then iterate over them rather than over the clause, as before.
2021-02-23Add proof for monomial bounds check (#5965)Gereon Kremer
This PR adds proofs for a nonlinear refinement lemma that deals with multiplication of inequalities with some term. This lemma is split into two proof rules for positive or negative factors.
2021-02-23(proof-new) Add proof generator for CAD solver (#5964)Gereon Kremer
This PR adds a proof generator for the CAD solver, including two new proof rules. The code is not yet used, but will be integrated into the CAD solver itself in another PR.
2021-02-23[proof-new] Fix handling of removable clauses in proof cnf stream (#5961)Haniel Barbosa
Previously the removable information was not being communicated from the proof cnf stream to the cnf stream, which is the one that actually uses this when asserting clauses into the SAT solver. This commit fixes this by having the proof cnf stream directly use the cnf stream d_removable attribute.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback