summaryrefslogtreecommitdiff
path: root/src/theory/sets/skolem_cache.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-11-01 18:34:41 -0500
committerGitHub <noreply@github.com>2021-11-01 23:34:41 +0000
commit8fee12bf84b4d056056baf90fd8a54c06a19637b (patch)
tree2c9b3bb00902d22ef9272c2e579008f57bd9148e /src/theory/sets/skolem_cache.cpp
parentb57e39bab5e27b883f01818a401404736c6ce02e (diff)
Eliminate calls to Rewriter::rewrite and options:: in sets and bags (#7550)
There is 1 remaining call to Rewriter::rewrite in the bags type enumerator which is not straightforward to eliminate; it should perhaps call an intermediate call to a normal form utility instead of the full rewriter.
Diffstat (limited to 'src/theory/sets/skolem_cache.cpp')
-rw-r--r--src/theory/sets/skolem_cache.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/theory/sets/skolem_cache.cpp b/src/theory/sets/skolem_cache.cpp
index f759c2a7b..646ae1662 100644
--- a/src/theory/sets/skolem_cache.cpp
+++ b/src/theory/sets/skolem_cache.cpp
@@ -24,14 +24,16 @@ namespace cvc5 {
namespace theory {
namespace sets {
-SkolemCache::SkolemCache() {}
+SkolemCache::SkolemCache(Rewriter* rr) : d_rewriter(rr) {}
Node SkolemCache::mkTypedSkolemCached(
TypeNode tn, Node a, Node b, SkolemId id, const char* c)
{
- a = a.isNull() ? a : Rewriter::rewrite(a);
- b = b.isNull() ? b : Rewriter::rewrite(b);
-
+ if (d_rewriter != nullptr)
+ {
+ a = a.isNull() ? a : d_rewriter->rewrite(a);
+ b = b.isNull() ? b : d_rewriter->rewrite(b);
+ }
std::map<SkolemId, Node>::iterator it = d_skolemCache[a][b].find(id);
if (it == d_skolemCache[a][b].end())
{
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback