summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-06-09[Optimization] support for push/pop (#6706)Ouyancheng
Use CDList for optimization objectives so that optimization solver supports push and pop (just use SmtEngine's push/pop). SmtEngine::resetAssertions will also clears the optimization objectives, so no need to have the reset objectives function.
2021-06-09Removing spurious HO checks (#6707)Haniel Barbosa
2021-06-09docs: Fix `Kind` description (#6712)Andres Noetzli
This commit changes the Kind description not to include C/C++ preprocessor statements and updates the kind of bit-vector addtion. It also marks some of the information as internal to exclude it from the public documentation.
2021-06-08Fix for 2 dimensional dependent bounded quantifiers (#6710)Andrew Reynolds
This updates 2-dim dependent bounded quantifiers to not map constants to terms when computing ranges, when the type of the variable is closed enumerable. This is require to fix an incorrect model (possible solution unsoundness) issue in the reduction of str.indexof_re. Fixes the 1st, 4th and 5th benchmarks from #6653. Fixes #6635.
2021-06-08Add learned literal manager utility (#6709)Andrew Reynolds
This is a simple class to maintain a list of literals that we have learned that may be useful during preprocessing. This is work towards a "learned rewrite" preprocessing pass / better support for Int/BV translations during preprocessing.
2021-06-08Fix statistics option handler (#6703)Gereon Kremer
This PR fixes a typo in the option handler for the statistics options, which lead to options not properly propagating.
2021-06-08Make env hold a pointer to the original options to properly initialize ↵Gereon Kremer
subsolvers (#6705) This PR extends the Env class to hold a pointer to the original options that are owned by the api::Solver. These original options will be used to properly initialize subsolvers as using the current options leads to subtle issues as setDefaults is not (in general) idempotent.
2021-06-08Remove `binary_name` option (#6693)Gereon Kremer
The binary_name is solely used as a temporary storage to pass the data from the options parser back to the runCvc5 method where it is put in a static variable. This PR gets rid of the option and the public option getter in favor of directly storing the program name in the static variable using an additional argument to parseOptions().
2021-06-08Change output of getRealValue to a fraction. (#6692)Alex Ozdemir
Our documentation for `toPythonObj` says that real values are represented as Fractions. However, getRealValue yields a float approximation thereof. We should probably stick to Fractions, since they allow us to precisely capture values in LRA. Also, that's more aligned with the C++ API, which returns a string representation of the (unapproximated) Rational. Also, document some (potential) weirdness with calling mkReal on floating-point values.
2021-06-08Make TheoryUF compatible with central equality engine (#6695)Andrew Reynolds
Work towards central equality engine. This does some minor reorganization to TheoryUF, related to UF+cardinality constraints that makes it compatible with central equality engine. In particular, preNotifyFact is removed in favor of adding conflicts after cardinality constraints are added to the equality engine. This ensures that the central equality engine can explain conflicts that involve cardinality constraints (which will no longer be the responsibility of UF when --ee-mode=central).
2021-06-07Fix str.update reduction (#6696)Andrew Reynolds
Fixes the 2nd benchmark from #6653.
2021-06-07(proof-new) Fix missing connection in trust substitution proofs (#6685)Andrew Reynolds
This PR fixes a missing connection in trust substitution proofs, which was the cause of open proofs when solved equalities from ppAssert were not justified by proofs. Also distinguishes TRUST_SUBS_EQ from TRUST_SUBS_MAP for clarity.
2021-06-07Remove `Options::wasSetByUser()` (#6682)Gereon Kremer
This PR removes the next heavily specialized template function Options::wasSetByUser() in favor of direct access to the *WasSetByUser flags.
2021-06-07(proof-new) Lazy proof chain debug names (#6680)Andrew Reynolds
2021-06-06Support public option modules (#6691)Gereon Kremer
This PR adds the possibility to make option modules public. As shown on the example of the main driver options, this allows to get rid of the wrappers from options_public.h. We plan to make only very few option modules public (i.e. main and parser).
2021-06-05Remove unwanted side effects in `SPLIT_EQ_STRIP_L` (#6689)Andres Noetzli
Fixes #6681. When checking whether SPLIT_EQ_STRIP_L applies, we were using sripSymbolicLength, which changes its inputs depending on how many elements of the concatenation it could strip. However, one of the arguments, pfxv0, was reused across multiple checks if the strip did not result in a rewrite. Later invocations were wrong as a result. This commit changes the call to stripSymbolicLength() to use a new copy of the vector instead.
2021-06-04Miscellaneous changes from central ee branch (#6687)Andrew Reynolds
Minor reorganization to make calls to theory engine from combination engine / shared solver more organized.
2021-06-04pow2: header file for pow2 solver (#6676)yoni206
This PR adds a header file for the pow2 solver. It also includes an empty test file, to trigger compilation of the header file. The next PR will include implementations and tests.
2021-06-04bv: Enable bitblast solver by default. (#6660)Mathias Preiner
This commit enables the new bitblast solver by default. This commit also fixes model generation for Boolean variables when --bitblast=eager is enabled. Fixes #3958, #5396, #5736, #5743, #5947.
2021-06-04Add missing dereference (#6684)Gereon Kremer
2021-06-04Fix handling of start index in `str.indexof_re` (#6674)Andres Noetzli
Fixes #6636, fixes #6637. When the start index was non-zero, the result of str.indexof_re was not properly restricted to be greater or equal to the start index. This commit fixes the issue by making the eager reduction lemma more precise. Additionally, the commit fixes an issue with the lower bound of the length of the match in str.indexof_re.
2021-06-04Some cleanup in `mkoptions.py` (#6667)Gereon Kremer
This PR does some general cleanup in the mkoptions.py script: removal of obsolete code and some fixes to the comments.
2021-06-03Adding unit tests for the datatypes python API (#6658)yoni206
This commit adds unit tests that are translated from `datatype_api_black.cpp`. One API function is also added to the python API. This is the last part of the python api unit tests for datatypes. Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
2021-06-03Simplify automatic set-logic in smt2 parser (#6678)Andrew Reynolds
This simplifies the smt2 parser so that automatically setting the logic is done directly instead of being buffered as a command. This prevents spurious errors for features that require (A) checking the logic is set and (B) fully intialize the underlying SMT engine. `declare-pool` is an example of an smt2 command where the user will get an error (instead of a warning) when set-logic is not used due to setting the logic, after fully initing SMT engine and then executing the buffered set-logic command. Note this should also make dump=raw-benchmark more accurate (no set-logic is included when dumping benchmarks with no set-logic command).
2021-06-02Remove references to `bv-div-zero-const` in docs (#6672)Andres Noetzli
The bv-div-zero-const option has been removed and is now always enabled, so this commit updates the documentation of the kinds to reflect that. It also makes the language to describe the special cases a bit more uniform.
2021-06-02Fixes for printing define-fun-rec (#6673)Andrew Reynolds
2021-06-02Remove option to ignore negative memberships (#6665)Andres Noetzli
Fixes #6661. The option `--strings-inm` could be used to ignore negative membership constraints. However, this option made the string solver model-unsound or produced incorrect models if the user provided a benchmark that actually contained negative membership constraints. The solver did not check for negative membership constraints and did not warn the user about them. Because the option is not really being used, this commit removes it.
2021-06-02Adding getters to the python API and testing them (#6652)yoni206
This PR adds missing API functions from the cpp Term API to the python API. Corresponding tests are translated from term_black.cpp.
2021-06-02Remove redundant logic ALL_SUPPORTED. (#6664)Aina Niemetz
2021-06-02Use proper variable name (#6670)Gereon Kremer
This PR fixes the driver which used an incorrect variable name in competition mode.
2021-06-02Fix unsat core proofs (#6655)Andrew Reynolds
Fixes cases of satisfiable unsat cores when proofs are enabled. Unfortunately, this bug was also preventing us from doing the final scope check for all proof checking. As this was not being tested, this PR uncovers that proof checking is now failing on 6 regressions. I'm disabling proof checking here and will address these issues on later PRs.
2021-06-02Make `STRINGS_CTN_DECOMPOSE` an explicit conflict (#6663)Andres Noetzli
Fixes #6643. The STRINGS_CTN_DECOMPOSE inference is always a conflict but we sometimes sent it as an inference. To make sure that the inference manager actually recognizes the inference as a conflict, this commit ensures that the conclusion is always false and modifies the explanation accordingly.
2021-06-02Remove `Options::operator[]` (#6649)Gereon Kremer
This PR removes the next heavily specialized template function Options::operator[] in favor of direct access to the option data.
2021-06-02Move public wrapper functions out of options class (#6600)Gereon Kremer
This PR moves options wrapper functions out of the Options class. These wrapper functions are meant to be called by "external" code that should not access the options modules. This PR thereby significantly reduces the interface of the Options class.
2021-06-02Fix issues with double negation in circuit propagator (#6669)Gereon Kremer
This PR fixes a subtle issue with double negations when producing proofs in the circuit propagator. Adds the test case as a new regression, as well as some similar instances. Fixes cvc5/cvc5-projects#277.
2021-06-02Fix issues when poly is disabled (#6668)Gereon Kremer
Recent changes introduced issues when libpoly is disabled.
2021-06-02Make `Options::assign()` specializations free functions (#6648)Gereon Kremer
This PR removes the next two heavily specialized template functions. Both Options::assign() and Options::assignBool() are only used within options.cpp now and there is thus no reason to keep them in the public interface. Furthermore, we can just make them properly named functions instead of template functions.
2021-06-01Some additions to the datatypes python API (#6640)yoni206
This commit makes the following additions, in order to sync the python API with the cpp API. 1. adding `getName` functions to datatypes related classes 2. allowing `mkDatatypeSorts` with 1 or 2 arguments (previously allowed only 2). 3. In case there is a second argument to `mkDatatypeSorts`, we make sure it is a set. 4. Corresponding changes to the tests.
2021-06-01Use top-level substitutions in ITE simp (#6651)Andrew Reynolds
With this PR, we use the central top-level substitutions instance in the ITE simplification preprocessing pass. Previously the ITE simplification pass maintained its own copy of the substitutions. Since the top-level substitutions now are the authority on models, this led to model failures after this change: ac8cf53#diff-30677c5a1752b1d0e83ef25fd2cfb8949576ea42cf7821fe0ac00ebbd0122f8aL276. This PR corrects the issue. This is required for SMT-COMP.
2021-06-01FP value support in python API (#6644)yoni206
This PR adds new is* functions from the cpp API to the python API. In particular, it adds getFloatingPointValue() function from the cpp API. A test (translated from term_black.cpp) is added. getFloatingPointValue() returns a tuple, and so this requires importing an instance of tuples into cython.
2021-05-31Remove Options::ref() (#6647)Gereon Kremer
This PR gets rid of the templated Options::ref() method (and all its specializations for every option).
2021-05-31Update `toPythonObj` to use new getters -- part 1 (#6623)yoni206
Following #6496 , this PR adds new getters to the python API, as well as tests for them. This makes toPythonObj simpler. A future PR will add more getters to the python API. Co-authored-by: Gereon Kremer nafur42@gmail.com
2021-05-31Compute model values for nested sequences in order (#6631)Andres Noetzli
Fixes #6337 (the other benchmarks in this issue are either solved correctly or time out after the changes in #6615) and fixes #5665. While computing the model for a nested equivalence class containing seq.unit, we were looking up the representative of the argument in (seq.unit (seq.unit j)) and the representative was simpliy (seq.unit j). However, we had assigned (seq.unit 0) to (seq.unit j) earlier. A second equivalence class of type (Seq (Seq Int)) and length 1 was later assigned (seq.unit (seq.unit 0)) and we didn't detect that (seq.unit (seq.unit j)) and (seq.unit (seq.unit 0)) have the same value. This was incorrect because we do not allow assigning the same value to different equivalence classes. In this case, it led to one of the assertions being false. This commit fixes the issues in two ways: it ensures that types are processed in ascending order of nesting (e.g., (Seq Int) terms are processed before (Seq (Seq Int)) terms) and it changes the procedure to look up the representative in the model instead of the theory state to take into account the model values assigned to the elements of sequences. cc @yoni206
2021-05-29Remove `Options::set()` method (#6556)Gereon Kremer
This PR gets rid of the Options::set() method, replacing it by direct access to the options data. This method was only used internally and did nothing except for resolving the options data from the option tag type via template specializations (via ref()), which is no longer necessary.
2021-05-28(Optimization) remove popObjective, add resetObjectives, rename ↵Ouyancheng
pushObjective => addObjective (#6634) In order for OptimizationSolver to support pushing & popping, we could remove popObjective because it might be difficult to handle cases like: optSlv->pushObjective(...); optSlv->push(); optSlv->popObjective(); optSlv->pop(); In this case we need to add back the popped objective... If push/pop is supported, pop does not bring back objectives if you resetObjective but it will revert the objs you add. just like assertFormula and resetAssertions.
2021-05-28Python API: bugfix + translating tests from cpp unit tests (#6559)yoni206
This PR fixes an issue in the python API for datatypes, and also introduces tests translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/datatype_api_black.cpp The next PR will translate more tests and will also introduce missing functions in the python API for datatypes.
2021-05-28Add non-templated method to set option defaults (#6540)Gereon Kremer
This PR replaces the templated Options::setDefault() methods by new non-templated free functions options::{module}::setDefault{option}(). These methods should be used instead of the common if (!set by user) { set option value } pattern.
2021-05-27`STRINGS_CTN_DECOMPOSE`: Avoid multiple conflicts (#6632)Andres Noetzli
Fixes #5508. `STRINGS_CTN_DECOMPOSE` could be triggered multiple times by the same term, which resulted in an assertion failure. This commit returns immediately after the first conflict to avoid the assertion failure.
2021-05-27Fix regular expression aggressive elim (#6627)Andrew Reynolds
Fixes #6620, fixes #6622. Fixes cvc5/cvc5-projects#254. The benchmarks from the 2 issues timeout, a regression is added for the projects issue.
2021-05-27Fix `str.replace_re` and `str.replace_re_all` (#6615)Andres Noetzli
Fixes #6057. The reductions of `str.replace_re` and `str.replace_re_all` were not correctly enforcing that the operations replace the _first_ occurrence of some regular expression in a string. This commit fixes the issue by introducing a new operator `str.indexof_re(s, r, n)`, which, analoguously to `str.indexof`, returns the index of the first match of the regular expression `r` in `s`. The commit adds basic rewrites for evaluating the operator as well as its reduction. Additionally, it converts the reductions of `str.replace_re` and `str.replace_re_all` to use that new operator. This simplifies the reductions of the two operators and ensures that the semantics are consistent between the two.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback