mirror of
https://github.com/Z3Prover/z3
synced 2026-04-14 08:15:11 +00:00
Make dep_mgr private in seq_nielsen; expose conflict sources vector (#9129)
* make dep_mgr private in seq_nielsen, expose conflict_sources vector Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/998d8021-4808-4feb-afc5-b2447c6a64e5 * move deps_to_lits to seq namespace in seq_nielsen Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/8d736478-8f9b-4451-8d1f-539ce72525c7 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
49f2eb0e49
commit
46c76d89e0
6 changed files with 51 additions and 31 deletions
|
|
@ -1394,7 +1394,7 @@ static void test_solve_node_status_unsat() {
|
|||
SASSERT(root->is_currently_conflict());
|
||||
}
|
||||
|
||||
// test that collect_conflict_deps returns deps after unsat
|
||||
// test that conflict_sources is populated after unsat
|
||||
static void test_solve_conflict_deps() {
|
||||
std::cout << "test_solve_conflict_deps\n";
|
||||
ast_manager m;
|
||||
|
|
@ -1413,10 +1413,8 @@ static void test_solve_conflict_deps() {
|
|||
auto result = ng.solve();
|
||||
SASSERT(result == seq::nielsen_graph::search_result::unsat);
|
||||
|
||||
seq::dep_tracker deps = ng.dep_mgr().mk_empty();
|
||||
ng.collect_conflict_deps(deps);
|
||||
// deps should be non-empty since there's a conflict
|
||||
SASSERT(deps != nullptr);
|
||||
// conflict_sources should be non-empty since there's a conflict
|
||||
SASSERT(!ng.conflict_sources().empty());
|
||||
}
|
||||
|
||||
// test dep_tracker (dependency_manager<dep_source>) linearize
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ static void test_check_conflict_valid_k_exists() {
|
|||
ng.add_str_mem(x, regex);
|
||||
|
||||
// lb=3, ub=5: length 4 is achievable (k=2) → no conflict
|
||||
seq::dep_tracker dep = ng.dep_mgr().mk_leaf(sat::literal(0));
|
||||
seq::dep_tracker dep = nullptr;
|
||||
ng.root()->set_lower_int_bound(x, 3, dep);
|
||||
ng.root()->set_upper_int_bound(x, 5, dep);
|
||||
|
||||
|
|
@ -607,7 +607,7 @@ static void test_check_conflict_no_valid_k() {
|
|||
ng.add_str_mem(x, regex);
|
||||
|
||||
// lb=3, ub=3: only odd length 3 — never a multiple of 2 → conflict
|
||||
seq::dep_tracker dep = ng.dep_mgr().mk_leaf(sat::literal(0));
|
||||
seq::dep_tracker dep = nullptr;
|
||||
ng.root()->set_lower_int_bound(x, 3, dep);
|
||||
ng.root()->set_upper_int_bound(x, 3, dep);
|
||||
|
||||
|
|
@ -635,7 +635,7 @@ static void test_check_conflict_abc_star() {
|
|||
ng.add_str_mem(x, regex);
|
||||
|
||||
// lb=5, ub=5 → no valid k (5 is not a multiple of 3) → conflict
|
||||
seq::dep_tracker dep = ng.dep_mgr().mk_leaf(sat::literal(0));
|
||||
seq::dep_tracker dep = nullptr;
|
||||
ng.root()->set_lower_int_bound(x, 5, dep);
|
||||
ng.root()->set_upper_int_bound(x, 5, dep);
|
||||
|
||||
|
|
@ -662,7 +662,7 @@ static void test_check_conflict_stride_one_never_conflicts() {
|
|||
euf::snode* regex = sg.mk(re);
|
||||
ng.add_str_mem(x, regex);
|
||||
|
||||
seq::dep_tracker dep = ng.dep_mgr().mk_leaf(sat::literal(0));
|
||||
seq::dep_tracker dep = nullptr;
|
||||
ng.root()->set_lower_int_bound(x, 7, dep);
|
||||
ng.root()->set_upper_int_bound(x, 7, dep);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue