3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-06-27 19:08:49 +00:00

Fix cache function to handle reference count check

This commit is contained in:
Nikolaj Bjorner 2026-06-16 14:16:14 -06:00 committed by GitHub
parent 69dc7cab01
commit 4ffb324ed9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -262,7 +262,7 @@ struct goal2sat::imp : public sat::sat_internalizer {
void cache(app* t, sat::literal l) override { void cache(app* t, sat::literal l) override {
force_push(); force_push();
if (t->get_ref_count() <= 1) if (t->get_ref_count() <= 1)
return; return;
m_cache_trail.push_back(t); m_cache_trail.push_back(t);
// Only memoize nodes that can be revisited: a singly-referenced // Only memoize nodes that can be revisited: a singly-referenced
// node appears once in the goal, so it never produces a cache hit. // node appears once in the goal, so it never produces a cache hit.