summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-05-06Merge branch 'master' into updateScriptsupdateScriptsAndres Noetzli
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-04Update run scripts for SMT-COMP 2020Andres 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-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.
2020-04-28update Haniel's affiliation (#4404)Haniel Barbosa
2020-04-28contrib/get-gmp: Rename and update install instructions with a warning. (#4407)Aina Niemetz
2020-04-28Support the SMT-LIB Unicode string standard by default (#4378)Andrew Reynolds
This PR merges --lang=smt2.6.1 and --lang=smt2.6 (default). It makes it so that 2.6 always expects the syntax of the string standard http://smtlib.cs.uiowa.edu/theories-UnicodeStrings.shtml. I've updated the regressions so that the 2.6 benchmarks are now compliant with the standard. Some of the <=2.5 benchmarks I've updated to 2.6. Others I have left for now, in particular the ones that rely on special characters or ad-hoc escape sequences. The old formats will be supported in the release but removed shortly afterwards. This PR is a prerequisite for the release, but not necessarily SMT-COMP (which will use --lang=smt2.6.1 if needed). Notice that we still do not have parsing support for str.replace_re or str.replace_re_all. This is required to be fully compliant.
2020-04-28Update cardinality in strings to unicode standard (#4402)Andrew Reynolds
This updates the default cardinality in strings to match the Unicode standard, 196608. This avoids a check-model failure from 25 benchmarks in SMT-LIB, which were related to a split due to insufficient constants being required during collectModelInfo. This also makes a few places throw an AlwaysAssert(false) that otherwise would lead to incorrect models. These regardless should never throw, but it would be better to have an assertion failure.
2020-04-27Fix sygus unit (#4371)Andrew Reynolds
2020-04-27Fix examples instructions in INSTALL.md. (#4397)Mathias Preiner
2020-04-25 Fix sets cardinality cycle rule (#4392)Andrew Reynolds
Fixes #4391. The sets cardinality cycle rule is analogous to the S-Cycle rule for strings (see Liang et al CAV 2014). This rule is typically never applied but can be applied in rare cases where theory combination does not determine a correct arrangement of equalities over sets terms that is consistent with the arithmetic arrangement of their cardinalities at full effort. Notice the regression from #4391 has non-linear arithmetic, (mod 0 d), which is translated to UF. The cardinality cycle rule had a bug: it assumed that cycles that were encountered were loops e1 = e2 = ... = e1 but in general they can be lassos e1 = ... = e2 = ... = e2. This ensures the Venn region cycle e2 = ... = e2 is the conclusion in this case, instead of unsoundly concluding e1 = ... = e2. Strings does not have a similar issue: https://github.com/CVC4/CVC4/blob/master/src/theory/strings/core_solver.cpp#L488 Here, when a cycle is encountered, it is processed at the point in traversal where the loop is closed. This is not critical for SMT-COMP but should be in the 1.8 release.
2020-04-23Introduce best content heuristic for strings (#4382)Andres Noetzli
* Introduce best content heuristic for strings This commit introduces a "best content heuristic" to perform context-dependent simplifications. The high-level idea is that for each equivalence class for strings, we compute a representation that is a string concatentation of constants and other string terms. For this representation, we try to get as many letters in the string constants as we can (i.e. the best approximation of the content). This "best content" representation is then used by `EXTF_EVAL` to perform simplifications. Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
2020-04-22Strings: Register skolems before sending lemma (#4381)Andres Noetzli
This commit fixes a performance regression introduced by commit 6255c03. The issue seems to be that registering terms manually after sending the lemma on the output channel is too late because the output channel processes the lemma eagerly.
2020-04-22Ensure disequality splits are processed as lemmas (#4380)Andrew Reynolds
Fixes #4379. This was caused by a splitting lemma rewriting to a conjunction, being processed as a fact, and having a pending phase requirement sent out assuming the inference was to be processed as a lemma. This forces 2 of the splits in the core solver to be always processed as lemmas.
2020-04-22Allow eager bitblasting with solve bv as int in QF_NIA (#4373)Andrew Reynolds
This also updates the SMT COMP script to revert to our previous behavior. This is required for SMT COMP. It should be beneficial for satisfiable QF_NIA instances. I will revisit/test this independently.
2020-04-22Convert V2.5 SMT regressions to V2.6. (#4319)Abdalrhman Mohamed
This commit converts all v2.5 smt2 regressions to v2.6 (except for regress/regress0/lang_opts_2_5.smt2).
2020-04-22Reinstantiate support for conjunctions in facts (#4377)Andres Noetzli
Fixes #4376. Commit 6255c0356bd78140a9cf075491c1d4608ac27704 removed support for conjunctions in the conclusion of facts. However, `F_ENDPOINT_EMP` generates a conjunction in the conclusion of the inference if multiple components are inferred to be empty. This commit reinstantiates support for conjunctions in the conclusion of facts.
2020-04-21Update to sygus version 2 (#4372)Andrew Reynolds
2020-04-21Fix for parse options related to binary name (#4368)Andrew Reynolds
Possible fix for the nightlies. In some configurations, a unit test fails when using the function for parsing options via manual argv construction https://github.com/CVC4/CVC4/blob/master/test/unit/expr/expr_public.h#L58 This reverts a behavior change from 3dfb48b. In particular, we always parse and ignore the binary name instead of skipping it outright. This more accurately reflects the original code.
2020-04-20Introduce a public interface for Sygus commands. (#4204)Abdalrhman Mohamed
This commit addresses issue #38 in cvc4-projects by introducing public API for Sygus commands. It also includes two simple examples of how to use the API.
2020-04-20Make option names related to CEGQI consistent (#4316)Andrew Reynolds
This updates option names to be consistent across uses of counterexample-guided quantifier instantiation (ceqgi), which was previously called "counterexample-based quantifier instantiation" (cbqi), and sygus. Notably, the trace "cegqi-engine" is changed to "sygus-engine" by this commit. The changes were done by these commands in the given directories: src/: for f in $(find -name '.'); do sed -i 's/options::cbqi/options::cegqi/g' $f;sed -i 's/cegqi-engine/sygus-engine/g' $f; done;sed -i 's/"cbqi/"cegqi/g' $f; done test/regress/: for f in $(find -name '.'); do sed -i 's/--cbqi/--cegqi/g' $f; done src/: and test/regress/: for f in $(find -name '.'); do sed -i 's/cegqi-si/sygus-si/g' $f; done test/regress/: for f in $(find -name '.'); do sed -i 's/no-cbqi/no-cegqi/g' $f; done test/regress/: for f in $(find -name '.'); do sed -i 's/:cbqi/:cegqi/g' $f; done And a few minor fixes afterwards. This should be merged close to the time of the next stable release.
2020-04-20Refactor inference manager in strings to be amenable to proofs (#4363)Andrew Reynolds
This is a key refactoring towards proofs for strings. This ensures that InferInfo is maintained until just before facts, lemmas and conflicts are processed. This allows us both to: (1) track more accurate stats and debug information, (2) have enough information to ensure that proofs can be constructed at the moment facts, lemmas, and conflicts are processed. Changes in this PR: PendingInfer and InferInfo were merged, CoreInferInfo is now the previous equivalent of InferInfo, extended with core-solver-specific information, which is only used by CoreSolver. sendInference( const InferInfo& info, ... ) is now the central method for sending inferences which is called by the other variants, not the other way around. sendLemma is inlined into sendInference(...) for clarity. doPendingLemmas and doPendingFacts are extended to process the side effects of the inference infos. There is actually a further issue with pending inferences related to eagerly processing the side effect of CoreInferInfo before we know the lemma is sent. I believe this issue does not occur in practice based on our strategy. Further refactoring could tighten this, e.g. virtual void InferInfo::processSideEffect. I will do this in another PR. Further refactoring can address whether asLemma should be a field of InferInfo (it probably should), and whether we should explicitly check for AND in conclusions instead of making it the responsibility of the user of this class.
2020-04-20Add SCOPE proof rule (#4332)Andrew Reynolds
This rule is dual to ASSUME. It is a way of closing free assumptions to conclude an implication. It also changes getId -> getRule.
2020-04-18Disable unsat cores on nec regression (#4330)Andrew Reynolds
Should fix the nightlies.
2020-04-18Track inference id for pending facts in strings (#4331)Andrew Reynolds
This improves our tracking of pending inferences in strings so that we record pending inferences as a triple (id, fact, exp). This will ensure that proof steps can be constructed at the time we decide to process facts. It also inlines the sendInfer method into sendInference for simplicity. This also improves the policy for reference counting facts and their explanations: we add them to d_keep when they are added to the equality engine. Previously, we were adding them when they were registered as pending. This means we would collect facts in this pending set that were added but later abandoned, which is unnecessary.
2020-04-18Improving EqProof printing (#4329)Haniel Barbosa
2020-04-17Add (context-dependent) Proof (#4323)Andrew Reynolds
A (context-dependent) collection of proof steps that are linked to together to form a ProofNode dag. Note that the name "Proof" is currently taken. I am calling this class "CDProof", although it is optionally context dependent.
2020-04-16antlr: Use relative path in ANTLR script. (#4324)Mathias Preiner
This will fix the CI caching issues we sometimes encountered on GH actions.
2020-04-16SyGuS instantiation quantifiers module (#3910)Mathias Preiner
2020-04-16Add ProofNodeManager and ProofChecker (#4317)Andrew Reynolds
Further work on adding core utilities for ProofNode objects, in support of the new proof infrastructure. ProofNodeManager is analogous to NodeManager. It is a trusted way of generating only "well-formed" ProofNode pointers (according to a checker). ProofChecker is analogous to TypeChecker. It is intended to be infrastructure for our internal proof checker. This PR (and 1 more) is required to get to a place where Haniel and I can collaborate on further development for proofs.
2020-04-16Eliminate remaining references to parent TheoryStrings object (#4315)Andrew Reynolds
This PR makes it so that the module dependencies in the theory of strings are acyclic. This is important for further organization towards proofs for strings. The main change in this PR is to ensure that InferenceManager has a pointer to ExtTheory, which is needed for several of its methods. This required changing several solvers into unique_ptr to properly initialize.
2020-04-15Add ProofNode data structure (#4311)Andrew Reynolds
This is the core data structure for proofs in the new proofs infrastructure. PfRule is a global enumeration of ids of proof nodes (analogous to Kind for Nodes).
2020-04-15Move regular expression inclusion test to RegExpEntail (#4310)Andrew Reynolds
In preparation for rephrasing this inference as a rewrite.
2020-04-15Change option names --default-dag-thresh and --default-expr-depth (#4309)Andrew Reynolds
2020-04-15Split TermRegistry object from TheoryStrings (#4312)Andrew Reynolds
This consolidates functionalities from TheoryStrings and InferenceManager related to registering terms, including sending "preregistration lemmas" for them. The main purpose of this PR is to detangle this module from InferenceManager so that these two modules have exactly one call to OutputChannel::lemma each. For the purposes of the theory solvers, TermRegistry contains the official SkolemCache of TheoryStrings, and can be seen as subsuming the previous interface for this class. This PR is needed for further progress on strings proofs, marking as major since this will be a blocker shortly for this project. A few things were cleaned in this PR. One function changed name InferenceManager::registerTerm --> TermRegistry::getRegisterTermLemma. No major behavior changes.
2020-04-15Do not mark string extended functions as eliminated after reduction lemmas ↵Andrew Reynolds
(#4306) The current policy marked extended functions in strings as "reduced" (eliminated) when we generated their reduction lemma. The upside is that the solver can effectively ignore them. The downside is that we cannot do context-dependent simplification on them, and hence we miss out conflicts during the remainder of the check-sat call. This changes the policy so they are not marked as reduced. Instead, reduction lemmas are cached in the standard way while allowing context-dependent simplification.
2020-04-15Fix assertion in enumerative instantiation (#4313)Andrew Reynolds
Fixes regress1.
2020-04-15Convert more cases of strings to words (#4206)Andrew Reynolds
2020-04-15Abort if in conflict in enumerative instantiation (#4298)Andrew Reynolds
In very rare cases, quantifiers engine can be the first to detect a quantifier-free conflict while constructing term indices. When this occurs, instantiation modules can quit immediately. This was not happening in a case of enumerative instantiation. Fixes #4293.
2020-04-15Always flush lemmas from downwards closure in sets (#4297)Andrew Reynolds
Fixes #4283. This also makes a few minor improvements to how lemmas are sent in sets. In particular, lemmas are not sent if we are already in conflict.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback