summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-13Option for toggling str.codeijcar2020_crAndres Noetzli
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.
2020-04-10Split the non-linear solver (#4219)Andrew Reynolds
This splits the "non-linear solver" from "NonlinearExtension". The non-linear solver is the module that implements the inference schemas whereas NonlinearExtension is the glue code that manages the solver(s) for non-linear. This also involves moving utilities from the non-linear solver to their own file.
2020-04-10Explain non-emptiness by non-zero length in strings (#4257)Andrew Reynolds
Several kinds of splitting lemmas in the strings solver can sometimes be avoided by observing that str.len(x) != 0 implies that x is non-empty. This generalizes the check for whether x is non-empty is explainable in the current context.
2020-04-10Add a few stats to strings (#4252)Andrew Reynolds
To give an idea of the high-level behavior.
2020-04-09Towards proper use of resource managers (#4233)Andrew Reynolds
Resource manager will be owned by SmtEngine in the future. This passes the resource manager cached by SmtEnginePrivate to the PropEngine created by SmtEngine instead of using the global pointer. It also makes a few preprocessing passes use the resource manager they already have access to and should use.
2020-04-09CI: Add a step to list dependencies. (#4255)Mathias Preiner
2020-04-09Disable slow sygus regression (#4232)Andrew Reynolds
A regress2 SyGuS benchmark is taking 110 seconds in production on my machine. This was likely caused by the recent update v1 -> v2, which impacts the internal representation and hence the search. Disabling for now.
2020-04-08Split ProcessAssertions module from SmtEngine (#4210)Andrew Reynolds
This is a step towards refactoring the SmtEngine. It splits several core components of SmtEnginePrivate to its own independent module, ProcessAssertions which is responsible for applying preprocessing passes , simplification and expand definitions. The main change involved moving these functions from SmtEnginePrivate to this new class. A few other minor changes were done to make this move: A few things changed order within processAssertions to allow SmtEnginePrivate-specific things to happen outside of the main scope of processAssertions. processAssertions had some logic to catch incompatible options and silently disable options. This was moved to setDefaults. A few data members in SmtEngine were moved to ProcessAssertions. Two utilities that were sitting in smt_engine.cpp were moved to their own files. Another refactoring step will be to make ProcessAssertions take only the utilities it needs instead of taking a SmtEngine reference. This requires further detangling of Options.
2020-04-08Added CHOOSE operator for sets (#4211)mudathirmahgoub
This PR enables THEORY_UF by default for sets and adds the operator CHOOSE for sets which returns an element from a given set. The semantics is as follows: If a set A = {x}, then the term (choose A) is equivalent to the term x. If the set is empty, then (choose A) is an arbitrary value. If the set has cardinality > 1, then (choose A) will deterministically return an element in A.
2020-04-08Perform theory widening eagerly (#4044)Andres Noetzli
Fixes #3971 and fixes #3991. In incremental mode, the logic can change from one (check-sat) call to another. In the reported issue, we start with QF_NIA but then switch to QF_UFNIA because there is a div term (which has a UF in its expanded form). Dealing with this issue is challenging in general. As a result, we have decided not to allow theory widening in Theory::expandDefinitions() anymore but instead to do it eagerly in SmtEngine::setDefaults().
2020-04-08Fix dump models and dump proofs (#4230)Andrew Reynolds
A recent commit (45e489e) made it so that dump-models did not automatically enable produce-models in the global options object, but instead the SmtEngine enabled produce-models internally. The code for dump-models and dump-proofs was (perhaps out of paranoia) checking produce-models and produce-proofs. This removes this check, which is the correct thing to do since SmtEngine internally ensures produce-models is set.
2020-04-08Eliminate call to currentNM within NodeManager (#4227)Andrew Reynolds
Eliminates 2 unintentional calls to the global access function.
2020-04-06Cleanup deprecated quantifiers attribute features (#4215)Andrew Reynolds
2020-04-06Disable slow regression (#4221)Andrew Reynolds
Benchmark recently became slow, disable for now.
2020-04-06Enum for all remaining string inferences (#4220)Andrew Reynolds
Merges the Flat Form inferences enum into Inferences. Adds documentation for (most of) these inferences. Removes the old infrastructure for inferences based on a debug string in InferenceManager.
2020-04-06Remove links field in all toml files (#4201)Andrew Reynolds
This includes: All options pertaining to SMTEngine are now handled at the top of setDefaults. smtlibStrict was deleted in favor of a script. statsEveryQuery enables stats by modifying a public option function. This is a slight hack but this code will likely get refactored as well soon. A few other changes: Fix a bug in SMTEngine: defineFunction should finalize options. Call setDefaults before initilizing the TheoryEngine and ProofManager. This is necessary so that the PROOF(...) macro works earlier during initialization. The next step will be to remove the links infrastructure for the options infrastructure. This will enable further detangling of our options dependencies.
2020-04-06Refactor disequality processing in string solver (#4209)Andres Noetzli
This commit refactors disequality processing in the core string solver. It also adds statistics for the inferences and splits in those methods. No semantic changes intended.
2020-04-06New C++ API: Rename Solver::mkTermInternal. (#4217)Aina Niemetz
This is for consistency with the other helper functions.
2020-04-05Add missing stat for lemmas based on inferences (#4214)Andrew Reynolds
2020-04-05Add safe_print() support for Kind enum (#4213)Andres Noetzli
This commit changes the mkkind script to generate a toString() method for the Kind enum. This method can be used by the safe_print() function to print statistics if CVC4 has been terminated before solving a problem. The stats for strings include statistics that rely on printing kinds (e.g. the number of reductions done of each kind).
2020-04-04Type-independent preregistration of empty word (#4205)Andrew Reynolds
Also removes another instance of empty string in TheoryStrings for consistency sake.
2020-04-03New C++ API: Remove Op::getSort(). (#4208)Aina Niemetz
2020-04-03Update theory rewriter ownership, add stats to strings (#4202)Andres Noetzli
This commit adds statistics for string rewrites. This is work towards proof support in the string solver. At a high level, this commit adds a pointer to a `SequenceStatistics` in the rewriters and modifies `SequencesRewriter::returnRewrite()` to count the rewrites done. In practice, to make this work requires a couple of changes, some of them temporary: - We can't have a single `Rewriter` instance shared between different `SmtEngine` instances anymore. Thus the `Rewriter` is now owned by the `SmtEngine` and calling the rewriter retrieves the rewriter associated with the current `SmtEngine`. This is a temporary workaround before we get rid of singletons. - Methods in the `SequencesRewriter` and the `StringsRewriter` are made non-`static` because they need access to the statistics instance. - `StringsEntail` now has non-`static` methods because it needs a reference to the sequences rewriter that it can call. - The interaction between the `StringsRewriter` and the `SequencesRewriter` changed: the `StringsRewriter` is now a proper `TheoryRewriter` that inherits from `SequencesRewriter` and calls its `postRewrite()` before applying its own rewrites (this is essentially a reversal of roles from before: the `SequencesRewriter` used to call `static` methods in the `StringsRewriter`). - The theory rewriters are now owned by the individual theories. This design mirrors the `EqualityEngine`s owned by the individual theories.
2020-04-03Only rewrite lambdas via array representations when constant (#4203)Andrew Reynolds
Fixes #4170.
2020-04-03Split sequences rewriter (#4194)Andrew Reynolds
This is in preparation for making the strings rewriter configurable for stats. This moves all utility functions from SequencesRewriter to a proper place. This includes three new groupings of utility functions: those involving arithmetic entailments, those involving string entailments, those involving regular expression entailments. Here, "entailments" loosely means any question regarding a (set of) terms or formulas. No major code changes. Added some missing documentation and lightly cleaned a few blocks of code in cpp.
2020-04-02Remove undocumented/uncommon aliases (#4177)Andres Noetzli
This commit removes aliases that are either undocumented or associated with uncommon options. Note: The removal of --statistics, --language, and --output-language may be controversial. The options were undocumented previously and I am in favor of simplifying the options as much as possible, however. Please let me know what you think.
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-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
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback