summaryrefslogtreecommitdiff
path: root/test/regress/regress1/arith
AgeCommit message (Collapse)Author
2021-10-19Fix issue related to sanity checking integer models (#7363)Andrew Reynolds
We now insist that we sanity check integer models in linear logics. Previously, we could trigger an assertion failure in Minisat if a user asked for a model in a state where the linear solver had assigned a real value to an integer variable, as we would be sending a lemma during collectModelValues in a state where we had already terminated with "sat". This also changes an assertion to warning, to allow the regression to pass. Fixes #6774 (This PR fixes a followup issue after the original bad model reported there was fixed by sanity checks). As the assertion failure is downgraded to a warning, fixes #6988, fixes #7252.
2021-09-22Remove CVC language support (#7219)Mathias Preiner
This commit removes the support for the CVC language and converts all *.cvc regression tests to SMT-LIBv2.
2021-06-28Rewrite POW to POW2 when the base is 2 (#6806)yoni206
This PR introduces a rewrite from (^ 2 t) to (pow2 t) in order to make use of the specialized pow2 solver. One regression that expects an error when t is not a constant is changed accordingly.
2021-04-24Improve getValue for non-evaluated operators (#6436)Andrew Reynolds
This makes it so that we attempt evaluation + rewriting on applications of operators that do not always evaluate, and return constants in case the evaluation was successful. This fixes warnings for check-models on 43 of our regressions, and also uncovered one regression where our model was wrong but check-models silently succeeded. I've opened CVC4/cvc4-projects#276 for fixing the latter.
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-02-25Move slow regressions to regress1 (#5999)Andrew Reynolds
Moves regressions taking >4 seconds (summing all configs) in debug to regress1.
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-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-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-11-25Add regressions for closed issues (#5526)Andrew Reynolds
We can close #5520, we can close #5378.
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-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-08-05Improve error message for unsupported exponents (#4852)Gereon Kremer
We have had a few issues where essentially users misinterpreted the error message about which types of exponents are supported for (^ base exp). Given that this is rewritten to a multiplication of length exp, we only support reasonably small natural numbers. This PR improves the error message. Fixes #4692
2020-05-22Refactor operator elimination in arithmetic (#4519)Andrew Reynolds
This is a major refactor of how operators are eliminated in arithmetic. Currently there were (at least) two things wrong: (1) ppRewriteTerm sent lemmas on the output channel. This behavior is incompatible with how preprocessing works. In particular, this caused unconstrained simplification to be unaware of terms from such lemmas, leading to incorrect "sat" answers. (2) Lemmas used to eliminate certain "div-like" terms were processed in a context-independent way. However, lemmas should be cached in a user-context-dependent way. This was leading to incorrect "sat" answers in incremental. The solution to these issues is to eliminate operators via the construction of witness terms. No lemmas are sent out, and instead these lemmas are the consequence of term formula removal in the standard way. As a result of the refactor, 2 quantifiers regressions time out due to infinite branch and bound issues (one only during --check-unsat-cores). These appear to be random and I've changed the options to avoid these issues. 3 others now have check-model warnings, which I've added --quiet to. Improving check-model will be addressed on a future PR. This PR is not required for SMT COMP since we have workarounds that avoid both the incorrect behaviors in our scripts. Also notice that --rewrite-divk is effectively now enabled by default always. Fixes #4484, fixes #4486, fixes #4481.
2020-04-22Convert V2.5 SMT regressions to V2.6. (#4319)Abdalrhman Mohamed
This commit converts all v2.5 smt2 regressions to v2.6 (except for regress/regress0/lang_opts_2_5.smt2).
2020-03-31Rename checkValid/query to checkEntailed. (#4191)Aina Niemetz
This renames api::Solver::checkValidAssuming to checkEntailed and removes api::Solver::checkValid. Internally, SmtEngine::query is renamed to SmtEngine::checkEntailed, and these changes are further propagated to the Result class.
2020-03-27Fix expected output on arith regression (#4162)Andrew Reynolds
A benchmark went unknown -> sat, likely due to the arith-brab commit, thus leading to a failure on regress1.This updates the status on this benchmark (also adds --nl-ext-tplanes to it).
2020-03-26Added unit-cube-like test for branch and bound (#3922)Amalee
* unit-cude test wip * test for wip unit cube test * fixed simple rounding * wip * Passing tests except for sat vs unknown ones * added flag for cube test * put example back to normal * Fixed for style guidelines. * fixed rewrite bug * removed extra comments * unit-cude test wip * test for wip unit cube test * fixed simple rounding * wip * Passing tests except for sat vs unknown ones * added flag for cube test * put example back to normal * Fixed for style guidelines. * fixed rewrite bug * removed extra comments * Small fixes based on PR feedback * replace NodeManager::currentNM with nm and clang formatted * renamed test * Added a regression test that triggers branch and bound * Added ; COMMAND-LINE: --arith-brab * Updated arith-brab test * arith-brab enabled by default * Added --nl-ext-tplanes to regress0/nl/ext-rew-aggr-test.smt2 Co-authored-by: Amalee Wilson <amalee@cis.uab.edu> Co-authored-by: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com> Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
2020-03-11Do not enable some SMT-COMP specific options by default (#4038)Andrew Reynolds
Moves SMT-COMP-specific options to the SMT-COMP script. Both of these options have led to issues (segfaults or infinite loops). Issue #789 can be downgraded to "minor" after this PR. Btw, I did not add these specialized options to the "incremental" script of SMT-COMP, since I'm assuming they should not be used there.
2020-03-09Fix type issue in arith rewrite equality (#3972)Andrew Reynolds
Fixes #3952 and fixes #3940 and fixes #3941 and fixes #3968.
2018-11-20Fix real2int regression. (#2716)Andrew Reynolds
2018-08-22Fix option for real2int regression. (#2353)Andrew Reynolds
2018-04-30Refactor real2int (#1813)Haniel Barbosa
This commit refactors the real2int preprocessing pass into the new style. This commit is essentially just a code move and adds a regression test for the preprocessing pass.
2018-04-19Refactor pbRewrites preprocessing pass (#1767)Andres Noetzli
This commit refactors the pbRewrites preprocessing pass into the new style. This commit is essentially just a code move and adds a regression test for the preprocessing pass. It also makes use of the AssertionPipeline::replace function to do proper dependency tracking.
2018-03-21Refactor mkoptions (#1631)Mathias Preiner
This commit refactors code generation for options. It uses a new configuration format for defining options (*.toml) and a new Python script mkoptions.py to generate the source code and option documentation. The option behavior did not change for most of the options, except that for bool --enable-/--disable- long options enable/disable was removed. E.g. --enable-miplib-trick and --disable-miplib-trick got changed to --miplib-trick and --no-miplib-trick. This commit fixes also an issues with set-option/get-option via the SMT2 interface. Before long options were only accessible if the name included the =ARG part.
2018-03-21 Move regression tests to single Makefile.am (#1658)Andres Noetzli
Until now, regression tests were split across tens of different Makefile.am, which required a lot of code duplication and does not really seem to be in the spirit of automake. If we want to change the LOG_COMPILER/LOG_DRIVER for example, we have to change every single Makefile.am, which is cumbersome (I was able to get something semi-working by exporting those variables but it didn't seem very clean). Additionally, it made the output of the regression tests fairly verbose and split the output across multiple log files. Finally it also limited parallelism when running the regression tests (this fix lowers the time it takes to run regression level 1 from 3m to 1m45s on my machine with 16 threads). This commit moves all the regression tests into test/regress/Makefile.tests and changes test/regress/Makefile.am to deal with this new structure. Finally, it changes how the test summary in test/Makefile.am is produced: instead of relying on the log files for the subdirectories, it greps for the test results in the log files of the individual tests. Not the most elegant solution but we should probably anyway delegate that task to a Python script at some point.
2018-02-15Refactor regressions (#1581)Andrew Reynolds
2016-10-21Move slow regress0 benchmarks to regress1, increment regress1 through regress3.ajreynol
2013-12-23Proof-checking code; fixups of segfaults and missing functionality in proof ↵Morgan Deters
generation; fix bug 285. * segfaults/assert-fails in proof-generation fixed, including bug 285 * added --check-proofs to automatically check proofs, like --check-models (but only for UF/SAT at present) * proof generation now works in portfolio (but *not* --check-proofs, since LFSC code uses globals) * proofs are *not* yet supported in incremental mode * added --dump-proofs to dump out proofs, like --dump-models * run_regression script now runs with --check-proofs where appropriate * options scripts now support :link-smt for SMT options, like :link for command-line
2013-12-09mv prp to regress1Kshitij Bansal
2013-09-18Support a personal build configuration and make rules.Morgan Deters
2013-02-16Some cleanup and copyright updatingMorgan Deters
* update some copyrights for 2013 * cleaned up some comments/ifdefs, indentation * some spelling corrections * add some missing makefiles
2013-01-28some fixes for win32, including ability to "make check" win32 builds via wineMorgan Deters
2012-08-28fix regression tests for automake 1.11 and automake 1.12---both versions ↵Morgan Deters
should work now
2012-04-05Support to test the "dumper" mechanism in regressions (feeding dump output ↵Morgan Deters
back in) by doing "make regress RUN_REGRESSION_ARGS=--dump"
2012-02-20portfolio mergeMorgan Deters
2012-02-15This commit merges into trunk the branch branches/arithmetic/integers2 from ↵Tim King
r2650 to r2779. - This excludes revision 2777. This revision had some strange performance implications and was delaying the merge. - This includes the new DioSolver. The DioSolver can discover conflicts, produce substitutions, and produce cuts. - The DioSolver can be disabled at command line using --disable-dio-solver. - This includes a number of changes to the arithmetic normal form. - The Integer class features a number of new number theoretic function. - This commit includes a few rather loud warning. I will do my best to take care of them today.
2011-10-29support for proof regressions in other parts of the test treeMorgan Deters
2011-03-26fix typoMorgan Deters
2011-03-25This is a merge from the "theoryfixes+cdattrhash" branch. The changesMorgan Deters
are somewhat disparate but belonged on the same branch because they were held back from trunk all for the same reason (to keep the trunk stable for furious bitvector development). Dejan has now given me the go-ahead for a merge. ========================================= THIS COMMIT CHANGES THE THEORY INTERFACE! ========================================= Theory constructors are expected to take an additional "Valuation*" parameter that each Theory should send along to the base class constructor. The base class Theory keeps the Valuation* in a d_valuation field for use by it and by its derived classes. Theory::getValue() no longer takes a Valuation* (it is expected to use d_valuation instead). This allows other theory functions to take advantage of getValue() for debugging or heuristic purposes. TODO BEFORE MERGE TO TRUNK: ****implement BitIterator find() in CDAttrHash<bool>. Specifically: * Added QF_BV support for SMT-LIB v2. * Two adjustments to the theory interface as requested by Tim King: 1. As described above. 2. Theories now have const access to the fact queue through base class functions facts_begin() and facts_end(); useful for debugging. * Added an "Asserted" attribute so that theories can check if something has been asserted or not (and therefore not propagate it). However, this has been disabled for now, pending more data on the overhead of it, and pending discussion at the 3/25/2011 meeting. * Do not define NDEBUG in MiniSat in assertion-enabled builds (so that MiniSat asserts are evaluated). * As a result of the new MiniSat assertions, some --incremental regressions had to be disabled; also, some bitvectors ?!! * Bug 71 is resolved by adding a specialization for CDAttrHash<> in the attribute package. * Fixes for some warnings flagged by clang. * System tests have arrived! So far mainly infrastructure for having system tests, but there is a system test aimed at improving code coverage of the printer package. * Minor other adjustments to documentation and coding to be more conformant to CVC4 policy. Tests have been performed to demonstrate that these changes have no or negligible effect on performance. In particular, changing the CDAttrHash<> doesn't have any real effect on performance or memory right now, since there is only one context-dependent boolean flag (as soon as another is added, the effect is noticeable but probably still slight).
2010-10-13Added test/regress/regress1/arith and populated it with some fast SMT LIB ↵Tim King
problems.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback