summaryrefslogtreecommitdiff
path: root/src/smt/smt_engine.h
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2020-12-14 11:38:04 -0600
committerGitHub <noreply@github.com>2020-12-14 11:38:04 -0600
commitaf7c14503f4600559a104cd97181448a07837dd0 (patch)
tree5b43bfa56f58dd56a8dbf33bdfc9a81935297e35 /src/smt/smt_engine.h
parentc51920039f10864f813ae1a4b4e765264a322256 (diff)
Properly implement datatype selector triggers (#5624)
This ensures that datatype selectors are properly handled as triggers in E-matching. This is challenging since selectors in quantified formulas are of kind APPLY_SELECTOR but are theory-preprocessed to APPLY_SELECTOR_TOTAL/APPLY_UF. Hence, we must match on 2 possible operators, and ones that do not match the operator of the trigger. This adds a custom candidate generator for this case. It also removes a deprecated option that is no longer used (in part due to our use of shared selectors). This is in preparation for further work on optimizing cvc4 on benchmarks from Facebook. Note that there is not a convienient way to call expandDefinitions currently (which is required to get the proper operators to match). This PR calls smt::getCurrentSmtEngine() to do this, although we should find a better solution soon, e.g. adding expandDefinitions to the rewriter. FYI @barrettcw
Diffstat (limited to 'src/smt/smt_engine.h')
-rw-r--r--src/smt/smt_engine.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/smt/smt_engine.h b/src/smt/smt_engine.h
index f8a74597b..6f08359b5 100644
--- a/src/smt/smt_engine.h
+++ b/src/smt/smt_engine.h
@@ -510,12 +510,15 @@ class CVC4_PUBLIC SmtEngine
Node simplify(const Node& e);
/**
- * Expand the definitions in a term or formula. No other
- * simplification or normalization is done.
+ * Expand the definitions in a term or formula.
+ *
+ * @param n The node to expand
+ * @param expandOnly if true, then the expandDefinitions function of
+ * TheoryEngine is not called on subterms of n.
*
* @throw TypeCheckingException, LogicException, UnsafeInterruptException
*/
- Node expandDefinitions(const Node& e);
+ Node expandDefinitions(const Node& n, bool expandOnly = true);
/**
* Get the assigned value of an expr (only if immediately preceded by a SAT
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback