summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers
AgeCommit message (Collapse)Author
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-01Weaken assertion in CEGQI (#7548)Andrew Reynolds
The assertion can be violated in mixed Int/Real arithmetic. The instantiator utility nevertheless safe guards Int vs Real subtyping. Fixes #7537.
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-27Avoid non-terminating check with assumptions in strings rewriter (#7503)Andrew Reynolds
These rewrites introduce the possibility of non-termination in the rewriter, as demonstrated in the included regression. Instead, these rewrites are now moved to the extended rewriter.
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-23Remove spurious assertoin (#7458)Andrew Reynolds
Fixes #7439. That benchmark is now "unknown".
2021-10-22Remove stale pointer to proof node manager from skolemize utility (#7471)Andrew Reynolds
Issue was introduced when cleaning this utility to the new style (to not take explicit pnm).
2021-10-22Remove `--uf-ho` option (#7463)Andrew Reynolds
This option was previously a way of knowing whether higher-order was enabled, which now should be queried via LogicInfo::isHigherOrder. It also adds an optimization to hasFreeVar required for QCF to be robust and not take a performance hit due to HO operators.
2021-10-22Refactor theory inference manager constructor (#7457)Andrew Reynolds
Eliminates a style where proof node manager was passed as an argument to indicate proofs enabled if non-null. All theory inference managers now check Env::isTheoryProofProducing instead. Since BV did not pass a proof node manager to its inference manager, this PR also incidentally enables equality engine proofs for BV.
2021-10-22Make expression mining use configurable options and logic (#7426)Andrew Reynolds
Required for doing options-specific internal fuzzing using SyGuS.
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-20Do not construct instantiation for checking propagating instantiations ↵Andrew Reynolds
spurious (#7390) This makes the check for when an instantiation is "propagating" faster by not constructing the substitution + rewriting of the entire formula, and instead threading the substitution through the entailment check utility's evaluateTerm utility. On a handful of challenge Facebook benchmarks, we go 35 seconds -> 18 seconds with this change. This also eliminates the argument exp to the evaluateTerm method, which is no longer used, and eliminates hasSubs from several methods, which is redundant.
2021-10-20Reimplement support for relational triggers (#7063)Andrew Reynolds
This makes relational triggers its own kind of instantiation match generator. Future PRs will delete the code interleaved in the core InstMatchGenerator class for handling relational triggers. This PR also fixes two issues related to how trigger techniques are combined: (1) instantiation match generators that are generated as part of multi-triggers now are properly specialized (using getInstMatchGenerator), (2) there was a bug with auto-generated triggers: when the first auto-generated trigger was generated that was already a user trigger, then we would ignore all other auto-generated triggers. This is work towards finding a solution for the choice.move.hard Facebook benchmark, where relational-triggers appear to be a possible solution.
2021-10-20Do not make assumption about model for Boolean variables in FMF (#7407)Andrew Reynolds
Fixes cases where models can be wrong for FMF with Boolean variables in the bodies of quantified formulas. Fixes #6744, all benchmarks on that issue are fixed. This PR adds 2 of the regressions from that issue.
2021-10-14Split entailment check from term database (#7342)Andrew Reynolds
Towards addressing some bottlenecks on Facebook benchmarks.
2021-10-14Fix quantifiers variable elimination for parametric datatypes (#7358)Andrew Reynolds
Fixes #7353.
2021-10-13Make (proof) equality engine use Env (#7336)Andrew Reynolds
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-12Minor cleaning of instantiation utilities (#7334)Andrew Reynolds
Also fixes a bug in the quantifiers macro utility which did not compute the instantiation constant body of a quantified formula properly. This is work towards a major refactoring of conflict-based instantiation / entailment checks.
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-11Rename SmtScope to SolverEngineScope. (#7284)Aina Niemetz
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-06Eliminate more hard coded uses of user context (#7309)Andrew Reynolds
This is in preparation to make the "lemma context" configurable.
2021-10-04Refactor internally generated bounded quantified formulas (#7291)Andrew Reynolds
This changes the attribute on internally generated bounded quantified formulas from `isInternal` to `isQuantBounded`. This makes it clear that bounded integers is the module that should process them. It also moves the utility for constructing these quantified formulas from strings to BoundedIntegers itself. This is to accommodate other theories, e.g. bags, that may make use of reductions to bounded quantifiers.
2021-10-04Move isFiniteType from theory engine to Env (#7287)Andrew Reynolds
In preparation for breaking more dependencies on TheoryEngine.
2021-10-04Eliminating static calls to rewriter in quantifiers (#7301)Andrew Reynolds
2021-09-30Rename SmtEngine to SolverEngine. (#7282)Aina Niemetz
2021-09-30Rename files smt_engine.(cpp|h) to solver_engine.(cpp|h). (#7279)Aina Niemetz
This is in preparation for renaming SmtEngine to SolverEngine.
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-24Eliminate calls to Rewriter::rewrite from strings entailment checks (#7203)Andrew Reynolds
There are a few further circular references that prevent us from not passing Rewriter to the strings TheoryRewriter constructor, this can be cleaned in future PRs.
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-23Implement alpha equivalence proofs (#7066)Andrew Reynolds
This is a modified version of #6137 which accounts for extended rewriting between quantified formulas that are considered alpha equivalent. It also generalizes the proof rule ALPHA_EQUIV. Notice that if we were to make this rule more pedantic, we would check for variable shadowing during substitution, although this is not currently done.
2021-09-22Make cegqi subsolvers EnvObj (#7205)Andrew Reynolds
Makes a few places do multiplication for Rational directly instead of invoking the rewriter.
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-16Fix relevant domain for parametric operators (#7198)Andrew Reynolds
Fixes #6531. This issue also occurs when using `--full-saturate-quant` on facebook benchmarks that combine multiple sequence types. It does some cleanup on relevant domain in the process.
2021-09-15Minor changes to E-matching utilities (#7062)Andrew Reynolds
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-10Use C++17 attributes (#7154)Andres Noetzli
Currently, we are using non-standard attributes. With C++17, all the attributes that we use regularly are now standardized. This commit replaces the compiler-specific attributes with standard ones.
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-08Improve pre-skolemization, move quantifiers preprocess to own file (#7153)Andrew Reynolds
This also heavily refactors the preskolemization method (now in QuantifiersPreprocess), in preparation for it being enabled by default. This method previously was doing a tree traversal, it now maintains a visited cache. It makes minor cleanup to the dependencies of this method.
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-07Use `EnvObj` methods instead of `Theory` methods (#7144)Andres Noetzli
This removes the methods `getEnv()`, `options()`, `getSatContext()`, and `getUserContext()` from the `Theory` class because they are now part of `EnvObj`. Additionally, this commit converts the inference managers to `EnvObj` because of there were some calls to retrieve the contexts from `Theory` in those classes.
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-03Avoiding duplicate search in maps (#7055)MikolasJanota
This commit identifies a couple of scenarios where an operation required 2 searches into a map/hashmap and replaces them with a single search. This also makes the code shorter. Signed-off-by: Mikolas Janota <mikolas.janota@gmail.com>
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback