summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-09-29remove stuff (#7258)Gereon Kremer
This PR removes the BUILD_LIB_ONLY cmake option, and the associated --lib-only configure script option. If you only want the library, just run make cvc5 instead of make.
2021-09-29Add Sort.java to the java API (#6382)mudathirmahgoub
This adds Sort.java SortTest.java and cvc5_Sort.cpp to the java api.
2021-09-24Eliminate calls to Rewriter::rewrite from strings entailment checks (#7203)Andrew Reynolds
There are a few further circular references that prevent us from not passing Rewriter to the strings TheoryRewriter constructor, this can be cleaned in future PRs.
2021-09-23Implement alpha equivalence proofs (#7066)Andrew Reynolds
This is a modified version of #6137 which accounts for extended rewriting between quantified formulas that are considered alpha equivalent. It also generalizes the proof rule ALPHA_EQUIV. Notice that if we were to make this rule more pedantic, we would check for variable shadowing during substitution, although this is not currently done.
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-09-22Towards standard usage of evaluator (#7189)Andrew Reynolds
This makes the evaluator accessible via EnvObj through the Rewriter. It furthermore removes Rewriter::rewrite from inside the evaluator itself. Construction of Evaluator utilities is now discouraged. The include dependencies were cleaned slightly in this PR, leading to more precise includes throughout. This is work towards having a configurable cardinality for strings, as well as eliminating SmtEngineScope.
2021-09-22Fix solver_black unit test (#7233)Ouyancheng
In file `test/unit/api/solver_black.cpp` line 1499, `for (const std::pair<Term, Term>& t : dmap)` is not the correct way of iterating through the element pairs, it should be `for (const std::pair<const Term, Term>& t : dmap)` as the keys are immutable. This triggers a warning on LLVM clang 12.0.1 (not AppleClang) on macOS.
2021-09-22Minimal fixing version for tuple update parsing (#7228)Andrew Reynolds
This takes the essential changes from #7218 so that the current ANTLR issues are avoided.
2021-09-20Fix handling of conversions between FP and reals (#7149)Andres Noetzli
Fixes #7056. Currently, we introduce a UF for conversions between FP numbers and reals. This is done as part of `ppRewrite()`. The problem is that terms sent to `ppRewrite()` are not fully preprocessed yet and the FP theory solver was storing terms that were not fully preprocessed in a map for later lookup. For the issue at hand, the conversion term contained an `ite`, which was later removed. As a result, the theory solver did not consider the term to be relevant when refining abstractions. This commit changes the handling of conversion functions to instead adding purification lemmas for conversion terms when they are registered. The purification lemmas are needed, because otherwise, we can't retrieve the model values for the term without the rewriter interferring.
2021-09-17Use a single `NodeManager` per thread (#7204)Andres Noetzli
This changes cvc5 to use a single `NodeManager` per thread (using `thread_local`). We have decided that this is more convenient because nodes between solvers in the same thread could be exchanged and that there isn't really an advantage of having multiple `NodeManager`s per thread. One wrinkle of this change is that `NodeManager::init()` must be called explicitly before the `NodeManager` can be used. This code can currently not be moved to the constructor of `NodeManager` because the code indirectly calls `NodeManager::currentNM()`, which leads to a loop because the `NodeManager` is created in `NodeManager::currentNM()`. Further refactoring is required to get rid of this restriction.
2021-09-14Add get-difficulty to the API (#7194)Andrew Reynolds
Adds smt2 parsing, printing and API support for get-difficulty. Adds unit tests.
2021-09-14Make `-o raw-benchmark` work with `--parse-only` (#7195)Andres Noetzli
Before, cvc5 was returning with --parse-only before the code could reach the code responsible for dumping the raw benchmark. This moves the check for --parse-only to the appropriate place and updates the run_regression.py script to use --parse-only.
2021-09-14Support sygus version 2.1 command assume (#7081)Andrew Reynolds
Adds support for global assumptions in sygus files. Also guards against cases of declare-const, which should be prohibited in sygus.
2021-09-14proofs: Properly track pre- and post-rewrites in bbAtom(). (#7147)Mathias Preiner
This commit refactors the proof bit-blaster to properly track the pre- and post-rewrites in bbAtom(). The individual bit-blast steps are recorded in a term conversion proof generator. The overall bit-blast proof is stored in a BitblastProofGenerator, which tracks the pre- and post-rewrite and includes the bit-blast proof of the TCPG.
2021-09-14Reimplement `--dump=raw-benchmark` as `-o raw-benchmark` (#7191)Andrew Reynolds
Printing the original benchmark is simple, as it is exactly the commands we execute. This removes the previous code from SmtEngine, which is currently broken.
2021-09-13Add Solver::isOutputOn() (#7187)Gereon Kremer
This PR adds a new api::Solver::isOutputOn() method, including unit tests for both isOutputOn() and getOutput().
2021-09-11Use StatisticsRegistry from Env (#7166)Gereon Kremer
This commit better integrates the StatisticsRegistry with the environment. It makes the registry an `EnvObj` itself and adds a getter to `EnvObj` to get the registry. It also refactors parts of cvc5 to use this new mechanism to obtain the registry instead of using the (global, static) `smtStatisticsRegistry()` function.
2021-09-11bv: Move IsPowerOfTwo rule to preprocessing pass and use EnvObj. (#7179)Mathias Preiner
IsPowerOfTwo rule is specific to the BvIntroPow2 preprocessing pass and should not be a general bit-vector rewrite rule.
2021-09-10FP: Do not send trivial lemmas. (#7167)Aina Niemetz
Fixes #7002.
2021-09-10Add Op.java to the java API (#6387)mudathirmahgoub
This commit adds Op.java OpTest.java and cvc5_Op.cpp to the java api.
2021-09-10Use C++17 attributes (#7154)Andres Noetzli
Currently, we are using non-standard attributes. With C++17, all the attributes that we use regularly are now standardized. This commit replaces the compiler-specific attributes with standard ones.
2021-09-09pp passes: Use EnvObj::rewrite() instead of Rewriter::rewrite(). (#7164)Aina Niemetz
2021-09-09Disable shared selectors for quantified logics without SyGuS (#7156)Andrew Reynolds
The use of shared selectors may have fairly negative effects when combined with E-matching. The issue is that it allows too many things to match. When shared selectors are disabled, a selector trigger like s(x) will only match terms that access the field of the constructor associated with s. When we use shared selectors, s(x) is converted to e.g. shared_selector_D_Int_1(x), which in turn matches applications of selectors of the same type over any constructor. This PR disables shared selectors when quantifiers are present and SyGuS is not used. It also disables shared selectors in single invocation subcalls, thus fixes #3109. It further makes a minor fix to the datatypes rewriter to ensure that rewritten form does not depend on options.
2021-09-08A couple of minor cleanups (#7141)Gereon Kremer
This PR does a couple of minor cleanups related to options.
2021-09-08Towards standard usage of ExtendedRewriter (#7145)Andrew Reynolds
This PR: Adds extendedRewrite to EnvObj and Rewriter. Eliminates static calls to Rewriter::rewrite from within the extended rewriter. Instead, the use of extended rewriter is always through Rewriter, which passes itself to the ExtendedRewriter. Make most uses of extended rewriter non-static. I've added a placeholder method Rewriter::callExtendedRewrite for places in the code that call the extended rewriter are currently difficult to eliminate.
2021-09-08Add Datatype.java to the Java API (#6389)mudathirmahgoub
This commit adds Datatype.java DatatypeTest.java and cvc5_Datatype.cpp to the java api.
2021-09-07Refactoring and fixes of set defaults for quantifiers (#7120)Andrew Reynolds
This PR further refactors set defaults for incompatibility issues related to quantifiers. It adds a new restriction that was discovered recently: --nl-rlv should not be used in quantified logics. Some regressions are modified that are impacted by this restriction. Also does minor rearrangements to the order in which default options are set.
2021-09-02[Unit Tests] Fix shell test for Editline (#7117)Andres Noetzli
When using --editline, our interactive_shell_black unit test was not working because the unit test was redirecting std::cin and std::cout to std::stringstreams, which does not work with Editline. This commit refactors our InteractiveShell class to explicitly take the input and output streams as arguments, which fixes the issue because we do not use Editline for input streams that are not std::cin. Additionally, the commit updates the unit test to use SMT-LIB syntax instead of the deprecated CVC language.
2021-09-02Disable sygus-inst for regression close to time limit. (#7122)Aina Niemetz
2021-09-02Add API check whether option in getOptionInfo() exists (#7093)Gereon Kremer
This PR adds a missing check in the API for getOptionInfo().
2021-09-02Driver & Options cleanup (#7109)Gereon Kremer
This PR does some cleanup in the driver and the options. It removes the now obsolete public attribute that allowed using the options in the driver, and removes a bunch of includes from the driver that are no longer necessary.
2021-09-02Implement lazy proof checking modes (#7106)Andrew Reynolds
This implements several variants of lazy proof checking in the core proof checker. Note this extends the ProofNode class with an additional Boolean d_provenChecked indicating whether the d_proven field was checked by the underlying proof checker. This PR updates the default proof checking mode to lazy. The previous default can now be enabled by --proof-check=eager-simple.
2021-09-02[Unit Tests] Fix bags rewrite test (#7114)Andres Noetzli
PR #7103 did not quite fix the unit test: The types of the lambda and the expected bags were still off. This fixes the unit test.
2021-09-02pp: Derive PreprocessingPass from EnvObj. (#7112)Aina Niemetz
2021-09-02Enable sygus-inst for FP, NIA and NRA. (#7098)Aina Niemetz
2021-09-01[proof] [sat] Fix lost reference to reason when processing redundant ↵Haniel Barbosa
literals (#7108) Similarly to the issue when explaining literals, it's necassary to save the reference to the reason for propagating a redundant literal, as adding explanations that may be added to the SAT solver during the recursive elimination of redundant literals may change the original reference.
2021-09-01Print response to get-model using the API (#7084)Andrew Reynolds
This changes our implementation of GetModelCommand so that we use the API to print the model. It simplifies smt::Model so that this is a pretty printing utility, and not a layer on top of TheoryModel. It adds getModel as an API method for returning the string representation of the model, analogous to our current support for getProof. This eliminates the last call to getSmtEngine() from the command layer.
2021-09-01Fixed TestTheoryWhiteBagsRewriter.map failure (#7103)mudathirmahgoub
Fixed TestTheoryWhiteBagsRewriter.map failure
2021-09-01Fix issues with cyclic proofs due to double SYMM applications (#7083)Andrew Reynolds
Our way of constructing proofs from the equality engine in very rare cases may cause cyclic proofs due to constructing double applications of SYMM, which are not recognized as assumptions in CDProof. This is due to an interplay between LazyProofChain using an underlying CDProof as its default proof generator, where the proof chain would use the proofs from the CDProof to form a cyclic proof. This was encountered in 9 SMT-LIB benchmarks in QF_SLIA. This makes us safer in several places related to double SYMM steps.
2021-08-31Make sure modes are sorted in ModeInfo (#7097)Gereon Kremer
This PR ensures that the possible modes returned in getOptionInfo() are always sorted. Their order would depend on the python dictionary ordering, which changed with a somewhat recent python version and thereby breaks our tests.
2021-08-31bv-to-int-module: implementations and stubs for translating operators (#7086)yoni206
This PR introduces most of the code for the translation of terms with operators. Some methods are left as stubs for future PRs. A unit test is added with sanity checks for all implemented operators.
2021-08-30Add API function to obtain information about a single option (#6980)Gereon Kremer
This PR adds api::Solver::getOptionInfo() that returns information about a single option, including its name, aliases, current and default value and its domain.
2021-08-30Add kind BAG_MAP and its type rule to bags (#6503)mudathirmahgoub
This PR adds kind BAG_MAP to bags.
2021-08-30Fix proof equality engine for "no-explain" premises (#7079)Andrew Reynolds
There was an inconsistency between when the equality engine would explain a literal and when we would provide a proof for it. This led to rare cases where we over zealously provided a proof for a fact that should have been an assumption in the theory lemma proof. This corrects the issue by ensuring that no-explain premises are explicitly marked via a new helper proof generator "AssumptionProofGenerator" which always supplies (ASSUME f) as the proof for f. This corrects some proof checking errors on string benchmarks.
2021-08-30Fix quantifiers dynamic split module for parametric datatypes (#7085)Andrew Reynolds
Fixes #6838.
2021-08-27Handle languages as strings in driver (#7074)Gereon Kremer
This PR moves the first chunk of code in the driver to use the proper options API for the language options. It is now handled as a string.
2021-08-27Add missing methods to Solver API for models (#7052)Andrew Reynolds
This adds the last two remaining API methods required for implementing the text output of get-model on the API side. A followup PR will implement GetModelCommand on the API side and eliminate the (last remaining) call to getSmtEngine() from the command layer. This PR does some minor reorganization of the model cores code to account for the new interface. It also removes a deprecated interface from TheoryModel.
2021-08-27Add `isNull` to cpp api tests, python api, and python api tests (#7059)yoni206
While working on API documentation for python, I noticed that isNull is not wrapped by the python API. It is also not tested in the cpp API tests. This PR fixes both issues, and also updates the python api tests accordingly.
2021-08-26Improve integration of nonlinear arithmetic into the arithmetic theory. (#6956)Gereon Kremer
The nonlinear extension used to be called only during model construction, a rather atypical place which lead to a series of subtle issues. This PR moves it into the postCheck method. To do that, a few other changes are necessary, most notably collectAssertedTerms and collectTerms are moved back from the model manager into the theory class.
2021-08-26int2bv: Fix conversion of signed bit-vector values. (#7061)Mathias Preiner
This commit fixes the conversion of signed bit-vector values to integers in the int-to-bv preprocessing pass.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback