summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-02Merge branch 'master' into rmAliasesrmAliasesAndrew Reynolds
2020-04-02Introduce enums for all string inferences, excluding the core solver (#4195)Andrew Reynolds
Introduce enum values for all calls to sendInference outside of the core solver. This included some minor refactoring.
2020-04-01Initialize theory rewriters in theories (#4197)Andres Noetzli
Until now, the `Rewriter` was responsible for creating `TheoryRewriter` instances. This commit adds a method `mkTheoryRewriter()` that theories override to create an instance of their corresponding theory rewriter. The advantage is that the theories can pass additional information to their theory rewriter (e.g. a statistics object).
2020-03-31Support char smt-lib syntax (#4188)Andrew Reynolds
Towards support for the strings standard. Adds support to (_ char #x ... ) syntax for characters.
2020-03-31Fix install for ANTLR contrib script and CI dependency caching. (#4196)Mathias Preiner
2020-03-31Rename checkValid/query to checkEntailed. (#4191)Aina Niemetz
This renames api::Solver::checkValidAssuming to checkEntailed and removes api::Solver::checkValid. Internally, SmtEngine::query is renamed to SmtEngine::checkEntailed, and these changes are further propagated to the Result class.
2020-03-31Switch to GitHub actions for CI (#4190)Mathias Preiner
Enable CI with GitHub actions, add macOS builds and disable Travis CI.
2020-03-31Fix fmf benchmark (#4193)Andrew Reynolds
Fixes regress1. This benchmark is too delicate in the current state.
2020-03-31Remove replay and use-theory options and idl (#4186)Andrew Reynolds
Towards disentangling Options / NodeManager / SmtEngine. This PR removes options --use-theory=NAME and --replay/--replay-log. Both of these options are highly complex, unused, and lead to complications when implementing the way options and our build system work. The first is motivated by making TheoryEngine use an "alternate" theory, which appears to e.g. make it so that TheoryIdl could entirely replace TheoryArith. I believe this is too heavy handed of a solution: there should a consistent TheoryArith class, and options should be used to enable/disable alternate modules within it. The second attempts to replay low level decisions from the SAT solver. It is documented as not working (in 1.0). I do not believe this is worth salvaging. It also removes the solver in src/theory/idl, which cannot be enabled after this commit.
2020-03-31Fix strange bound regression (#4192)Andrew Reynolds
Several things have happened with this regression lately, in chronological order: (1) Instantiations involving bounded set quantifiers were changed to use choice to represent symbolic instantiations, (2) fmf-bound was decoupled from finite-model-find (the latter is not enabled when the former is), (3) choice was set to be an "unevaluated" kind (in 0060de3). After (1) and (2), for the regression test/regress/regress1/fmf/fmf-strange-bounds.smt2, CVC4 was answering "sat" correctly but internally there was a source of incompleteness. In particular, a choice term was being generated in an instantiation that was later incorrectly evaluated, thus allowing CVC4 to skip an instantiation it shouldn't have. The recent commit of (3) resolved this issue, making it so that choice is not an evaluated kind. This meant the benchmark went "sat" -> "unknown". This PR fixes this issue by enabling --finite-model-find, which is now necessary to answer "sat". It also adds a further test quantifier that was used in debugging this issue. Fixes regress1.
2020-03-31Convert more uses of string-specific functions (#4158)Andrew Reynolds
Towards theory of sequences.
2020-03-31Fixing regressions (#4189)Andrew Reynolds
An option was recently deleted, forgot to disable it from a regression. Fixes a failure in regress1.
2020-03-30Rewrites for all remaining return statements in strings rewriter (#4178)Andrew Reynolds
Towards proofs for string rewrites. All return statements all now associated with an enum value. An indentation in a block of code changed in rewriteMembership.
2020-03-30Support indexed operators re.loop and re.^ (#4167)Andrew Reynolds
Towards support for the strings standard. This modifies our interface so that we accept the SMT-LIB standard versions of re.loop and re.^. This means re.loop no longer accepts 3 arguments but 1 (with 2 indices). This means we no longer accept re.loop with only a lower bound and no upper bound on the number of repetitions. Also fixes #4161.
2020-03-30Remove ref skolem datatype option (#4185)Andrew Reynolds
Fixes #4180, fixes CVC4/cvc4-projects#133, fixes CVC4/cvc4-projects#134.
2020-03-30Add coverage badge. (#4187)Mathias Preiner
Coverage information is updated nightly.
2020-03-30Fix arguments to print callback (#4171)Andrew Reynolds
The method applyParseOp may modify the argument vector. In the case of the sygus V1 parser, this argument vector was then being used to set up a print callback, leading to incorrect printing and failures. Work towards having a working V1 -> V2 conversion for the release. FYI @abdoo8080
2020-03-30Frontend support for the choice operator (#4175)mudathirmahgoub
Added the operator choice to Smt2.g and Cvc.g. Removed the unused parameter hasBoundVars from TheoryModel::getModelValue
2020-03-29fix unit testsAndres Noetzli
2020-03-29Remove undocumented/uncommon aliasesAndres Noetzli
This commit removes aliases that are either undocumented or associated with uncommon options.
2020-03-28Enumeration for String rewrites (#4173)Andrew Reynolds
In preparation for string proof infrastructure. This introduces an enumeration type to track string rewrites. It also makes inference printing more consistent.
2020-03-28Change is-cons to (_ is cons) in Sygus benchmarks. (#4174)Abdalrhman Mohamed
2020-03-28Convert the last few Sygus benchmarks to V2. (#4172)Abdalrhman Mohamed
2020-03-28Stop printing datatype declaration for Sygus V1 grammar. (#4168)Abdalrhman Mohamed
2020-03-27Node traversal iterator (#3845)Alex Ozdemir
Implement an iterator for pre- and post-order traversals. I believe that this will be useful in pre-processing passes, many of which do postorder traversals that they implement by hand. Right now this iterator does not support modification of the traversal pattern, but we could add this later on, if we want it. Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com> Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
2020-03-27Split transcendental solver to its own file (#4156)Andrew Reynolds
* Attempting to split transcendental function solver * Clean * Format * More * Format * Attempt link * Format * Fix * Another refactor * More * More * Rename * Format Co-authored-by: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com> Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2020-03-27Fix issues with unsat cores and reset-assertions (#4159)Andres Noetzli
Fixes #4151. Commit e9f4cec2cad02e270747759223090c16b9d2d44c fixed how `(reset-assertions)` is handled by destroying and recreating the `PropEngine` owned by `SmtEngine`. When unsat cores are enabled, creating a `PropEngine` triggers the creation of a SAT proof and a CNF proof. In the `ProofManager`, we had assertions that checked that those kinds of proofs were only created once, which is not true anymore. This commit removes the assertions, cleans up the memory management in `ProofManager` to use `std::unique_ptr` and makes all the `ProofManager::init*` methods non-static for consistency. The commit also fixes an additional issue that I encountered while testing the fix: When creating the new `PropEngine`, we were not asserting `true` and `(not false)`, which lead to an error if we tried to get the unsat core after a `(reset-assertion)` command and we had asserted `(assert false)`. The commit fixes this by asserting `true` and `(not false)` in the constructor of `PropEngine`. The regression test is an extension of the example in #4151 and covers both issues.
2020-03-27Fix expected output on arith regression (#4162)Andrew Reynolds
A benchmark went unknown -> sat, likely due to the arith-brab commit, thus leading to a failure on regress1.This updates the status on this benchmark (also adds --nl-ext-tplanes to it).
2020-03-27Move string utility file (#4164)Andrew Reynolds
Moves the string file to string.h. This is required since other required utilities will soon need to be added to regexp.h.
2020-03-27Do not require that function sorts are first class internally (#4128)Andrew Reynolds
This PR removes the requirement in the NodeManager that argument types to the function sort are first class. Notice that the new API does this check (as it should): https://github.com/CVC4/CVC4/blob/master/src/api/cvc4cpp.cpp#L2633 Moreover, SyGuS v2 internally requires constructing function types having arguments that are not first class (e.g. regular expression type). This is required to update the regression https://github.com/CVC4/CVC4/blob/master/test/regress/regress1/sygus/re-concat.sy to SyGuS v2. FYI @abdoo8080 .
2020-03-27Support unicode internal representation and escape sequences (#3852)Andrew Reynolds
Work towards support for the strings standard. This updates the string solver and parser such that: The internal representation of strings is vectors of code points, Generation of the previous internal representation of strings has been relegated to the type enumerator. This is the code that ensures that "A" is the first character chosen for values of strings in models, The previous ad-hoc escape sequence handling is moved from the String class to the parser. It will live there for at least one version of CVC4, until we no longer support non-smt-lib complaint escape sequences or non-printable characters in strings, Handle unicode escape sequences according to the SMT-LIB standard in String, Simplify a number of calls to String utility functions, since the conversion between the previous internal format and code points is now unnecessary, Fixed a bug in the handling of TO_CODE: it should be based on the alphabet cardinality, not the number of internal code points.
2020-03-26Move set defaults function to its own file (#4154)Andrew Reynolds
This moves SmtEngine::setDefaults to its own file. This design is not final. One could imagine this being a part of a "OptionsSetter" utility. I am leaving this as is until we refactor the relationship between SmtEngine and Options. Regardless, the general file structure should be such that this method is separate from SmtEngine, since setting default options is a large task that should be addressed independently from the core of SmtEngine. This is initial preparation towards converting the SmtEngine from Expr -> Node. A few very minor changes were made to the code to make the separation possible.
2020-03-26Added unit-cube-like test for branch and bound (#3922)Amalee
* unit-cude test wip * test for wip unit cube test * fixed simple rounding * wip * Passing tests except for sat vs unknown ones * added flag for cube test * put example back to normal * Fixed for style guidelines. * fixed rewrite bug * removed extra comments * unit-cude test wip * test for wip unit cube test * fixed simple rounding * wip * Passing tests except for sat vs unknown ones * added flag for cube test * put example back to normal * Fixed for style guidelines. * fixed rewrite bug * removed extra comments * Small fixes based on PR feedback * replace NodeManager::currentNM with nm and clang formatted * renamed test * Added a regression test that triggers branch and bound * Added ; COMMAND-LINE: --arith-brab * Updated arith-brab test * arith-brab enabled by default * Added --nl-ext-tplanes to regress0/nl/ext-rew-aggr-test.smt2 Co-authored-by: Amalee Wilson <amalee@cis.uab.edu> Co-authored-by: Ahmed Irfan <43099566+ahmed-irfan@users.noreply.github.com> Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
2020-03-26Disable slow regression (#4157)Andrew Reynolds
Should fix timeout in asan build.
2020-03-26Add stats for string reductions, lemmas and conflicts (#4149)Andrew Reynolds
This PR adds comprehensive stats for reductions, lemmas and conflicts in TheoryStrings. Remaining stats will track all inferences (which are finer grained steps that may lead to lemmas/conflicts). Additionally this PR refactors calls to OutputChannel::lemma in TheoryStrings / InferenceManager. There are now only 2 calls to lemma(...) during registerTerm(...), one for "atomic" string terms (corresponding to length splits typically) and one for non-atomic terms.
2020-03-26Generalize more string-specific functions (#4152)Andrew Reynolds
Towards theory of sequences. Note this PR also changes design in core/base solver. Previously I had estimated that we should have separate instances per type for these solvers, but I think it is better to have these classes handle all string-like types simultaneously. This means they should not have a d_type field.
2020-03-25Care graphs based on polymorphic operators in strings (#4150)Andrew Reynolds
Towards theory of sequences. To compute a care graphs, we need to group function applications by the string type they are associated with. This PR introduces a utility to function to get the "owning string type" for a function application, and updates the care graph computation so that it partitions function applications according to this type.
2020-03-25Support async-signal-safe printing of inferences (#4148)Andres Noetzli
Commit c9b7c3d introduced code for counting the number of string inferences done per type of inference. However, it did not add support for printing the inference names in an async-signal-safe manner via safe_print() (note that printing in signal handlers is done differently from the regular stats printing). This commit adds the corresponding code, s.t. we get the inference names when printing the stats when CVC4 is interrupted or crashes.
2020-03-25bv2int : linear mult opt (#4142)Ahmed Irfan
2020-03-25 Generalize more uses of string-specific functions (#4145)Andrew Reynolds
Towards theory of sequences.
2020-03-24Int2BV fail on demand (#4079)yoni206
This PR delays error on unsupported symbols as much as possible, by only throwing the error when actually constructing the node.
2020-03-24Restrict partial triggers to standard quantified formulas (#4144)Andrew Reynolds
Fixes #4143.
2020-03-23Restrict cases of sygus grammar reduction based on argument variants (#4131)Andrew Reynolds
An assertion is triggered for some V2 versions of SyGuS V1 benchmarks during sygus grammar reduction. This PR updates this technique so that it only applies to sygus constructors whose sygus operators are lambdas of the form lambda x1 ... xn. f( x1 ... xn ). FYI @abdoo8080 .
2020-03-23Infer when sygus operators are equivalent to builtin kinds (#4140)Andrew Reynolds
The V2 parser always turns sygus operators into lambdas for consistency. This PR ensures that we nevertheless infer when a sygus operator is equivalent to a builtin operator, e.g. (lambda x y. (+ x y)) is equivalent to +. The main reason this is required is to ensure that solution reconstruction heuristics work optimally when we make the switch SyGuS V1 -> V2 (see 5 failing benchmarks due to --cegqi-si=all on #4136).
2020-03-23Simplify auxiliary variable handling in CEGQI (#4141)Andrew Reynolds
Fixes #3849 and fixes #4062. Overall, the effect of this PR is that CEGQI will generate better instantiations more frequently for quantified formulas that involve the introduction of auxiliary variables. In CEGQI, auxiliary variables introduced in CEX lemmas must be given special treatment (since the instantiations should not involve them, thus they must be solved for as well). Previously, auxiliary variables that are introduced as parts of CEX lemmas were currently assumed to be: (1) Only occurring from ITE removal, e.g. s[(ite C t1 t2]) ---> s[k] ^ ite( C, k = t1, k = t2 ) (2) Always trivially solvable by looking at which literal was asserted (k = t1 or k = t2). Both of these assumption do not hold in general (aux variables can come from other kinds of terms e.g. choice functions, and the user can force options that rewrite arithmetic equalities to inequalities). This makes auxiliary variable handling in CEGQI more robust by treating auxiliary variables as standard variables. Effectively, this means that the entire procedure for determining instantiations is run for auxiliary variables. This PR removes the specific hacks that were used previously that were based on the assumptions above. Additionally, #3849 triggered a second issue: SyGuS solution reconstruction that involves auxiliary variables that are introduced as part of instantiation lemmas should not be considered valid solutions. Previously, only a warning was given.
2020-03-23Throw exception for non-well-founded unimplemented SyGuS types. (#4125)Andrew Reynolds
Fixes #3931. Currently we print a warning for unimplemented types when constructing default SyGuS grammars. We should additionally throw an exception when the unimplemented type would lead to a non-well-founded datatype.
2020-03-23Change transcendental function app slave list to unordered_set (#4139)Andrew Reynolds
Fixes #4112.
2020-03-22Collect statistics about normal form inferences (#4127)Andres Noetzli
This commit adds code to count the number of inferences made of each inference type for normal form inferences. It extends the Inference enum in `infer_info.h` and adds two new `sendInference()` methods in the `InferenceManager` to send and count inferences that have a corresonding entry in the `Inference` enum.
2020-03-22Sort inference does not handle APPLY_UF when higher-order is enabled (#4138)Andrew Reynolds
Fixes #4092 and fixes #4134. Typically, APPLY_UF has special treatment in sort inference. It is significantly more complicated when higher-order logic is enabled. This disables special handling when ufHo() is enabled.
2020-03-21Convert V1 Sygus files to V2. (#4136)Abdalrhman Mohamed
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback