summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2020-04-15Do not normalize to representatives for variable equalities in ↵Andrew Reynolds
conflict-based instantiation (#4280) Conflict-based instantiation would sometimes initialize a match x -> getRepresentative(t) when a quantified formula contained x = t. This leads to issues where getRepresentative(t) is an illegal term (say, in combination with CEGQI). This makes it so the representative is accessed when necessary instead of being set as part of the match. Fixes #4275.
2020-04-14Always assign function values in higher order (#4279)Andrew Reynolds
Fixes #4277.
2020-04-14Fix combinations of cegqi and non-standard triggers (#4271)Andrew Reynolds
Counterexample-guided instantiation may produce quantified formulas with INST_CONSTANT nodes, which are also used as patterns for non-standard triggers for E-matching. This fixes a few combinations that were problematic. Fixes #4250, fixes #4254, fixes #4269 and fixes #4281.
2020-04-14Disable preregistration of instantiations for cegqi in incremental (#4251)Andrew Reynolds
Fixes #4243.
2020-04-14Disable macros when higher-order (#4266)Andrew Reynolds
Fixes #4160.
2020-04-14Fix relevant domain computation for nested quantifiers coming from CEGQI (#4235)Andrew Reynolds
Fixes #4228. That benchmark now times out.
2020-04-14Remove a few options (#4295)Andrew Reynolds
These options are not robust and are not used. Fixes #4282 and fixes #4291.
2020-04-14Remove a few spurious assertions (#4294)Andrew Reynolds
Fixes #4290 and fixes #4292.
2020-04-14Remove early type check option (#4234)Andrew Reynolds
Required to decouple options from NodeManager. This option is now always enabled in debug, and disabled in production.
2020-04-14Remove argument extender (#4223)Andrew Reynolds
This was a utility class for dynamically changing argc/argv.
2020-04-14Remove mergePredicates from EqualityEngine interface (#4305)Andrew Reynolds
This function was equivalent to asserting an equality. Removing it for the sake of simplicity.
2020-04-14Fix dump-unsat-cores-full (#4303)Andrew Reynolds
This adds a fix to ensure dump-unsat-cores-full works by modifying the public options function. This options currently does not work since dumpUnsatCores is only set internally now. This fix is only required until options are refactored so that SmtEngine owns the authoritative copy of options.
2020-04-13Fix SyGuS define-fun printing from benchmarks coming from v1 parser (#4256)Andrew Reynolds
A recent change made it so that defined functions would print as the anonymous lambda corresponding to their definition if the SyGuS v1 parser was used. This was caused by comparison with the wrong kind in the new API. Notice that the v2 parser does not have this issue. This also adds a regression to ensure this behavior is maintained by the SyGuS v2 parser.
2020-04-12Fixes for extended rewriter (#4278)Andrew Reynolds
Fixes #4273 and fixes #4274 . This also removes a spurious assertion from the Node::substitute method that the result node is not equal to the domain. This is violated for f(f(x)) { f(x) -> x }.
2020-04-12Move slow nl regression to regress3 (#4276)Andrew Reynolds
Should fix nightlies.
2020-04-11Add skip predicate to node traversal. (#4222)Alex Ozdemir
Sometime you want to skip specific sub-DAGs when traversing a node. For example, you might be doing a transformation with a cache, and want to skip sub-DAGs that you've already processed. This PR would add a skipIf builder method to NodeDfsIterable, which allows the user to provide a predicate according to which nodes will be omitted from the subsequent traversal.
2020-04-10Ensure exported sygus solutions match grammar (#4270)Andrew Reynolds
Previously we were doing rewriting/expand definitions during grammar normalization, which overwrote the original sygus operators. The connection to the original grammar was maintained via the SygusPrintCallback utility, which ensured that a sygus term printed in a way that matched the grammar. We now have several use cases where solutions from SyGuS will be directly exported to the user, including the current use of get-abduct. This means that the terms must match the grammar, and we cannot simply rely on the print callback. This moves the code to normalize sygus operators to datatypes utils, where the conversion between sygus and builtin terms takes place. This allows a version of this function where isExternal = true, which constructs terms matching the original grammar. This PR enables the SyGuS API to have an accurate getSynthSolution method. It also will eliminate the need for SygusPrintCallback altogether, once the v1 parser is deleted.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback