summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-27Tweak the use of static_assert to support older compilers. (#4536)Martin
C++11 introduces static_assert(bool, string). C++17 introduces static_assert(bool) By adding a message we can support older compilers such as those used by our nightly build system...
2020-05-26Fix an incorrect limit in conversion from real to float (#4418)Martin
This error is a bit inexplicable but very very definitely wrong. A test case from the original bug report is included.
2020-05-26Convert more uses of strings to words (#4527)Andrew Reynolds
2020-05-26Fix mismatched iterators (CID 1493892). (#4531)Mathias Preiner
Issue found by coverity.
2020-05-26(proof-new) Update proof checker. (#4511)Andrew Reynolds
This adds new required features to proof checker and the base class of proof rule checker. This is required as the first dependency towards merging further infrastructure related to proofs.
2020-05-26(proof-new) Updates to strings skolem cache. (#4524)Andrew Reynolds
This PR makes strings skolem cache call the ProofSkolemCache. This is required for proper proof checking, as it makes all skolems be associated with their formal definition, encapsulated by a witness term. It furthermore makes skolem sharing more uniform and aggressive by noting that most string skolems correspond to purification variables (typically for some substr term). A purification variable for a term that rewrites to a constant can be replaced by the constant itself. It also introduces an attribute IndexVarAttribute which is used to ensure reductions involving universal variables are deterministic.
2020-05-25Update to CaDiCaL version 1.2.1. (#4530)Mathias Preiner
2020-05-23[SMT-COMP] Redirect non-answers to /dev/null (#4528)Andres Noetzli
Commit 00badd3a63a2fa568373d5c58553944b579d42bb changed our run script to write output other than `sat`/`unsat` to a file if `$2` is passed to it. However, it looks like StarExec does not pass that parameter to our script despite the documentation claiming that it does [0]. This commit makes our check more defensive by redirecting our unnecessary output to `/dev/null` if `STAREXEC_WALLCLOCK_LIMIT` is set. I've done a quick test run on StarExec and it looks like this does the trick. [0] https://wiki.uiowa.edu/display/stardev/User+Guide#UserGuide-SpecialVariables
2020-05-23remove unused field d_emp_exp in TheorySetsPrivate (#4521)mudathirmahgoub
Remove unused field d_emp_exp in TheorySetsPrivate
2020-05-23Add the sequence datatype (#4153)Andrew Reynolds
This class is the Node-level representation of a sequence. It is analogous to CVC4::String.
2020-05-22Fix mistakes in sygus API comments. (#4520)Abdalrhman Mohamed
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-05-22[SMT-COMP] Use tear-down-incremental for arithmetic (#4518)Andres Noetzli
This commit changes the run-script for the incremental track to use `--tear-down-incremental=1` for all logics that involve arithmetic. The main motivation for this change is avoid issues that we have with the lemmas generated for `mod`/`div` during `ppRewrite` that cause model-soundness issues.
2020-05-22CaDiCaL: Clean up initialization on creation. (#4516)Aina Niemetz
2020-05-22(proof-new) Add rewrite corresponding to regular expression inclusion (#4513)Andrew Reynolds
This introduces a rewrite based on regular expression inclusion (using calls to the RegExpEntail utility function). This allows us to justify the regular expression inclusion inference as a rewrite.
2020-05-22Cryptominisat: Clean up initialization on creation. (#4515)Aina Niemetz
2020-05-22Add support for SAT solver Kissat. (#4514)Aina Niemetz
2020-05-22(proof-new) Proof node to SExpr utility. (#4512)Andrew Reynolds
This is required for dag-ifying ProofNode output.
2020-05-21Update string kind names in new API (#4509)Andrew Reynolds
To match the smt2 Unicode standard. The internal ones are left unchanged for now.
2020-05-21(proof-new) Minor update to strings solver state (#4510)Andrew Reynolds
2020-05-21Disable re-elim by default (#4508)Andrew Reynolds
Disabling re-elim performs better overall in many recent experiments.
2020-05-21Make Grammar reusable. (#4506)Abdalrhman Mohamed
This PR modifies the Grammar implementation to make it reusable (i.e., can be copied or passed multiple times to synthFun/synthInv) with the catch that it becomes read-only after the first use.
2020-05-20Throw logic exception for equality between regular expressions (#4505)Andrew Reynolds
Fixes #4503.
2020-05-20Fix missing check for cardinality one in unconstrained simplifier (#4504)Andrew Reynolds
Fixes #4482.
2020-05-20Normal form equality conflicts and uniqueness check (#4497)Andrew Reynolds
This adds a new inference schema to strings that was discovered by the internal proof checker. It says that we are in conflict when an equality between the normal forms of two terms in the same equivalence class rewrites to false. It also improves the efficiency of processing normal forms by only considering normal forms that are unique up to rewriting.
2020-05-20Add proof skolem cache (#4485)Andrew Reynolds
This adds the general utility for maintaining mappings from Skolems to their witness form via attributes. I am sending this as a PR now since it would be helpful to use this class for fixing some of the recent unconstrained-simp bugs.
2020-05-20Fix parametric datatype instantiation (#4493)Andrew Reynolds
A bug was introduced when adding the Node-level datatype implementation in d803e7f. The code did not probably get the arity of a sort constructor. This adds TypeNode::getSortConstructorArity and uses it during parametric datatype type resolution.
2020-05-20CegqiBv: Clean up after renaming options. (#4487)Aina Niemetz
2020-05-20Use debug-check-model to enable internal debugging in check-model (#4480)Andrew Reynolds
Notice this also updates our regression script to use --debug-check-model, preserving previous behavior. Fixes #4461, fixes #4470, fixes #4471, fixes #4475, fixes #4448, fixes #4466, fixes #4460, fixes #4458, fixes #4455, fixes #4456, fixes #4386, fixes #4385, fixes #4478, fixes #4474.
2020-05-19Add a simple script to convert sygus v1 files to v2. (#4409)Abdalrhman Mohamed
2020-05-19Do not eliminate variables that are equal to unevaluatable terms (#4267)Andrew Reynolds
When we eliminate a variable x -> v during simplification, it may be the case that v contains "unevaluated" operators like forall, choice, etc. Thus, we do not produce correct models for such inputs unless simplification is disabled. This PR ensures we only eliminate variables when v contains only evaluated operators. Additionally, the kinds registered as unevaluated were slightly modified so that when we are in a logic like QF_LIA, there are no registered unevaluated operators, hence the check above is unnecessary. This is to minimize the performance impact of this change. Fixes #4500.
2020-05-19Fix cached free variable identifiers in sygus term database (#4394)Andrew Reynolds
Fixes an issue with over-pruning in SyGuS where using multiple sygus types that map to the same builtin type. Our mapping sygusToBuiltin did not ensure that free variables were unique. Fixes #4383.
2020-05-19Renamed operator CHOICE to WITNESS (#4207)mudathirmahgoub
Renamed operator CHOICE to WITNESS, and removed it from the front end
2020-05-19Use fresh variables when miniscoping (#4296)Andrew Reynolds
Fixes #4288. When applying miniscoping, we previously were reusing variables across quantified formulas in the resulting conjunction. This ensures our miniscoping ensures fresh variables.
2020-05-19Update enum and option names for sygus languages (#4388)Andrew Reynolds
This ensures sygus is interpreted as sygus version 2; sygus1 must be used to specify sygus version 1. Required for the 1.8 release.
2020-05-19Make SolveEq and PlusCombineLikeTerms idempotent (#4438)Andres Noetzli
Fixes #3692 and an assertion failure that came up during the test runs for SMT-COMP. The bit-vector rewrites `SolveEq` and `PlusCombineLikeTerms` were not always idempotent. At a high level, `SolveEq` combines common terms from two sides of an equality and `PlusCombineLikeTerms` combines common terms within an addition. However, in doing so, these rewrites were reordering the operands of the bit-vector addition based on the node ids of the terms that were multiplied with their coefficients. Consider the addition `3 * x * y + 5 * y * z` (the bit-width does not matter). `PlusCombineLikeTerms` would reorder this addition to `5 * y * z + 3 * x * y` if the node id of `y * z` was smaller than the node id of `x * y`. The issue is that node ids are not fixed for a given term: If we have a term `x * y` and that term reaches ref count 0, we may get a different id for that same term if we recreate it later on. When terms reach ref count 0, we don't immediately delete them but add them to our set of zombies to be deleted whenever the list of zombies grows larger than some fixed size. When applying `SolveEq` and `PlusCombineLikeTerms` multiple times (even in direct succession without doing anything else), the node order may change because some of the terms like `x * y` may be zombies while others have been deleted and get new ids, leading to the relative order of node ids changing. I suspect that we could construct a case where we get into an infinite rewrite loop. This commit addresses the issue as follows: It does not perform the rewrites `SolveEq` and `PlusCombineLikeTerms` if none of the operands change. This makes the rewrites idempotent. Note however that we are still not guaranteeing that a term has the same rewritten form throughout an execution because the node ids may change if the term has been freed in the meantime. However, this limitation is consistent with other rewrites such as the reordering of equalities. I am including the minimized test case from our run on SMT-LIB. I am ommittin the test case from #3692 because I couldn't trigger it on master (not surprising since the issue requires very specific circumstances to actually occur). However, I was able to reproduce the issue on the CVC4 version mentioned in the issue and confirmed that this fix worked for that older version.
2020-05-12Do not enable unconstrained simplification if arithmetic is present (#4489)Andrew Reynolds
For now we do not enable unconstrained simplification when arithmetic is present. Post SMT COMP, we should investigate making arithmetic not output lemmas during preprocessing (CVC4/cvc4-wishues#71).
2020-05-06Update run scripts for SMT-COMP 2020 (#4454)Andres Noetzli
This commit adds additional options for the model validation track and makes sure that non-"sat"/"unsat" outputs from the sequential porfolio approaches are written to a file instead of stderr when running on StarExec.
2020-05-05Always introduce fresh variable for unconstrained APPLY_UF (#4472)Andrew Reynolds
Fixes an unsoundness in unconstrained simplification, fixes #4469.
2020-05-05Update copyright year and AUTHORS/THANKS files. (#4468)Aina Niemetz
2020-05-01SMT-COMP 2020: Enable --fp-exp for new FP logics. (#4432)Aina Niemetz
2020-05-01Move slow regression to regress3 (#4430)Andrew Reynolds
2020-04-30Fix regression (#4424)Andrew Reynolds
Fixes regress1.
2020-04-30Remove skolem share involving pre_first_ctn. (#4423)Andrew Reynolds
This fixes a soundness issue in strings caused by an incorrect skolem share. This adds a regression that corresponds to the rewrite that this skolem share was justified by, which is "sat" (the rewrite does not hold). This benchmark in fact was answered "unsat" by CVC4 prior to this PR.
2020-04-30Do not mark congruent terms are reduced (#4419)Andrew Reynolds
This fixes a potential model soundness issue in strings where a justification for why a string term was reduced relied on a circular argument. The issue involved "reduced by congruence" which states that when f(a) = f(b) ^ a = b in the current context, then one of f(a) or f(b) can be ignored. However, it may be the case that a is an extended function whose reduction relies on f(b). If we were to assume that f(b) can be ignored due to f(a), then our reduction of f(a) is circular: the reduction of f(a) in the context where a=b relies on itself. This was causing an incorrect model for QF_S/2020-sygus-qgen/queries/query3214.smt2. The sequence of dependencies was: [1] (str.contains (str.substr x 1 (+ (- 1) (str.len x))) "CA") is congruent to (str.contains (str.substr x (+ 2 (str.indexof x "CA" 1)) (+ (- 2) (str.len x) (* (- 1) (str.indexof x "CA" 1)))) "CA") in the current context since they are equal and their arguments are equal. [2] (str.substr x (+ 2 (str.indexof x "CA" 1)) (+ (- 2) (str.len x) (* (- 1) (str.indexof x "CA" 1)))) reduction relies on the length constraint: (= (str.indexof x "CA" 1) (+ (- 2) (str.len sspre_66))) [3] (str.indexof x "CA" 1) reduction relies on: (not (str.contains (str.substr x 1 (+ (- 1) (str.len x))) "CA")) which was marked congruent above. The benchmark now solves in 5 minutes 30 seconds (sat, with a correct model): andrew@andrew-Latitude-7480:~/misc/strings$ time ajr-cvc4 query3214.smt2 --strings-exp --rewrite-divk --check-models --dump-models sat (model (define-fun x () String "QACOACA") )
2020-04-29SMT-COMP 2020: Fix scripts to use --no-type-checking instead of ↵Aina Niemetz
--no-checking. (#4417)
2020-04-29Avoid circular dependencies for justifying reductions in strings extf eval ↵Andrew Reynolds
(#4415) An incorrect answer of "sat" could be found after 8 seconds on the given benchmark (with --strings-fmf) due to a circular justification for why an extended function was reduced. In particular, we ran checkExtfInference on the same term twice and then marked it as reduced since we had already seen it. This makes the code more conservative. Notice I'm making the code doubly conservative in case there is any chance for duplication again (e.g. if ExtTheory provides duplicate terms).
2020-04-29Fix strings 2.6 regression (#4413)Andrew Reynolds
Fixes nightlies.
2020-04-28Register lower bound for str.to_int (#4408)Andres Noetzli
This commit changes the term registration for str.to_int terms. Before, we were not sending out any lemmas when registering str.to_int terms. Now, we send a simple lemma that asserts that the value is greater or equal to negative one.
2020-04-28Updates to SMT COMP script for 20 minute timeout (#4406)Andrew Reynolds
Changes run script to be consistent for 20 minute timeout. This divides most of the previous time allocation by 2, with a few exceptions (for non-linear). It adds a configuration involving --no-arith-brab to QF_NIA and reallocates some time.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback