summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2018-11-05Increasing coverage (#2683)yoni206
This PR adds/revises tests in order to increase coverage in some preprocessing passes and in proofs done with --fewer-preprocessing-holes flag.
2018-11-05API: Fix assignment operators (#2680)Andres Noetzli
The assignment operators of `Term`, `OpTerm`, and `Sort` currently have an issue. The operators dereference their `shared_ptr` member and assign the corresponding member of the other object. This is problematic because if we have for example two `Term`s pointing to the same `Expr`, then the assignment changes both `Term`s even though we only assign to one, which is not what we want (see the unit test in this commit for a concrete example of the desired behavior). To fix the issue, the assignment operator should just copy the pointer of the other object. This happens to be the behavior of the default assignment operator, so this commit simply removes the overloaded assignment operators. Testing: I did `make check` with an ASAN build and no errors other than the one fixed in #2607 were reported.
2018-11-05Allow partial models with optimized sygus enumeration (#2682)Andrew Reynolds
2018-11-01fixes to regression docs (#2679)yoni206
2018-10-22Recover from wrong use of get-info :reason-unknown (#2667)Andres Noetzli
Fixes #2584. Currently, we are immediately terminating CVC4 if the user issues a `(get-info :reason-unknown)` command if it didn't succeed a `(check-sat)` call returning `unknown`. This commit changes the behavior to return an `(error ...)` but continue executing afterwards. It turns the `ModalException` thrown in this case into a `RecoverableModalException` and adds a check in `GetInfoCommand::invoke()` to turn it into a `CommandRecoverableFailure`, which solves the issue.
2018-10-20Add substr, contains and equality rewrites (#2665)Andres Noetzli
2018-10-20Disable dumping test for non-dumping builds (#2662)Andres Noetzli
2018-10-19Remove autotools build system. (#2639)Mathias Preiner
2018-10-19Add helper to detect length one string terms (#2654)Andres Noetzli
This commit introduces a helper function to detect string terms that have exactly/at most length one. This is useful for a lot of rewrites because strings of at most length one are guaranteed to not overlap multiple components in a concatenation, which allows for more aggressive rewriting. This commit has been tested with --sygus-rr-synth-check for >1h on the string term grammar.
2018-10-18Add OptionException handling during initialization (#2466)Andres Noetzli
The initial motivation for this commit was that dump with an invalid tag was leading to a segfault. The reason for the segfault was as follows: 1. `api::Solver` creates an `ExprManager`, which is stored in a `unique_ptr` as a class member 2. The `api::Solver` tries to create an SmtEngine instance 3. The `SmtEnginePrivate` constructor subscribes to events in the NodeManager and starts registering option listeners 4. When the `SmtEnginePrivate` gets to registerSetDumpModeListener, it registers and notifies the DumpModeListener which calls Dump::setDumpFromString, which fails with an `OptionException` due to the invalid tag 5. While propagating the exception through `api::Solver`, the `ExprManager` is deleted but the non-existent `SmtEnginePrivate` is still subscribed to its events and there are still option listeners registered. This leads to a segfault because the NodeManager tries to notify the `SmtEnginePrivate` about deleted nodes This commit fixes the issue by catching the `OptionException` in `SmtEnginePrivate`, unsubscribing the `SmtEnginePrivate` from the NodeManager events and deleting its option listener registrations before rethrowing the exception. In addition, it changes the `Options::registerAndNotify()` method to immediately delete a registration if notifying the registration resulted in an ``OptionException`` (otherwise only the `ListenerCollection` knows about the registration and complains about it in its destructor). Finally, the commit adds a simple regression test for invalid dump tags.
2018-10-18cmake: Run regression level 2 for make check. (#2645)Mathias Preiner
2018-10-18Non-implied mode for model cores (#2653)Andrew Reynolds
2018-10-18Non-contributing find replace rewrite (#2652)Andrew Reynolds
2018-10-18Improve reduction for str.to.int (#2636)Andrew Reynolds
2018-10-18Constant length regular expression elimination (#2646)Andrew Reynolds
2018-10-17 Skip sygus-rr-synth-check regressions when ASAN on (#2651)Andres Noetzli
This commit disables three regressions when using an ASAN build. The regressions are all leaking memory when invoking the subsolver (see issue #2649). Debugging the issue will take a while but is not very critical since this feature is currently only used by CVC4 developers but it prevents our nightly builds from going through.
2018-10-17Show if ASAN build in --show-config (#2650)Andres Noetzli
This commit extends `--show-config` to show whether the current build is an ASAN build or not. This is done by moving a detection that was previously done for the unit tests into base/configuration_private.h. In addition to being convenient, this allows us to easily exclude regression tests from ASAN builds.
2018-10-16cmake: Add CxxTest include directory to unit test includes. (#2642)Mathias Preiner
2018-10-15Delay initialization of theory engine (#2621)Andrew Reynolds
This implements solution number 2 for issue #2613.
2018-10-15Add more (str.replace x y z) rewrites (#2628)Andres Noetzli
2018-10-13Fix fp-bool.sy grammar and require symfpu (#2631)Andres Noetzli
2018-10-12Reset input language for ExprMiner subsolver (#2624)Andres Noetzli
2018-10-12 Add rewrites for str.replace in str.contains (#2623)Andres Noetzli
This commit adds two rewrites for `(str.contains (str.replace x y x) z) ---> (str.contains x z)`, either when `z = y` or `(str.len z) <= 1`. Additionally, the commit adds `(str.contains (str.replace x y z) w) ---> true` if `(str.contains x w) --> true` and `(str.contains z w) ---> true`.
2018-10-11Improve reasoning about empty strings in rewriter (#2615)Andres Noetzli
2018-10-11 Fix string ext inference for rewrites that introduce negation (#2618)Andrew Reynolds
2018-10-10Optimize regular expression elimination (#2612)Andrew Reynolds
2018-10-10Add length-based rewrites for (str.substr _ _ _) (#2610)Andres Noetzli
2018-10-09 Support for basic actively-generated enumerators (#2606)Andrew Reynolds
2018-10-08BV instantiator: Factor out util functions. (#2604)Aina Niemetz
Previously, all util functions for the BV instantiator were static functions in theory/quantifiers/cegqi/ceg_bv_instantiator.cpp. For the corresponding unit test, it was therefore required to include this cpp file in order to test these functions. This factors out these functions into a theory/quantifiers/cegqi/ceg_bv_instantiator_utils.(cpp|h). Asan reported errors for the corresponing unit test because of this.
2018-10-08 BV inverter: Factor out util functions. (#2603)Aina Niemetz
Previously, all invertibility condition functions were static functions in theory/quantifiers/bv_inverter.cpp. For the corresponding unit test, it was therefore required to include this cpp file in order to test these functions. This factors out these functions into a theory/quantifiers/bv_inverter_utils.(cpp|h).
2018-10-08Address slow sygus regressions (#2598)Andrew Reynolds
2018-10-05 Fix cache for sygus post-condition inference (#2592)Andrew Reynolds
2018-10-05Update default options for sygus (#2586)Andrew Reynolds
2018-10-04New C++ API: Add checks for Sorts. (#2519)Aina Niemetz
2018-10-04Only use SKIP_RETURN_CODE with CMake 3.9.0+ (#2590)Andres Noetzli
With older versions of CMake, skipped tests are reported as failures, which is undesirable. This commit changes the CMakeLists file to only use the `SKIP_RETURN_CODE` property if a newer version of CMake is used.
2018-10-04Fix end constraint for regexp elimination (#2571)Andrew Reynolds
2018-10-03Fix regress (#2575)Andrew Reynolds
2018-10-03Fix stale op list in sets (#2572)Andrew Reynolds
2018-10-03Eliminate partial operators within lambdas during grammar normalization (#2570)Andrew Reynolds
2018-10-02cmake: Display skipped tests as not run (#2567)Andres Noetzli
Currently, the run_regression.py script just returns 0 when we skip a test due to a feature not supported by the current configuration. Returning 0 marks those tests as passed. To make it more clear which tests were skipped, this commit adds the `SKIP_RETURN_CODE` [0] property to the regression tests and changes the regression script to return 77 for skipped tests. The feature is supported since at least CMake 3.0 [0]. For backwards compatibility with autotools, returning 77 for skipped tests is only active when `--cmake` is passed to the run_regression.py script. [0] https://cmake.org/cmake/help/v3.0/prop_test/SKIP_RETURN_CODE.html
2018-10-02Allow (_ to_fp ...) in strict parsing mode (#2566)Andres Noetzli
When parsing with `--strict-parsing`, we are checking whether the operators that we encounter have been explicitly added to the `d_logicOperators` set in the `Parser` class. We did not do that for the indexed operator `(_ to_fp ...)` (which is represented by the kind `FLOATINGPOINT_TO_FP_GENERIC`). This commit adds the operator.
2018-10-02unit: Fix ASAN detection for GCC. (#2561)Mathias Preiner
2018-10-02cmake: Add examples to build-tests, add warning for disabling static build. ↵Mathias Preiner
(#2562)
2018-10-02Fix "catching polymorphic type by value" warnings (#2556)Andres Noetzli
When using the `TS_ASSERT_THROWS` marco from CxxTest, we have to make sure that we use a reference type for the exception, otherwise the unit test tries to catch the exception by value, resulting in "catching polymorphic type by value" warnings.
2018-10-01cmake: Add build target build-tests to build all test dependencies. (#2558)Mathias Preiner
2018-09-30Add rewrite for solving stoi (#2532)Andrew Reynolds
2018-09-28Rewrites for (= "" _) and (= (str.replace _) _) (#2546)Andres Noetzli
2018-09-28cmake: Only do Java tests when unit testing on (#2551)Andres Noetzli
Right now, we are adding the Java tests even when we are not building unit tests. This commit changes the build system to only add the Java tests when unit tests are enabled. There are two reasons for this change: - building a production version of CVC4 should not require JUnit - it seems more intuitive (to me at least) to disable JUnit tests when unit tests are disabled This change also simplifies building the Java bindings in our homebrew formula.
2018-09-27cmake: Add CxxTest finder module to allow custom paths. (#2542)Mathias Preiner
2018-09-27Fix Taylor overapproximation for large exponentials (#2538)Andrew Reynolds
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback