summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus
AgeCommit message (Collapse)Author
2021-11-12Remove `ConstantMap<Rational>` (#7635)Andres Noetzli
This is in preparation of having two different kinds (CONST_RATIONAL and CONST_INT) share the same payload. To do so, we cannot rely on ConstantMap<Rational> anymore to map the payload type to a kind. This commit extends support in the mkmetakind script to deal with such payloads by adding a + suffix to the type. The commit also does some minor refactoring of NodeManager::mkConst() and NodeManager::mkConstInternal() to support setting the kind explicitly. Finally, the commit addresses all instances where mkConst<Rational>() is used, including the API.
2021-11-10sets: Rename set.intersection to set.inter. (#7622)Aina Niemetz
This further renames kind SET_INTERSECTION to SET_INTER.
2021-11-09Remove more static option accesses (#7582)Gereon Kremer
This PR removes more than half of the remaining static option accesses options::foo() from the theory solvers.
2021-11-08sets: Rename kinds with a more consistent naming scheme. (#7595)Aina Niemetz
This prefixes sets kinds with SET_ and relation kinds with RELATION_. It also prefixes the corresponding SMT-LIB operators with 'set.' and relation operators with 'rel.'.
2021-11-05Remove many static calls to rewrite (#7580)Andrew Reynolds
This is the result of a global replace Rewriter::rewrite( -> rewrite( + patching the results. It makes several classes into EnvObj. Many calls to Rewriter::rewrite remain (that are embedded in classes that should not be EnvObj).
2021-11-05Eliminate `Warning` macro in favor of `EnvObj::warning` (#7575)Gereon Kremer
This PR eliminates almost all usages of the Warning macro, replacing it mostly by calling EnvObj::warning.
2021-11-04Add -o sygus-grammar to print auto-generated SyGuS grammars (#7573)Andrew Reynolds
Fixes #5341.
2021-11-04Improve defaults for sygus default grammars (#7553)Andrew Reynolds
We now add constants from the conjecture to default grammars by default. We also ensure that integer constants are used as real constants when applicable.
2021-11-04Start refactoring of `-o` and `-v` (#7449)Gereon Kremer
This PR does the first step in consolidating our various output mechanisms. The goal is to have only three major ways to output information: - verbose(level) prints log-like information to the user via stderr, -v and -q increase and decrease the verbosity, respectively. - output(tag) prints structured information (as s-expressions) to the user via stdout, -o enables individual tags. - Trace(tag) prints log-like information to the developer via stdout, -t enables individual tags. While Debug and Trace (and eventually Dump) will be combined within Trace, all of Warning, Message, Notice and Chat will be combined into verbose.
2021-11-03Refactor skolem construction (#7561)Andrew Reynolds
This makes all methods for constructing skolems local to SkolemManager. It removes infrastructure for node manager listeners being notified when skolems are constructed. This was used for 2 things: (1) The old dumping infrastructure, where skolems could contribute in part to traces to print benchmarks. This code will be deleted soon. (2) The miplib preprocessing pass, which used this functionality to listen to what skolems were constructed, and subsequently assumed these skolems coincided with what Boolean variables appeared in assertions. This is highly error prone, and has been replaced by a simple traversal to collect Boolean variables in assertions. This is in preparation for a lazy lambda lifting technique, which will require more infrastructure in SkolemManager.
2021-11-01Replace more static options accesses (#7531)Gereon Kremer
This replaces a bunch of static accesses to options (`options::foo()`) by using the `EnvObj::options()` method.
2021-10-25Add new method for enumerating unsat queries with SyGuS (#7459)Andrew Reynolds
This adds a new option for --sygus-query-gen=unsat to generate unsat queries (previously, only satisfiable queries were supported). The algorithm can be seen as a variant of abduction where we conjoin predicates that both (1) refine the current model and (2) avoid repeated unsat cores. It does some minor refactoring of ExprMinerManager to support the new module.
2021-10-21Split utilites from CEGIS core connective module (#7441)Andrew Reynolds
Towards a new module for enumerating unsat queries via SyGuS.
2021-10-20Make SyGuS solver robust to non-closed enumerable sorts (#7417)Andrew Reynolds
This makes the SyGuS solver robust to variables that are not closed enumerable, e.g. arrays of uninterpreted sorts. It corrects an issue in array's mkGroundTerm issue which would allow constants to enter into constraints for SyGuS problems with arrays. This method does not cause further issues currently since quantifiers is guarded in several places to ensure array constants are not constructed via this method. It also makes it so that we don't add explicit CEGIS refinement lemmas unless evaluation unfolding is enabled and the counterexamples are from closed enumerable types; there is no reason to add these unless we are combining with evaluation unfolding. This addresses several of the issues raised in #6605.
2021-10-12Simplify refinement in sygus solver (#7343)Andrew Reynolds
This tightens the interface of the sygus solver, which was a product of not using subsolver calls in the original design.
2021-10-12Simplify skolemization in sygus solver (#7331)Andrew Reynolds
The core sygus solver predates the use of subsolvers. When doing verification checks in the CEGIS loop, we previously added unique lemmas to the main solver with fresh skolem variables. We now call subsolvers only, meaning that the set of skolem variables used in verification calls can be fixed.
2021-10-09Remove static accesses to options where EnvObj is used (#7330)Gereon Kremer
This PR removes a bunch of static accesses in places where EnvObj is used now, and we can thus use options().
2021-10-04Eliminating static calls to rewriter in quantifiers (#7301)Andrew Reynolds
2021-09-30Rename SmtEngine to SolverEngine. (#7282)Aina Niemetz
2021-09-29Properly restrict PBE symmetry breaking for abduction queries (#7269)Andrew Reynolds
This ensures we infer when a conjecture is PBE based on the conjecture plus the side condition for abduction. This fixes issues where the sygus solver was over-pruning solutions for abduction queries. It also changes the names of internal symbols used for abduction/interpolation queries. These names are used when the experimental sygus-stream is used. These symbols are changed (from "A") to avoid confusion with user symbols.
2021-09-23Eliminate Output macro in favor of simple Env functions (#7223)Gereon Kremer
This PR eliminates the Output macro together with the associated output stream (stored in a static variable). It is replaces by a set of simple utility functions of the Env class, and we instead use the output stream from options.base.out. To achieve this, a couple of quantifier classes are now derived from EnvObj.
2021-09-22Towards standard usage of evaluator (#7189)Andrew Reynolds
This makes the evaluator accessible via EnvObj through the Rewriter. It furthermore removes Rewriter::rewrite from inside the evaluator itself. Construction of Evaluator utilities is now discouraged. The include dependencies were cleaned slightly in this PR, leading to more precise includes throughout. This is work towards having a configurable cardinality for strings, as well as eliminating SmtEngineScope.
2021-09-15Eliminate global access to options:: from quantifiers rewriter (#7192)Andrew Reynolds
2021-09-13Remove context getters from `TheoryState` (#7174)Andres Noetzli
This removes TheoryState::getSatContext() and TheoryState::getUserContext().
2021-09-09Remove `TheoryState::getEnv()` (#7163)Andres Noetzli
2021-09-09Disable shared selectors for quantified logics without SyGuS (#7156)Andrew Reynolds
The use of shared selectors may have fairly negative effects when combined with E-matching. The issue is that it allows too many things to match. When shared selectors are disabled, a selector trigger like s(x) will only match terms that access the field of the constructor associated with s. When we use shared selectors, s(x) is converted to e.g. shared_selector_D_Int_1(x), which in turn matches applications of selectors of the same type over any constructor. This PR disables shared selectors when quantifiers are present and SyGuS is not used. It also disables shared selectors in single invocation subcalls, thus fixes #3109. It further makes a minor fix to the datatypes rewriter to ensure that rewritten form does not depend on options.
2021-09-09Remove `TheoryState::options()` (#7148)Andres Noetzli
This commit removes TheoryState::options() by changing more classes to EnvObjs.
2021-09-08Remove deprecated SyGuS method evaluateWithUnfolding (#7155)Andrew Reynolds
This was a predecessor to the evaluator and TermDbSygus::rewriteNode that is no longer necessary. This refactors the code so that evaluateWithUnfolding is replaced by rewriteNode as necessary throughout the SyGuS solver. Note that in a few places, the extended rewriter was being used where TermDbSygus::rewriteNode (which also evaluates recursive function definitions) should have been used.
2021-09-08Towards standard usage of ExtendedRewriter (#7145)Andrew Reynolds
This PR: Adds extendedRewrite to EnvObj and Rewriter. Eliminates static calls to Rewriter::rewrite from within the extended rewriter. Instead, the use of extended rewriter is always through Rewriter, which passes itself to the ExtendedRewriter. Make most uses of extended rewriter non-static. I've added a placeholder method Rewriter::callExtendedRewrite for places in the code that call the extended rewriter are currently difficult to eliminate.
2021-09-07sygus: Eliminate calls to Rewriter::rewrite. (#7142)Aina Niemetz
This derives sygus unification utility objects from EnvObj where necessary. There's one remaining occurrence of Rewriter::rewrite in sygus_unif_rl.cpp, which is a bit tricky to address and thus subject to a future PR.
2021-09-03EnvObj: Add options(), context(), userContext(). (#7137)Aina Niemetz
This further renames EnvObj::getLogicInfo to EnvObj::logicInfo.
2021-09-03sygus: Make more classes derive from EnvObj. (#7140)Aina Niemetz
2021-09-03Make quantifier module classes derive from EnvObj (#7132)Andrew Reynolds
2021-09-03sygus: Make CeSingleInv derive from EnvObj. (#7136)Aina Niemetz
This further reorders the header according to the code style guidelines.
2021-08-27Expand definitions in sygus operators at the SMT level (#7077)Andrew Reynolds
Eliminates another call to currentSmtEngine. This PR ensures we remember the mapping between operators that are embedded in sygus datatypes during preprocessing, instead of computing this within the sygus datatypes utilities when solving.
2021-08-26Eliminate currentSmtEngine for subsolver calls (#7068)Andrew Reynolds
This eliminates another occurrence of smt::currentSmtEngine by making it required to pass options + logic for all subsolver calls.
2021-08-26Consolidate language types (#7065)Gereon Kremer
This PR combines the two enums InputLanguage and OutputLanguage into a single Language type. It makes sure that AST is not used as input language using a predicate whenever the option is set.
2021-08-25Eliminate calls to currentSmtEngine (#7060)Andrew Reynolds
Work towards supporting multiple solvers running in parallel. There are now only 5 remaining internal calls to smt::currentSmtEngine. More will be eliminated on future PRs.
2021-08-24Refactor enumerator management in synth conjecture (#6942)Andrew Reynolds
This moves the method SynthConjecture::getEnumeratedValue to its own class, EnumManager. It also integrates the sygus enumerator callback into the fast enumerator.
2021-08-23Fix non-deterministism in quantified datatypes expansion rewrite (#7036)Andrew Reynolds
Required for properly checking proofs for quantifiers rewrites.
2021-08-20More refactoring of set defaults (#7043)Andrew Reynolds
A few minor changes to which options are enabled for sygus, otherwise no intended changes.
2021-08-04Add inference ids for remainder of sygus solver (#6977)Andrew Reynolds
Now, all inferences throughout cvc5 in our regression are properly marked with an InferenceId. This PR includes minor simplifications to the interface for sygus modules. In particular it changes the behavior to send inferences via the inference manager instead of passing them around as a vector.
2021-08-04Add missing inference identifiers (#6962)Andrew Reynolds
The only remaining unknown inferences covered by our regressions are from the sygus solver, will address in later PR.
2021-07-27Move enum value generator to own file (#6941)Andrew Reynolds
Work towards integrating the enumerator callback into the fast enumerator.
2021-07-27Make all dependencies in the fast enumerator optional (#6918)Andrew Reynolds
This allows one to use a fast enumerator without having access to sygus term database, statistics, etc.
2021-07-27Add sygus enumerator callback (#6923)Andrew Reynolds
This class will make the uses of the fast enumerator customizable.
2021-07-14Move synthesis verification check to own file (#6882)Andrew Reynolds
In preparation for more extensions to this aspect of the synthesis solver.
2021-07-03Add output tags -o, --output. (#6826)Mathias Preiner
Output tags are similar to debug/trace tags, but are always enabled (except for muzzled builds) to provide useful information for users. Available output tags can be queried via -o help/--output help and are specified in the base options module via enum values. Co-authored-by: Gereon Kremer <nafur42@gmail.com>
2021-07-01Add recursive function definitions to subsolver in sygus (#6824)Andrew Reynolds
This passes recursive function definitions to the verification subsolver in sygus, with a default bounded limit of 3. This required improving the interface for setting up subsolvers by allowing custom options; the sygus solver statically computes an instance of the options that it uses in all calls. This allows us to solve non-PBE sygus problems with recursive function definitions. The PR adds an example.
2021-06-28Rename internal string kinds to match API (#6797)Andrew Reynolds
This commit replaces (old) internal string kind names to match the API / smt2 standard names.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback