summaryrefslogtreecommitdiff
path: root/test/regress/regress0
AgeCommit message (Collapse)Author
2021-01-15Implement --no-strings-lazy-pp as a preprocessing pass (#5777)Andrew Reynolds
This option eliminates extended functions in strings eagerly. This was incorrectly done at ppRewrite previously, which should not add lemmas. Instead, this makes this technique into a preprocessing pass. To do this, the interface for the strings preprocessor was cleaned to have fewer dependencies, and made to track a cache internally. Fixes #5608, fixes #5745, fixes #5767, fixes #5771, fixes #5406.
2021-01-13Do not call ppRewrite on Boolean equalities (#5762)Andrew Reynolds
Was causing arithmetic to process a Boolean equality when --arith-rewrite-equalities is true. Fixes #5761.
2021-01-12Foreign theory rewrite option (#5763)yoni206
We are adding a preprocessing pass that simplifies arithmetic constraints related to strings. For example, len(s) >= 0 would be replaced by true. This will make use of CVC4::theory::strings::ArithEntail::check. This PR is the third and final step. It adds the user-facing option that turn this feature on, as well as regression tests.
2021-01-11Remove extended rewrite for arithmetic (#5760)Andrew Reynolds
This rewrite is no longer needed since our philosophy on rewriting extended arithmetic symbols has changed (we employ aggressive rewriting for extended arithmetic symbols in the normal rewriter). Moreover there was a soundness bug in the extended rewriter for division and mod by 0. Fixes #5737, fixes #5740.
2021-01-07Make sure polynomials are properly factorized in nl-cad (#5733)Gereon Kremer
CAD theory (used in nl-cad) requires that polynomials are properly factorized (a finest square-free basis). This PR replaces usage of raw std::vector by a new wrapper PolyVector that ensures proper factorization whenever a polynomial is added. This fixes one piece of code that omitted factorization, leading to soundness issues as in #5726. Fixes #5726.
2021-01-05Adding str.len to triggers (#5746)yoni206
This PR adds str.len to symbols that are considered for instantiations. It is motivated by a benchmark that originated from Boogie. A minimized version of that benchmark is added as a regression.
2020-12-22Remove preregister instantiation heuristic (#5713)Andrew Reynolds
This was a hack to improve the QF arithmetic solver by ensuring that certain instantiation lemmas were preregistered. This is no longer needed and will be a hindrance to the currently line of refactoring.
2020-12-18Bugfix: proofs for props of non-normal arith lits (#5702)Alex Ozdemir
Arith has a normal form for literals, which the rewriter computes. Nonetheless, arith sometimes gets (and ultimately propagates) non-normal literals. It normalizes them internally and goes about its business. However, when asked for an explanation, it must prove the non-normal literal, rather than the normal one. Also includes a regression for the bug, courtesy of Andy. Co-authored-by: Andrew Reynolds andrew-reynolds@uiowa.edu
2020-12-17Simplify and fix check models (#5685)Andrew Reynolds
Currently --check-models is implemented by replaying several preprocessing steps, including theory-specific expand definitions, and then checking whether the result evaluates to true. However, by having --check-models rely on complex preprocessing machinery defeats its purpose, as these steps are part of its trusted base. Moreover, issue #5645 demonstrates that this may lead to spurious errors where we incorrectly conclude that an input assertion is false, when it is not. This PR significantly simplifies --check-models so that it only relies on define-fun expansion + rewriting + evaluation. This ensures that --check-models is "sound" i.e. it does not falsely report a formula as evaluating to false. As a consequence, this makes check-models give warnings more often, i.e. when partial operators are involved, thus -q is added to silence warnings on some regressions. A followup PR will use a satisfiability check on the input formula post-expand-definitions to properly implement a trustworthy version of check-models that is robust for partial operators. Fixes #5645.
2020-12-16Simplify preprocessing (#5647)Andrew Reynolds
This simplifies preprocessing so that the only call to theory-preprocess and ite-removal is at the very end. (One exception is early-theory-pp which is used by default in combination with ite-simp to maintain the performance on QF_LIA/nec). This is in preparation for making theory preprocessing happen lazily, post-CNF conversion. @HanielB has done SMT-LIB performance runs, see below.
2020-12-16Mark quantifier instantiations as needs justify (#5684)Andrew Reynolds
This avoids a solution soundness issue when disabling all NL strategies and using --nl-rlv=always.
2020-12-15Remove bv divide by zero option (#5672)Andrew Reynolds
This is required to avoid failures in the planned refactoring of check-models. This removes the SMT-LIB 2.5 semantics option for bvdiv/bvrem. It still remains to merge the BITVECTOR_UDIV / BITVECTOR_UDIV_TOTAL kinds, calling the total version "BITVECTOR_UDIV", and analogously for UREM. FYI @barrettcw
2020-12-14Properly implement datatype selector triggers (#5624)Andrew Reynolds
This ensures that datatype selectors are properly handled as triggers in E-matching. This is challenging since selectors in quantified formulas are of kind APPLY_SELECTOR but are theory-preprocessed to APPLY_SELECTOR_TOTAL/APPLY_UF. Hence, we must match on 2 possible operators, and ones that do not match the operator of the trigger. This adds a custom candidate generator for this case. It also removes a deprecated option that is no longer used (in part due to our use of shared selectors). This is in preparation for further work on optimizing cvc4 on benchmarks from Facebook. Note that there is not a convienient way to call expandDefinitions currently (which is required to get the proper operators to match). This PR calls smt::getCurrentSmtEngine() to do this, although we should find a better solution soon, e.g. adding expandDefinitions to the rewriter. FYI @barrettcw
2020-12-14Fix SAT-context dependent issue in strings preregistration (#5564)Andrew Reynolds
This makes preregistration of terms SAT-context dependent in strings instead of user-context dependent. Fixes #5547. This is required to avoid model unsoundness on sequence benchmarks, as demonstrated in that issue. It furthermore impacts how we have been handling theory combination with arithmetic for str.len and impacts how propagation is setup for the strings equality engine. I will do performance testing on this PR.
2020-12-11bv-to-int: new tests from an issue (#5654)yoni206
#5293 pointed to assertion failures when employing --bv-to-int, starting from commit 94e3d9a. The bug is not reproduced on current master, and so we would have this PR close #5293 . This PR adds the benchmarks from #5293 .
2020-12-10Refactor regressions (#5639)Andrew Reynolds
This adds a net +82 regressions to regress[0-2] and adds several additional disabled regressions to regress3 and regress4. This involved fixing the status on several regressions, and ensuring CMakeLists.txt includes all files (exactly once) in the test/regress/ subdirectory. It also moves several regressions to the proper regression levels (those that take >30 seconds in debug are moved to regress3+).
2020-12-09Remove obsolete regressions (#5633)Andrew Reynolds
This removes benchmarks for the following reasons: - regress1/arith/arith-int are removed since there are many similar regressions (10 from this set are already enabled) - bitvector cvc benchmarks are removed since their *.smt2 benchmarks are enabled - other benchmarks are removed due to features we do not plan to support - one placeholder benchmark is removed
2020-12-08Ensure CEGQI is applied for parametric datatypes when applicable (#5628)Andrew Reynolds
Previously was a bug computing the argument types of parametric datatypes.
2020-12-08Add regression from #1978. (#5552)Gereon Kremer
This PR adds a regression from #1978 that has been fixed in the meantime. Closes #1978 .
2020-12-08Fix a bug with synth-fun printer (#5512)Abdalrhman Mohamed
This PR fixes #5448. SynthFunCommand::toStream used to call d_grammar->resolve even when d_grammar is a nullptr. This PR fixes the issue and modifies the signature of Printer::toStreamCmdSynthFun to make it clear that grammar is an optional argument.
2020-12-08Make term indices in the strings base solver aware of types (#5589)Andrew Reynolds
This is required for handling inputs that combine strings and sequences. Fixes #5542.
2020-12-08Proper implementation of expand definitions for sequences (#5616)Andrew Reynolds
Expand definitions for sequences was wrong in two ways: (1) we replaced str.from_code with a witness term. This led to it being unevaluatable in models. (2) we did not handle seq.nth, meaning its model value was unevaluatable if it was out of bounds. Now it evaluates the value of the uninterpreted function we replace with. This corrects both issues and adds a regression to demonstrate both kinds of terms evaluate correctly. To do this, I added a helper function to skolem cache as well as a new (internal-only) kind SEQ_NTH_TOTAL. Notice applications of this kind should only be used for model evaluation. Notice this fixes several check-model warnings in the regressions. It still does not fix others since other things must be corrected for model evaluation (e.g. expandDefinitions must be applied on theory assertions for --debug-check-models). This will be done in later PRs.
2020-12-07Fix collect model values for sequences of sequences (#5579)Andrew Reynolds
Fixes #5543. Recently we changed our model construction for sequences here: #5391. This fix is not safe for sequences of sequences, where Valuation::getModelValue should not be called, since the argument of the seq.unit is not a shared term. This makes our model construction for sequences more robust, however I'm not sure this is the end solution. In particular, it is still questionable whether we should call Valuation::getModelValue at all (consider sequences of theories whose model construction comes after strings), or for cases of (seq.unit x) where x is a sequence or string that does not have a concrete value. Regardless, this PR could be merged in the meantime since it should definitely fix some of the current issues.
2020-12-07Disable algebraic BV subtheory by default and make experimental. (#5596)Mathias Preiner
Fixes #5370, #5462.
2020-12-07Fix issue with free variables introduced by quantifier rewriter (#5602)Andrew Reynolds
This was caused by the quantifiers rewriting eliminating extended arithmetic operators, which was required due to the way counterexample-guided quantifier instantiation used to work with preprocessing. The technique is now more robust and this option can be deleted. This fixes a debug assertion failure from UFNIA SMT-LIB, a minimized benchmark is included as a regression.
2020-12-07Do not expand theory definitions at the beginning of preprocessing (#5544)Andrew Reynolds
This updates the preprocessor so that expand definitions does not expand theory symbols at the beginning of preprocessing. This also restores the previous expandDefinitions method in arithmetic, which is required for correctly interpreting division by zero in models, but should not be applied at the beginning of preprocessing. Moreover it ensures that only partial operators are eliminated in arithmetic expandDefinitions, which required an additional argument partialOnly to arith::OperatorElim. This adds -q to suppress warnings for many quantified regressions which now emit warnings with --check-model. This will be addressed later as part of CVC4/cvc4-wishues#43. The purpose of this PR is two-fold: (1) Currently our responses to get-value are incorrect for partial operators like div, mod, seq.nth since partial operators can be left unevaluated. (2) The preprocessor should have the opportunity to rewrite and eliminate extended operators before they are expanded. This is required for addressing performance issues for non-linear arithmetic. It is also required for ensuring that trigger selection can be done properly for datatype selectors (to be addressed on a later PR).
2020-12-07Add regression from #4927 (#5556)Gereon Kremer
The error from #4927 has been fixed in the meantime, this PR adds the example as regression. Closes #4927.
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-03Models as (#5581)yoni206
This PR relates to #4987 . Our plan is to: delete the model keyword (done in #5415 ) avoid printing extra declarations by default (done in #5432 ) wrap UF values with as expressions. This PR does step 3, fixes a regression accordingly, and adds the formula from #4987 and a variant of it to the regressions.
2020-12-02Fix RoundingMode mapping in API. (#5578)Aina Niemetz
Fixes #5524.
2020-12-01Add regressions from #3687. (#5553)Gereon Kremer
The error from #3687 has been fixed in the meantime. This PR adds the two examples from this issue as regressions. Closes #3687
2020-12-01Fix issues related to model declarations (#5560)Andrew Reynolds
This corrects two issues related to model declarations: (1) model declaration terms were mistaken not cleared, (2) the model needs to be explicitly destructed before the node manager because it contains references to Node. Fixes #5540
2020-12-01Improve rewriting of str.<= (#4848)Andres Noetzli
This commit improves our rewriting of str.<= slightly. If we have constant prefixes that are different, we can always rewrite the term to a constant. Previously, we were only doing so when the result was false.
2020-12-01Add regressions from #5099 (#5557)Gereon Kremer
The issue from #5099 has been fixed in the meantime, this PR adds the examples as regressions. Closes #5099.
2020-12-01Add regressions for #4707. (#5555)Gereon Kremer
The error from #4707 has been fixed in the meantime, this PR adds the example inputs as regressions. Closes #4707.
2020-11-30fix metadata for a test (#5546)yoni206
A COMMAND was used instead of COMMAND-LINE.
2020-11-26Make CAD solver work for empty set of assertions (#5535)Gereon Kremer
When called with no assertions, the CAD solver would still go to work and then segfault when trying to access the first variable. This PR adds an explicit check for this case and adds a regression. Fixes #5534 .
2020-11-25Use symbol manager for printing responses get-model (#5516)Andrew Reynolds
This makes symbol manager be in charge of determining which sorts and terms to print in response to get-model. This eliminates the need for the parser to call ExprManager::mkVar (and similar methods) with custom flags. This requires significant simplifications to the printers for models, where instead of a NodeCommand, we take a Sort or Term to print in the model. This is one of the last remaining steps for migrating the parser to the new API. The next step will be to remove a lot of the internal infrastructure for managing expression names, commands to print in models, node commands, node listeners, etc.
2020-11-19Use new let binding utility in smt2 printer (#5472)Andrew Reynolds
Also fixes some whitespace issues in printing quantified formulas.
2020-11-18Do not expand definitions of extended arithmetic operators (#5433)Andrew Reynolds
This PR makes it so that extended arithmetic operators are not expanded during expand definitions. Instead they are eliminated at theory preprocessing, which occurs as the last step of preprocessing. The motivation for this is three fold: (1) Some quantified LIA benchmarks lead to CVC4 failing to eliminate div functions from quantifier instantiation, this leads to spurious logic failures. A regression is included, which now is correctly solved. (2) We should allow better rewriting and preprocessing for extended arithmetic functions, especially for div/mod which is important for many users of QF_NIA. (3) More generally,Theory::expandDefinitions will be deleted. All functionalities in expandDefinitions should move to Theory::ppRewrite. This changes impacts many benchmarks that involve non-linear and quantifiers: Many benchmarks (as expected) give a warning during check-models since (/ n 0) cannot be evaluated. I've added -q to disable these warnings. Fully addressing this is part of an agenda to improve our support for --check-models. Several fuzzing benchmarks involving NL+quantifiers now time out. However, several can be solved by --sygus-inst, which is now the preferred instantiation strategy for NL+quantifiers. 2 other non-linear regressions time out, which are disabled in this PR. one sygus-inference benchmark (regress1/sygus/issue3498.smt2), now correctly times out (previously it did not timeout since the preprocessor was unable to apply sygus-inference and resorted to normal methods, now sygus-inference can apply but as expected times out). Fixes #5237.
2020-11-18Use symbol manager for get assignment (#5451)Andrew Reynolds
This replaces the previous methods for get-assignment which involving making a DefinedNamedFunctIonCommand and storing the expression names map in the SmtEngine. Note: we now limit :named terms to those not beneath quantifiers and let-bindings.
2020-11-14Fix double conflict in extended string solver (#5435)Andrew Reynolds
Fixes #5384. Previously we were not breaking on conflict in all cases.
2020-11-12Make regular expression difference left associative (#5430)Andrew Reynolds
Fixes #5428.
2020-11-12Models standard (#5415)yoni206
This PR relates to #4987 . Our plan is to: delete the model keyword avoid printing extra declarations by default wrap UF values with as expressions. This PR does step 1, and fixes regressions accordingly.
2020-11-10Fix preregistration in TheorySep before declare-heap (#5411)Andrew Reynolds
Followup to fix for #5343. This catches cases where separation logic constraints are preregistered to TheorySep before the heap has been declared, which should also result in an error.
2020-11-10Add proper support for the declare-heap command for separation logic (#5405)Andrew Reynolds
This adds proper support for the (declare-heap (T U)) command, which declares the type of the heap in separation logic. This command is part of the standard for separation logic. This previous was handled in an ad-hoc way where the type of the heap would be inferred on demand. This was a poor solution and has led to a number of issues related to when the heap is inferred. Fixes #5343, fixes #4926. Work towards CVC4/cvc4-wishues#22.
2020-11-09Simplify handling of subtypes in smt2 printer (#5401)Andrew Reynolds
This makes major simplifications to how subtypes are enforced in the smt2 printer. It is now the principle that the smt2 prints things faithfully to the AST, regardless of whether it conforms to the smt2 standard. It also fixes the current smt2 printing of to_real. Conversely, this removes a hack from GetValueCommand which forced casting via x -> (/ x 1). This is now properly handled in Solver::getValue. Some regressions change expected output as a result. Notice that internally generated Node may not conform to the smt2 standard, but user-level terms will.
2020-10-29Add mkInteger to the API (#5274)mudathirmahgoub
This PR adds mkInteger to the API and update mkReal to ensure that the returned term has real sort. The parsers are modified to parse numbers like "0" "5" as integers and "0.0" and "15.0" as reals. This means subtyping is effectively eliminated from all theories except arithmetic. Other changes: Term::isValue is removed which was introduced to support parsing for constant arrays. It is no longer needed after this PR. Benchmarks are updated to match the changes in the parsers Co-authored-by: Andrew Reynolds andrew-reynolds@uiowa.edu
2020-10-28Fixes for unconstrained variables in nonlinear model (#5351)Andrew Reynolds
This ensures that we explicitly mark x -> 0 as part of the arithmetic model coming from nonlinear for unconstrained variables x that nonlinear extension assumes to be 0. This fixes #5348.
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.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback