summaryrefslogtreecommitdiff
path: root/src/theory
AgeCommit message (Collapse)Author
2021-04-08Initial support for parametric datatypes in sygus (#6304)Andrew Reynolds
Fixes #6298. Enables parsing of par in the sygus parser, and adds support for default grammar construction. Also fixes a bug related to single invocation for non-function types.
2021-04-07Set incomplete if not applying ho extensionality (#6281)Andrew Reynolds
If the user manually disables ho-extensionality via expert option --no-uf-ho-ext, we should answer "unknown" instead of "sat" when applicable. Fixes #4318.
2021-04-07Fixes for abducts (#6279)Andrew Reynolds
Fixes benchmarks 2 and 3 from #5848.
2021-04-07(proof-new) Proper implementation of proof node cloning (#6285)Andrew Reynolds
Previously, we were traversing proof node as a tree, now we use a dag traversal. This also makes sure that proofs work when we have a external proof conversion and we are in incremental mode. In such cases, the final proof must be cloned to ensure that we do not overwrite proof nodes, which may be reused across multiple check-sat.
2021-04-07Add term pools utility (#6243)Andrew Reynolds
This utility will be used to track pools for pool-based instantiation.
2021-04-07Replace calls to NodeManager::mkSkolem with SkolemManager::mkDummySkolem (#6291)Andrew Reynolds
This is in preparation for refactoring skolem creation throughout the code base to improve proofs and migrate Theory::expandDefinitions to Rewriter::expandDefinitions. This PR also eliminates some unused code in TheoryArithPrivate. Followup PRs will start formalizing/eliminating calls to mkDummySkolem.
2021-04-06Remove template argument from `NodeBuilder` (#6290)Andres Noetzli
Currently, NodeBuilder takes a single template argument: An integer that determines the expected number of arguments. This argument is used to determine the size of the d_inlineNvChildSpace array. This array is used to construct nodes inline. The advantage of this is that we don't have to allocate a NodeValue on the heap for the node under construction until we are sure that the node is new. While templating the array size may save some stack space (or avoid a heap allocation if we statically know that we a fixed number of children and that number is greater than 10), it complicates the code and leads to longer compile times. Thus, this commit removes the template argument and moves some of the NodeBuilder code to a source file for faster compilation. CPU build time before change (debug build): 2429.68s CPU build time after change (debug build): 2228.44s Signed-off-by: Andres Noetzli noetzli@amazon.com
2021-04-06Fix issue with lemma during equality engine iterator in sets (#6289)Andrew Reynolds
Fixes #4370.
2021-04-06Remove stdPrintAscii option (#6280)Andrew Reynolds
Fixes #4179.
2021-04-05Add documentation for theory_bags_type_rules.h (#6268)mudathirmahgoub
2021-04-05Fix spurious antecedant for symbolic regular expressions (#6284)Andrew Reynolds
Fixes #6271. This was triggered by recent fixes, this fixes solution soundness issues with symbolic regular expressions due to spuriously included antecedants, which made lemmas SAT-context dependent while being cached as user-context dependent.
2021-04-05[proof-new] Registering proof checkers uniformly from the SMT solver (#6275)Haniel Barbosa
Each theory has its own proof checker, responsible for checking the rules pertaining to that theory. The main proof checker uses these specialized checkers. Previously the main proof checker (of the proof node manager used across the SMT solver) was connected to these theory proof checkers during initialization of the theory. This commit adds an interface to the theories for retrieving its proof checker (analogous to how one retrieves the rewriter of a theory) which is used by a new method in the theory engine to register a theory proof checker to a given proof checker according to a theory id. This is in preparation for the new unsat cores based on proofs.
2021-04-05Fix subtyping for sets care graph (#6278)Andrew Reynolds
We were getting types for set singleton/membership in a way that was unsafe for subtyping, which was leading to incorrectly computing care graphs for sets of reals. Fixes #5705.
2021-04-05Add interface for skolem functions in SkolemManager (#6256)Andrew Reynolds
This PR introduces the notion of a "skolem function" to SkolemManager, which is implemented as a simple cache of canonical skolem functions/variables. This is a prerequisite for two things: (1) Making progress on the LFSC proof conversion, which currently is cumbersome for skolems corresponding to regular expression unfolding. (2) Cleaning up singletons. Having the ability make canonical skolem functions in skolem manager will enable Theory::expandDefinitions to move to TheoryRewriter::expandDefinitions. This will then enable removal of calls to SmtEngine::expandDefinitions. This PR also makes arithmetic make use of this functionality already. The next steps will be to clean up all raw uses of NodeManager::mkSkolem, especially for other theories that manually track allocated skolem functions.
2021-04-03Disable substring component contains in strip endpoints (#6266)Andrew Reynolds
Fixes the first benchmark from #6203.
2021-04-02Fix case where RE unfolding generates a trivially true lemma (#6267)Andrew Reynolds
An RE unfolding lemma may rewrite to true for tautological RE memberships that our rewriter does not rewrite the membership to true. An example is (str.in_re x (re.* (re.union (str.to_re "A") (str.to_re x))). This PR ensures we are robust to these cases. This fixes benchmarks 3-5 from #6203. Benchmark 3 is added here, 4-5 time out.
2021-04-01Simplify caching of regular expression unfolding (#6262)Andrew Reynolds
This ensures that we always cache regular expressions in a user-dependent manner. Previously, we were erroneously caching in a SAT-dependent way for very rare cases when non-constant regular expressions were used. Since we never dependent on current assertions for the unfolding, there is no need to cache in the SAT context. This fixes the second benchmark from #6203. This PR also improves our traces for checking models in strings.
2021-04-01Fix type rule for to_real (#6257)Andrew Reynolds
This fixes the type rule for to_real to match SMT-LIB: its argument must be an integer. This required fixing the TPTP parser which has a more relaxed semantics for to_real / to_rat. This also fixes Solver::isReal, which should return false if we are the integer type. Fixes #6208.
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-04-01kinds: Remove non-existent properties. (#6253)Aina Niemetz
2021-04-01 Add debug traces to theory inference manager (#6250)Andrew Reynolds
2021-04-01Fix non-linear for unknown case (#6252)Andrew Reynolds
As a result of this issue, currently we are incorrectly trying to repair a model when one is not guaranteed to exist, leading to a spurious assertion failure. Fixes #6228. The benchmarks on that issue now answer "unknown" without an assertion failure.
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
2021-03-31Bags: Move implementation of type rules from header to .cpp file. (#6247)Aina Niemetz
2021-03-31Eliminate dependencies on quantifiers engine in internal quantifiers code ↵Andrew Reynolds
(#6240) This completes eliminating dependencies on quantifiers engine from internal quantifiers code. It eliminates quantifiers_engine.h as an include from src/theory/quantifiers/ apart from theory_quantifiers.cpp where it is owned. Followup PRs will further eliminate circular dependencies that arose will refactoring quantifiers engine.
2021-03-31Add missing inference ids (#6242)Andrew Reynolds
Towards having complete stats on inference ids for each lemma, fact, and conflict.
2021-03-31FP: Move implementation of type rules from header to .cpp file. (#6241)Aina Niemetz
2021-03-30Make SEXPR simply typed (#6160)Andrew Reynolds
Currently, SEXPR applications are given a parametric type SEXPR_TYPE applied to the types of its arguments. This means that SEXPR that are type checked consume roughly double the memory. This issue arises in practice when printing proofs in the internal calculus. There is no need to have SEXPR_TYPE as a parametric type, this PR makes SEXPR simply typed. Also moves some implementation of TypeNode methods to type_node.cpp.
2021-03-30Implement simple tracking of instantiation lemmas (#6077)Andrew Reynolds
We require tracking of instantiation lemmas for quantifier elimination. Recently, this feature was removed in favor of reconstructing instantiations via substitutions. This does not quite work if instantiation lemmas have more complex post-processing, e.g. virtual term substitution. This PR reimplements a much simpler form of instantiation tracking that simply adds instantiation bodies to a vector, per quantified formula. It uses this vector for quantifier elimination. Fixes #5899.
2021-03-30Refactoring quantifier annotation kinds, add kinds in preparation for ↵Andrew Reynolds
pool-based instantiation (#6234) This is in preparation for a new pool-based instantiation technique.
2021-03-30Miscellaneous elimination of dependencies on quantifiers engine (#6238)Andrew Reynolds
This should be the last PR before quantifiers engine will not be passed to quantifiers modules.
2021-03-29Eliminate the use of quantifiers engine in sygus solver (#6232)Andrew Reynolds
2021-03-29Eliminate use of quantifiers engine in enumerative instantiation (#6217)Andrew Reynolds
This also makes minor updates to how term tuple enumerators are constructed.
2021-03-29Move decision manager into theory inference manager (#6231)Andrew Reynolds
This makes it so that the decision manager is accessible from TheoryInferenceManager. This is work towards breaking circular dependencies in quantifiers, and also helps simplify several other dependencies in e.g. UF and datatypes.
2021-03-29Modular bv2int part 1 (#6212)yoni206
This PR introduces the header file for a more modular bv-to-int module, that will be called from the preprocessing pass bv-to-int, and possibly from the bit-vector solver after preprocessing. The header file is basically a copy of the bv_to_int.h header file from preprocessing, with some adjustments to increase modularity. In addition to the header file we also introduce an empty unit test that #includes the header, in order to identify compilation errors. The unit test will be populated in subsequent PRs, that will also include implementations.
2021-03-26Pass term registry to quantifiers modules (#6216)Andrew Reynolds
2021-03-25Ensure nonlinear extensions properly reconsiders its model (#6204)Gereon Kremer
In certain cases, the nonlinear extension would not re-check properly but only repeat an (already failed) model repair. The result lemma would then already be in cache and thus not be sent to the solver. This PR ensures that modelBasedRefinement is always run and entirely removes the d_builtModel flag that was responsible for this behavior. Additionally, it asserts that the lemma that (tries to) force the model to be reconciled during theory combination is actually sent. Fixes #6192.
2021-03-25FP: Refactor FloatingPointLiteral in preparation for MPFR. (#6206)Aina Niemetz
This pushes all symfpu specific parts from FloatingPoint into FloatingPointLiteral. FloatingPoint is now generic. An additional FloatingPointLiteral implementation using MPFR will be made configurable similiarly to how we handle Integers with either GMP or CLN backend.
2021-03-25Refactor construction of triggers (#6209)Andrew Reynolds
This PR centralizes our utilities for generating triggers. It also splits the statistics class from quantifiers off from quantifiers engine.
2021-03-25Add missing includes. (#6207)Gereon Kremer
This PR adds includes that are missing from source files, but currently provided by other includes. This mostly concerns <sstream> which is currently included by the statistics, which will change in the future.
2021-03-24Use inference manager to access intantiate utility instead of quantifiers ↵Andrew Reynolds
engine (#6198) Towards breaking dependencies on quantifers engine.
2021-03-24Only consider relevant terms for integer branches (#6181)Gereon Kremer
Linear arithmetic simply tried to branch on the first integer variable that had a non-integral assignment. If it holds stale variables that are not part of the current input, these branches can be emitted and are processed by the solver, but the resulting new assertions will not be considered relevant and thus not added to the theory. As it still triggers a new theory check, linear arithmetic repeats the same procedure and causes an infinite loop. This PR explicitly tracks the currently relevant nodes by storing all preregistered nodes and only allows branching on variables from this set. Fixes #6146.
2021-03-23Remove unused code for axioms (#6197)Andrew Reynolds
This is leftover from a previous way of eliminating extended operators
2021-03-23Passing term registry to ematching utilities (#6190)Andrew Reynolds
Model is now nested into term registry. This PR also resolves some complications due to namespaces within quantifiers.
2021-03-23Remove internal includes of Api header. (#6193)Aina Niemetz
2021-03-23Replace old sygus term reconstruction algorithm with a new one. (#5779)Abdalrhman Mohamed
This PR replaces the old algorithm for reconstructing sygus terms with a new "proper" implementation.
2021-03-23Moving instantiate and skolemize into quantifiers inference manager (#6188)Andrew Reynolds
After this PR, utilities for instantiation are available from the quantifiers inference manager instead of quantifiers engine. This means that the majority of the dependencies on quantifiers engine will (finally) start being cleaned up after this PR.
2021-03-22Move equality query utility into quantifiers model (#6186)Andrew Reynolds
This simplifies the initialization of quantifiers engine. This PR also makes general improvements to EqualityQuery.
2021-03-22 Function types are always first-class (#6167)Andrew Reynolds
This eliminates one of the dependencies of TypeNode on options. In particular, this makes it so that function types are always considered first-class. This change makes it so that higher-order types can always be constructed; logic exceptions should occur if they are used in constraints.
2021-03-21Simplify strings term registration (#6174)Andrew Reynolds
String terms may enter into the equality engine without appearing in assertions, due to eager context-dependent simplification internal to the equality engine (--strings-eager-eval). In rare cases, we did not catch when a new string constant appeared in the equality engine, meaning it would not be marked as relevant leading to bogus models in incremental mode. This makes it so that proxy variables are stored in a user-context dependent manner, which impacts when terms marked as having a proxy variable are registered. The PR also simplifies our policies for when string terms are registered slightly. Fixes #6072.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback