Andrew Reynolds [Wed, 23 Feb 2022 18:46:02 +0000 (12:46 -0600)]
Option exception when incompatible with proofs (#8064)
This changes set defaults so that it doesn't silently disable proofs or unsat cores.
Fixes cvc5/cvc5-projects#440.
Gereon Kremer [Wed, 23 Feb 2022 18:08:22 +0000 (19:08 +0100)]
Fix creation of RAN from non-dyadic rational (#8138)
Libpoly only allows to create real algebraic numbers from dyadic rationals. For non-dyadic rationals, we need to create a polynomials and create it the general way. Libpoly requires all defining polynomials to be primitive, in particular the leading coefficient must be positive. We would always have it negative, which only becomes a problem if libpoly has assertions enabled, though.
Fixes #8126.
Gereon Kremer [Wed, 23 Feb 2022 17:29:18 +0000 (18:29 +0100)]
Fix icp candidate parsing (#8137)
For constraints of the form c * x ~ poly(x) where c != 1 we would sometimes forget to take the inverse of c when parsing the assertion to the internal representation of the ICP solver. This PR fixes this issue, and does a few more changes:
--nl-icp is really not well-tested and disabled by default. We make it an expert option.
we no longer issue the propagation lemmas if we already found a conflict
the nl-icp trace was heavily polluted by output from the interval utils, which are now moved to a new nl-icp-debug trace
Fixes #8135.
Andrew Reynolds [Wed, 23 Feb 2022 16:46:50 +0000 (10:46 -0600)]
Properly sanatize user names in LFSC (#8080)
Previously, we would get LFSC proof checking failures if we were using an identifier that was valid in SMT-LIB but not LFSC.
Co-authored-by: Alex Ozdemir <aozdemir@hmc.edu>
Andres Noetzli [Wed, 23 Feb 2022 16:23:54 +0000 (08:23 -0800)]
[Rewriter] Do not attempt to rewrite constants (#8061)
This commit changes our rewriter policy to not attempt to rewrite nodes
with no children.
Gereon Kremer [Wed, 23 Feb 2022 15:18:07 +0000 (16:18 +0100)]
Fix pruning of covering intervals in proofs (#8084)
We need to mirror the pruning of intervals in the coverings solver in the corresponding proof. To match the proof nodes with the coverings-internal intervals, we use ids, where non-interval nodes have the id zero. In this process, we had three separate issues that never showed up because we don't have a proof checker for CAD proofs:
we did not check for zeros, pruning all non-interval nodes
we ran the pruning on the direct children of a CAD_RECURSIVE proof step, which are SCOPE nodes that don't have ids
iterating over and then removing children was done by a custom but faulty reimplementation of std::remove_if
Thus, we now
never prune zero nodes,
prune based on the (single) child node, if we are checking a SCOPE node, and
simply use std::remove_if.
Gereon Kremer [Wed, 23 Feb 2022 14:57:53 +0000 (15:57 +0100)]
Refactor multiplication in arithmetic rewriter (#7965)
This PR refactors the rewriting of multiplication. Most importantly, we explicitly deal with distributivity of addition and multiplication explicitly using the new utilities.
Andrew Reynolds [Wed, 23 Feb 2022 03:12:06 +0000 (21:12 -0600)]
Fix issue in datatypes care graph computation involving subtyping (#8125)
The datatypes care graph was incorrectly computed for constructors taking `Real` arguments, due to subtyping.
This fixes the term index to cache on the *return* type for constructors, not the argument types. Caching based on argument types was incorrect even for non-parametric datatypes with arguments that have subtyping.
Fixes https://github.com/cvc5/cvc5/issues/8124.
This also does minor cleanup and additions done while debugging the issue.
Andrew Reynolds [Tue, 22 Feb 2022 19:11:45 +0000 (13:11 -0600)]
Support some cases of isConst for regular expressions (#8114)
Fixes https://github.com/cvc5/cvc5/issues/8111.
Having `isConst` return true is required for some rare use cases of regular expressions, e.g. rewrite rule synthesis involving regular expression variables.
Andrew Reynolds [Tue, 22 Feb 2022 18:36:46 +0000 (12:36 -0600)]
Remove refineConflicts option (#8129)
Was introduced in
8a0c056.
Fixes #8119.
Andrew Reynolds [Tue, 22 Feb 2022 18:14:06 +0000 (12:14 -0600)]
Change inference scheme in transcendentals to rewrite rule (#8115)
Avoids introducing new sine terms.
Andrew Reynolds [Tue, 22 Feb 2022 17:46:44 +0000 (11:46 -0600)]
Relax what is generated in the model from NL (#8113)
This makes it so that we don't assign concrete values to equivalence classes with transcendental functions.
It also removes some unused infrastructure.
vinciusb [Tue, 22 Feb 2022 13:51:21 +0000 (10:51 -0300)]
[proofs] [dot] Enable DAG and tree printing with dot files (#8107)
Add a proof option that allows DAG and tree print format when using dot files.
Signed-off-by: VinÃcius Braga Freire vinicius.braga.freire@gmail.com
Andrew Reynolds [Mon, 21 Feb 2022 18:13:54 +0000 (12:13 -0600)]
Fixes and additions for LFSC signatures (#8120)
Fixes a critical issue in the re intersection rule, where a null terminator was missed.
Also adds a sketch of the theory signature for floating points.
Andrew Reynolds [Fri, 18 Feb 2022 23:33:00 +0000 (17:33 -0600)]
Add unit test for fixed issue with get-difficulty (#8060)
Fixed by recent updates to get-difficulty.
Fixes cvc5/cvc5-projects#434.
Andrew Reynolds [Fri, 18 Feb 2022 23:13:14 +0000 (17:13 -0600)]
Throw option exceptions when combining input conversion preprocessing with sygus (#8059)
Fixes cvc5/cvc5-projects#436.
Andrew Reynolds [Fri, 18 Feb 2022 22:10:52 +0000 (16:10 -0600)]
Add well formed term check to solver engine (#8056)
Fixes cvc5/cvc5-projects#413.
Andres Noetzli [Fri, 18 Feb 2022 21:10:25 +0000 (13:10 -0800)]
Improve `STRINGS_ARRAY_UPDATE_BOUND` inference (#8123)
This changes the `STRINGS_ARRAY_UPDATE_BOUND` inference to explicitly
include the disequality between the term before and after the update if
the update has an effect. This is an optimization that prevents us from
splitting on that (dis-)equality later on.
Andrew Reynolds [Fri, 18 Feb 2022 20:50:41 +0000 (14:50 -0600)]
Make spurious assertion into warning (#8051)
Fixes cvc5/cvc5-projects#401.
Andres Noetzli [Fri, 18 Feb 2022 20:18:04 +0000 (12:18 -0800)]
Fix `STRINGS_ARRAY_NTH_UPDATE` inference (#8121)
Our `STRINGS_ARRAY_NTH_UPDATE` inference was missing an explanation that
establishes the relation between the update and the nth term. On the
current set of benchmarks, this does not cause an issue, but there
should be cases where it does. The commit also changes the array core solver
to take better advantage of `d_indexMap`.
Andrew Reynolds [Thu, 17 Feb 2022 21:40:22 +0000 (15:40 -0600)]
Introduce skolem function to make transcendental function purification consistent (#8116)
Previously, we could introduce multiple purifications for the same sin term.
Andrew Reynolds [Thu, 17 Feb 2022 21:11:10 +0000 (15:11 -0600)]
Missing ids for arith conflicts (#8108)
Fixes #8097.
Andrew Reynolds [Thu, 17 Feb 2022 19:45:10 +0000 (13:45 -0600)]
Remove some irrelevant node kinds from the model (#8110)
There are several kinds of nodes that are currently sent to the model that don't need to be. Furthermore, we require not sending some of these due to the new invariants in #8095.
Lachnitt [Thu, 17 Feb 2022 18:08:46 +0000 (10:08 -0800)]
[proofs] [alethe] Introduce all_simplify and replace old trust rules (#8100)
Instead of printing "trust" in the case of a simplification rule that cannot be translated to an Alethe simplify rule print "all_simplify". This also replaces the heuristic in THEORY_REWRITE to determine which simplify rule is needed.
Andrew Reynolds [Thu, 17 Feb 2022 14:36:32 +0000 (08:36 -0600)]
[proofs] Consolidate multiple substitutions to single AND proof in trust substitution map (#8109)
This ensures that a common proof node is used for a substitution instead of copying its children. This optimization had been noted in a comment but had not yet been enabled.
This should speed up proof reconstruction for substitutions.
Andrew Reynolds [Wed, 16 Feb 2022 17:42:57 +0000 (11:42 -0600)]
[proofs] Make cache (optionally) persistent in lazy CD proof (#8104)
Should address severe performance issues in some use cases of proofs.
Andrew Reynolds [Wed, 16 Feb 2022 00:59:33 +0000 (18:59 -0600)]
Only consider relevant terms in the array-inspired sequence solver (#8105)
Avoids segfault in model construction due to asking for the value of irrelevant (non-shared) term.
Abdalrhman Mohamed [Tue, 15 Feb 2022 18:14:13 +0000 (12:14 -0600)]
Support `try` and `all` reconstruction modes. (#8098)
This PR adds a simple procedure to quickly reconstruct Sygus terms that are already in the grammar. This new procedure fails if the terms are not in the grammar.
Andrew Reynolds [Fri, 11 Feb 2022 21:36:55 +0000 (15:36 -0600)]
Ensure proofs are fully disabled when incompatible (#8092)
Was causing regression failures on proof-new when proofs + sygus are enabled. We now force proofs to be disabled.
Andrew Reynolds [Fri, 11 Feb 2022 21:07:33 +0000 (15:07 -0600)]
Fix for lambda-to-array constant conversion for unused arguments (#8082)
Fixes #4434.
Andres Noetzli [Fri, 11 Feb 2022 00:21:06 +0000 (16:21 -0800)]
Fix type check of `seq.nth` (#8093)
The code for type checking `seq.nth` was trying to retrieve the sequence
element type before ensuring that the type of the first argument was a
sequence, which lead to assertion failures. This commit reorders the
checks to avoid this issue.
Andrew Reynolds [Thu, 10 Feb 2022 20:09:03 +0000 (14:09 -0600)]
Add assertion to require inference ids (#8091)
Andrew Reynolds [Thu, 10 Feb 2022 19:43:09 +0000 (13:43 -0600)]
Use witness terms to represent values for large strings in models (#8089)
This makes it so that we don't prematurely fail on some Facebook benchmarks.
Mathias Preiner [Wed, 9 Feb 2022 23:56:59 +0000 (15:56 -0800)]
bv: Add --tlimit-per support for CryptoMiniSat. (#8086)
Mathias Preiner [Wed, 9 Feb 2022 21:50:18 +0000 (13:50 -0800)]
bv: Add --tlimit-per support for CaDiCaL. (#8085)
This commit adds --tlimit-per support for CaDiCaL via CaDiCaL's Terminator class.
Fixes #8049
Andres Noetzli [Wed, 9 Feb 2022 18:42:37 +0000 (10:42 -0800)]
Fix handling of `LogicException` during solving (#8000)
Fixes #7974. This commit fixes our handling of LogicExceptions during solving. Instead of leaving MiniSat in a bad state, it catches the exception, resets the decision trail, prints the error message, and then returns unknown.
Andres Noetzli [Wed, 9 Feb 2022 04:58:23 +0000 (20:58 -0800)]
[Seq] Fix rewrite of `(seq.nth s n)` for large `n` (#8083)
When rewriting (seq.nth s n) where both terms are constants, cvc5 was
blindly converting the n to a uint32_t, which caused issues when n
was greater than the largest value that can be represented by a 32-bit
integer. This commit introduces a corresponding check and does not
perform the rewrite for large n.
Gereon Kremer [Tue, 8 Feb 2022 21:26:21 +0000 (13:26 -0800)]
Add addition utilities for the arithmetic rewriter (#8013)
This PR adds methods to deal with sums in the arithmetic rewriter. Sums are stored as std::map<Node,RealAlgebraicNumber> (see the code for some reasoning), and we implement adding terms to sums, collecting sums into nodes and distributing a multiplication over nested sums.
Andrew Reynolds [Tue, 8 Feb 2022 19:08:08 +0000 (13:08 -0600)]
Simplify formalism of introduced arithmetic skolems (#8073)
This ensures that all skolems introduced by arithmetic have concrete terms as witnesses. This avoids introducing witness terms.
This PR is important for ensuring that the "original form" of terms does not contain introduced free variables. This means that certain features (quantifier elimination, learned literals) are useful to the user. This was requested by Certora.
This also will improve proof reconstruction for extensions of non-linear arithmetic.
It also ensures that we share skolems in some cases, e.g. we use the same skolem for eliminating (div x y) and (mod x y).
Andrew Reynolds [Tue, 8 Feb 2022 16:55:18 +0000 (10:55 -0600)]
Distinguish proof mode from unsat core mode (#8062)
Previously, we were making unsat cores mode the source of our configuration for unsat cores and proofs at the same time.
This led to a lot of unnecessary complication in the logic, and would allow bugs e.g. if produce-difficulty but not produce-unsat-cores was enabled.
Fixes cvc5/cvc5-projects#406.
Andrew Reynolds [Tue, 8 Feb 2022 15:02:38 +0000 (09:02 -0600)]
Fix LFSC node conversion for non-shared selectors (#8078)
Gereon Kremer [Tue, 8 Feb 2022 04:46:18 +0000 (20:46 -0800)]
Print more commonly used murxla commands (#8046)
Given that murxla requires multiple invocations with different arguments for a typical workflow, I found it very helpful to have them recalled whenever I build it.
Andrew Reynolds [Tue, 8 Feb 2022 03:55:07 +0000 (21:55 -0600)]
Always produce assertions (#8041)
There is no reason to disable --produce-assertions, this simplifies the code to assume that assertions are always available, and always warns if the user disables this option.
Andrew Reynolds [Tue, 8 Feb 2022 00:48:12 +0000 (18:48 -0600)]
Make witness form visited ref counted (#8081)
Fixes #8079.
Andrew Reynolds [Mon, 7 Feb 2022 23:44:06 +0000 (17:44 -0600)]
Generalize LFSC concat unify for splitting constants (#8077)
Was causing LFSC proof failures on ~5 SMT-LIB strings benchmarks.
Gereon Kremer [Mon, 7 Feb 2022 21:49:31 +0000 (13:49 -0800)]
Add user documentation for resource limits (#8058)
Though we regularly get questions about how resource limits work, they were entirely undocumented. This PR adds some general explanation to the user docs.
Andrew Reynolds [Mon, 7 Feb 2022 21:14:36 +0000 (15:14 -0600)]
Fix unsoundness in IAND solver (#8053)
Fixes #5461, fixes #8063. The initial lemma schema was assuming arguments were in bounds.
This also modifies the solver so that we throw logic exceptions when encountering iand or transcendentals.
Gereon Kremer [Mon, 7 Feb 2022 20:56:34 +0000 (12:56 -0800)]
Allow non-value model values (#8076)
We previously required model values to be "values", i.e., constants or constant-like stuff like real algebraic numbers or lambdas. This is an inherent problem for, e.g, transcendental models: the simplest model for a transcendental problem may legitimately be 3 * PI or PI + exp(3). This PR removes this restriction, only requiring that values are rewritten.
Gereon Kremer [Mon, 7 Feb 2022 20:22:58 +0000 (12:22 -0800)]
Improve combination of NRA and transcendentals (#8075)
This PR tackles two issues when combining transcendental reasoning with nonlinear arithmetic.
Firstly, the NRAT logic would inadvertently have transcendental reasoning disabled because we only checked for integers. This simply adds an additional check at the end to enforce transcendental reasoning if necessary.
Secondly, we assert that we never add multiple substitutions for the same variable. This weakens the check to allow add the very same substitution multiple times.
Fixes #7984.
Andres Noetzli [Mon, 7 Feb 2022 20:00:49 +0000 (12:00 -0800)]
[BV] Fix response of `RewriteConcat` (#8074)
RewriteConcat was returning REWRITE_DONE, but it could happen that
applying ExtractWhole was removing an extract around another
concat that could then be flattened (see added unit test for an
example). This commit makes the response more conservative and only
returns REWRITE_DONE if the node did not change.
Andrew Reynolds [Mon, 7 Feb 2022 18:17:13 +0000 (12:17 -0600)]
Fix indexof_re reduction (#8065)
Fixes https://github.com/cvc5/cvc5/issues/6654.
Note that this regression now answers unknown with `--ext-rewrite-quant`; the regression without this option is added.
Andrew V. Jones [Mon, 7 Feb 2022 17:10:56 +0000 (17:10 +0000)]
Correct search location for CLN libs (#8070)
On (e.g.,) openSUSE, the default install path (via CMake) for libraries is lib64 and not lib. However, FindCLN.cmake is hard-coded to only search in lib.
This PR corrects FindCLN.cmake such that the build looks in ${CMAKE_INSTALL_LIBDIR} instead.
Signed-off-by: Andrew V. Jones andrewvaughanj@gmail.com
Andres Noetzli [Sun, 6 Feb 2022 08:16:48 +0000 (00:16 -0800)]
[Seq] Check types for split on indices (#8066)
We applied `STRINGS_ARRAY_EQ_SPLIT` to pairs of `seq.nth` terms of
different types. This lead to assertion (in debug) and performance
problems (in production). The commit adds a type check.
Andrew Reynolds [Sat, 5 Feb 2022 00:15:22 +0000 (18:15 -0600)]
Fix another rewrite involving iand (#8054)
Fixes #8052.
Andres Noetzli [Fri, 4 Feb 2022 19:04:07 +0000 (11:04 -0800)]
[Rewriter] Always rewrite again when kind changes (#8007)
Fixes cvc5/cvc5-projects#438. The rewriter
returned REWRITE_DONE prematurely when rewriting operators such as
bvand in certain cases. If only a single term was left after removing
duplicates from a bvand, the kind of the current node would change and
another pre-rewrite could apply, but the rewriter still returned
REWRITE_DONE. After adding an assertion in the rewriter that checks
that REWRITE_DONE implies that no other pre-rewrite applies, it was
discovered that not only the bit-vector rewriter has this issue, but
other rewriters, e.g., the Boolean rewriter, as well. This commit
changes our semantics for REWRITE_DONE to mean that no other rewrite
applies provided that the kind did not change. This makes it easier for
developers to decide when to return REWRITE_DONE, because it only
requires reasoning about rewrites that apply to a single kind.
Andrew Reynolds [Fri, 4 Feb 2022 17:55:27 +0000 (11:55 -0600)]
Standardizing notifications for setting options in set_defaults (#8057)
Aina Niemetz [Fri, 4 Feb 2022 15:01:42 +0000 (07:01 -0800)]
FP: Rename tester kinds. (#8037)
This renames FP tester kinds for consistency:
FLOATINGPOINT_ISINF -> FLOATINGPOINT_IS_INF
FLOATINGPOINT_ISN -> FLOATINGPOINT_IS_NORMAL
FLOATINGPOINT_ISNAN -> FLOATINGPOINT_IS_NAN
FLOATINGPOINT_ISNEG -> FLOATINGPOINT_IS_NEG
FLOATINGPOINT_ISPOS -> FLOATINGPOINT_IS_POS
FLOATINGPOINT_ISZ -> FLOATINGPOINT_IS_ZERO
Gereon Kremer [Fri, 4 Feb 2022 01:19:08 +0000 (17:19 -0800)]
Use Add instead of Plus (#8043)
This fixes the current documentation builds for the pythonic API
Andrew Reynolds [Thu, 3 Feb 2022 23:48:39 +0000 (17:48 -0600)]
Simplify handling of disequalities in strings (#8047)
This simplifies how string disequalities are handled, and fixes a caching bug in our implementation of extensionality.
The simplifications are two-fold:
- We track disequalities via assertions, not via an equality engine callback
- We process disequalities by iterating on the disequality list, not via iterating on pairs of equivalence classes
Extensionality is fixed by not *explaining* disequalities, which leads to being out of sync with the cache (as the disequality could have a different explanation in another SAT context).
This fixes the last known issues with `--seq-array=X`.
Gereon Kremer [Thu, 3 Feb 2022 23:14:38 +0000 (15:14 -0800)]
Improve theory combination over real algebraic models (#8045)
Though we support real algebraic models now for theory combination, cvc5/cvc5-projects#451 uncovered the possibility to assert if an equality was in fact not equal during theory combination and the difference was real algebraic.
This PR fixes this issue by adding the proper check.
Fixes cvc5/cvc5-projects#451.
Andrew Reynolds [Thu, 3 Feb 2022 21:33:56 +0000 (15:33 -0600)]
Eliminate even more static uses of rewrite (#8044)
Andrew Reynolds [Thu, 3 Feb 2022 20:58:20 +0000 (14:58 -0600)]
Test proof granularity theory-rewrite by default (#8038)
Recently we updated proof granularity to be macro by default, but we should test theory-rewrite granularity in our regressions.
Gereon Kremer [Thu, 3 Feb 2022 19:57:41 +0000 (11:57 -0800)]
Replace a some more static options (#8042)
We now have access to the options in a few more places in quantifiers.
Andrew Reynolds [Thu, 3 Feb 2022 19:19:31 +0000 (13:19 -0600)]
Eliminate more static uses of rewrite (#8040)
mudathirmahgoub [Thu, 3 Feb 2022 15:55:16 +0000 (09:55 -0600)]
Add table.product operator (#8020)
Andrew Reynolds [Thu, 3 Feb 2022 14:56:34 +0000 (08:56 -0600)]
Add miscellaneous missing theory definitions for LFSC (#8039)
Gereon Kremer [Thu, 3 Feb 2022 10:15:15 +0000 (02:15 -0800)]
Add node utils for the arithmetic rewriter (#8012)
This PR adds a bunch of small utilities to inspect or create nodes in the arithmetic rewriter.
Andres Noetzli [Thu, 3 Feb 2022 05:58:49 +0000 (21:58 -0800)]
Send all `nth` terms to the core array solver (#7990)
This updates our policy for the sequences array solver to send all
updates to the array core solver.
Aina Niemetz [Thu, 3 Feb 2022 04:25:14 +0000 (20:25 -0800)]
Rename kind PLUS -> ADD. (#8036)
This renames the arithmetic internal and API kind PLUS to ADD for
consistency with our naming scheme for other operators (e.g.,
BITVECTOR_ADD, FLOATINGPOINT_ADD).
Aina Niemetz [Thu, 3 Feb 2022 03:24:43 +0000 (19:24 -0800)]
api: Remove obsolete function declaration in Cython bindings. (#8032)
Aina Niemetz [Thu, 3 Feb 2022 02:18:51 +0000 (18:18 -0800)]
api: Rename kinds MINUS -> SUB and UMINUS -> NEG. (#8034)
This renames the arithmetic kinds MINUS and UMINUS on the
API level for consistency with our naming scheme for other
operators (e.g., BITVECTOR_SUB, FLOATINGPOINT_SUB).
Aina Niemetz [Thu, 3 Feb 2022 00:18:45 +0000 (16:18 -0800)]
api: Add explicit guard for option produce-assertions in blockModelValues(). (#7958)
Fixes cvc5/cvc5-projects#412.
Alex Ozdemir [Wed, 2 Feb 2022 23:45:42 +0000 (15:45 -0800)]
Change name of Python API's package from pycvc5 to cvc5. (#7953)
In the process, I changed a CMake target name from pycvc5 to
cvc5_base_py_api. I could not change the target to cvc5, because that
name is taken.
Andrew Reynolds [Wed, 2 Feb 2022 23:10:55 +0000 (17:10 -0600)]
Fix rewrite for eliminating constant factors of PI from argument to sine (#8031)
Fixes cvc5/cvc5-projects#441.
Fixes cvc5/cvc5-projects#414.
Aina Niemetz [Wed, 2 Feb 2022 22:27:14 +0000 (14:27 -0800)]
Rename kinds MINUS -> SUB and UMINUS -> NEG. (#8035)
This renames the internal arithmetic kinds MINUS and UMINUS for
consistency with our naming scheme for other operators (e.g.,
BITVECTOR_SUB, FLOATINGPOINT_SUB).
Gereon Kremer [Wed, 2 Feb 2022 21:47:15 +0000 (13:47 -0800)]
Use proper filename in -o subs documentation (#8030)
We somehow used the wrong filename in #7944.
Andrew Reynolds [Wed, 2 Feb 2022 21:21:24 +0000 (15:21 -0600)]
Fix invalid rewrite involving iand (#8026)
Fixes #8016.
Aina Niemetz [Wed, 2 Feb 2022 20:59:37 +0000 (12:59 -0800)]
api: Rename mk<Value> functions for FP for consistency. (#8033)
Andrew Reynolds [Wed, 2 Feb 2022 20:24:39 +0000 (14:24 -0600)]
Fix printing of re.loop as an operator in LFSC (#8029)
Andrew Reynolds [Wed, 2 Feb 2022 20:05:03 +0000 (14:05 -0600)]
Make LFSC side condition for concat unify robust to equality with full string (#8028)
Was leading to LFSC proof checking failures.
Andrew Reynolds [Wed, 2 Feb 2022 19:32:48 +0000 (13:32 -0600)]
Add missing null terminators for regexp (#8027)
Led to some LFSC proof checking failures on strings benchmarks.
Gereon Kremer [Wed, 2 Feb 2022 18:51:20 +0000 (10:51 -0800)]
Add additional check to avoid cyclic substitution (#7991)
The substitutions we extract from equalities in the nonlinear solver would sometimes generate cyclic substitutions.
This PR tries harder to avoid such cases.
Fixes cvc5/cvc5-projects#444.
mudathirmahgoub [Wed, 2 Feb 2022 16:59:28 +0000 (10:59 -0600)]
Update datatypes.rst (#8009)
Andrew Reynolds [Wed, 2 Feb 2022 16:37:03 +0000 (10:37 -0600)]
Remove more static calls to rewrite (#8025)
Andrew Reynolds [Wed, 2 Feb 2022 14:46:48 +0000 (08:46 -0600)]
Extend proof step buffer to optionally ensure unique conclusions (#8017)
Fixes cvc5/cvc5-projects#439.
This extended (theory) proof step buffer with options for discarding duplicate conclusions. This option is now used in the strings theory proof construction, which may have duplication of conclusions due to purification. It simplifies some of the logic regarding popStep in this utility which is required due to the new policy.
mudathirmahgoub [Wed, 2 Feb 2022 14:16:26 +0000 (08:16 -0600)]
Fix parser issue with tuple_project operator (#8021)
The current parser accepts the smtlib code below since it ignores all arguments after z.
This PR fixes this issue by sending all arguments to the operator to be checked.
(set-logic ALL)
(declare-fun z () (Tuple Int Int Int Int Int Int))
(declare-fun f () (Tuple Int Int Int))
(assert (= f ((_ tuple_project 0 1 2) z f f f f f f f f 0 0 0 0 0)))
(check-sat)
Andres Noetzli [Tue, 1 Feb 2022 21:58:41 +0000 (13:58 -0800)]
[BV] Fix strategy for `RewriteExtract` (#8011)
`RewriteExtract` was being too eager to return `REWRITE_DONE`. In
particular, it could happen that a term could be rewritten by a series
of `ExtractExtract` and `ExtractConcat` rewrites, but the method would
return `REWRITE_AGAIN` after the first application of `ExtractExtract`.
This commit fixes the method to be more conservative and return
`REWRITE_AGAIN` whenever a rewrite changed the node being rewritten.
Additionally, the commit makes constant folding the last step (to
maximize the chances that it applies) and makes `ExtractExtract` rewrite
multiple nested applications of `extract` with a single application.
Andres Noetzli [Tue, 1 Feb 2022 20:27:56 +0000 (12:27 -0800)]
[BV] Fix order of rewrites for `concat` (#8010)
This commit fixes the order of the rewrites for bit-vector
concatentation such that the rewrite that merges adjacents constants
comes last (the commit also updates the comments to be less confusing).
Before, it could happen that the rewrite step that removes unnecessary
extract operations introduces constants then then would not get merged
before returning REWRITE_DONE.
Gereon Kremer [Tue, 1 Feb 2022 19:16:24 +0000 (11:16 -0800)]
Add new ordering utility (#8008)
This PR provides a clean implementation of the comparators from the normal form utility, also supporting real algebraic numbers. They will be used within the refactored arithmetic rewriter.
Andrew Reynolds [Tue, 1 Feb 2022 18:11:21 +0000 (12:11 -0600)]
Add variant of get-difficulty for full effort lemmas (#8018)
Add variant of get-difficulty for full effort lemmas
Andres Noetzli [Tue, 1 Feb 2022 17:26:16 +0000 (09:26 -0800)]
[Arrays] Fix response for `store` chains (#8015)
When rewriting applying the rule store(store(a,i,v),i,w) ---> store(a,i,w), the arrays rewriter would return REWRITE_DONE. However,
this is incorrect if there are three or more nested stores of that kind
or the rewrite store(a,i,select(a,i)) ---> a applies to the result.
This commit fixes the response to always be REWRITE_AGAIN.
mudathirmahgoub [Tue, 1 Feb 2022 14:58:04 +0000 (08:58 -0600)]
Add bag.filter operator (#8006)
Gereon Kremer [Tue, 1 Feb 2022 02:19:58 +0000 (18:19 -0800)]
Consider RANs in variable ordering (#7964)
The variable ordering in the arithmetic normal form should also consider real algebraic numbers. This PR also adds new comparators (essentially doing the same) in the rewriter that will replace the normal form utility classes.
Gereon Kremer [Mon, 31 Jan 2022 21:49:21 +0000 (13:49 -0800)]
Add utilities for flattening nodes (#7961)
This PR adds new utilities for flattening nodes and checking whether they can be flattened. They replace the custom implementation we used in the arithmetic rewriter.
Andres Noetzli [Mon, 31 Jan 2022 18:19:35 +0000 (10:19 -0800)]
Fix memory leak in quantifier info (#8005)
Fixes #8001. One of the maps in `QuantInfo` was containing
heap-allocated objects that were not being destroyed. This commit
changes the raw pointers to `std::unique_ptr<MatchGen>` to avoid the
memory leak.
Gereon Kremer [Sat, 29 Jan 2022 01:41:44 +0000 (17:41 -0800)]
Rename docs-releases to docs (#7999)
This renames the repository URL where documentation for releases is stored. It now lives at https://cvc5.github.io/docs/
Mathias Preiner [Fri, 28 Jan 2022 20:34:14 +0000 (12:34 -0800)]
Start post-release for 0.0.7
Mathias Preiner [Fri, 28 Jan 2022 20:34:14 +0000 (12:34 -0800)]
Bump version to 0.0.7
Bruno Dutertre [Fri, 28 Jan 2022 20:33:10 +0000 (12:33 -0800)]
Try a bit harder on the EQ_NCTN rewrite rule (#7998)
This makes a small change to the sequence rewriter to work a bit harder
on one of the rewrite rule. This fixes some performance issues we've
observed.
Signed-off-by: Bruno Dutertre <dutebrun@amazon.com>
Gereon Kremer [Fri, 28 Jan 2022 19:57:30 +0000 (11:57 -0800)]
Fix docs upload once again (#7997)
This PR finally sorts out the ambiguity of different commits from PRs, tags and regular branches (fingers crossed).