3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-02 01:13:18 +00:00

Added limit to "visit" to allow detecting multiple visits (#6435)

* Memory leak in .NET user-propagator
The user-propagator object has to be manually disposed (IDisposable), otherwise it stays in memory forever, as it cannot be garbage collected automatically

* Throw an exception if variable passed to decide is already assigned instead of running in an assertion violation

* Added limit to "visit" to allow detecting multiple visits

* Putting visit in a separate class
(Reason: We will probably need two of them in the sat::solver)

* Bugfix
This commit is contained in:
Clemens Eisenhofer 2022-11-03 11:34:52 +01:00 committed by GitHub
parent e0bbe8dfc0
commit 6790f18132
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 68 additions and 52 deletions

View file

@ -406,9 +406,9 @@ namespace sat {
auto gc_watch = [&](literal lit) {
auto& wl1 = get_wlist(lit);
for (auto w : get_wlist(lit)) {
if (w.is_binary_clause() && w.get_literal().var() < max_var && !is_visited(w.get_literal())) {
if (w.is_binary_clause() && w.get_literal().var() < max_var && !m_visited.is_visited(w.get_literal())) {
m_aux_literals.push_back(w.get_literal());
mark_visited(w.get_literal());
m_visited.mark_visited(w.get_literal());
}
}
wl1.reset();