summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/candidate_rewrite_database.h
diff options
context:
space:
mode:
authorAndres Noetzli <andres.noetzli@gmail.com>2020-04-03 14:52:45 -0700
committerGitHub <noreply@github.com>2020-04-03 14:52:45 -0700
commitaeede74491d1db9c5bac771e78b79934ca4ab552 (patch)
treea3c05a53702514520b9625b30995e7d789c39982 /src/theory/quantifiers/candidate_rewrite_database.h
parentbadc9cb00c9086b9303fab1b494e9c5eb88265ec (diff)
Update theory rewriter ownership, add stats to strings (#4202)
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.
Diffstat (limited to 'src/theory/quantifiers/candidate_rewrite_database.h')
-rw-r--r--src/theory/quantifiers/candidate_rewrite_database.h38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/theory/quantifiers/candidate_rewrite_database.h b/src/theory/quantifiers/candidate_rewrite_database.h
index b68b20998..a9ca659e1 100644
--- a/src/theory/quantifiers/candidate_rewrite_database.h
+++ b/src/theory/quantifiers/candidate_rewrite_database.h
@@ -103,44 +103,6 @@ class CandidateRewriteDatabase : public ExprMiner
bool d_silent;
};
-/**
- * This class generates and stores candidate rewrite databases for multiple
- * types as needed.
- */
-class CandidateRewriteDatabaseGen
-{
- public:
- /** constructor
- *
- * vars : the variables we are testing substitutions for, for all types,
- * nsamples : number of sample points this class will test for all types.
- */
- CandidateRewriteDatabaseGen(std::vector<Node>& vars, unsigned nsamples);
- /** add term
- *
- * This registers term n with this class. We generate the candidate rewrite
- * database of the appropriate type (if not allocated already), and register
- * n with this database. This may result in "candidate-rewrite" being
- * printed on the output stream out. We return true if the term sol is
- * distinct (up to equivalence) with all previous terms added to this class.
- */
- bool addTerm(Node n, std::ostream& out);
-
- private:
- /** reference to quantifier engine */
- QuantifiersEngine* d_qe;
- /** the variables */
- std::vector<Node> d_vars;
- /** sygus sampler object for each type */
- std::map<TypeNode, SygusSampler> d_sampler;
- /** the number of samples */
- unsigned d_nsamples;
- /** candidate rewrite databases for each type */
- std::map<TypeNode, CandidateRewriteDatabase> d_cdbs;
- /** an extended rewriter object */
- ExtendedRewriter d_ext_rewrite;
-};
-
} /* CVC4::theory::quantifiers namespace */
} /* CVC4::theory namespace */
} /* CVC4 namespace */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback