3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-01-28 04:48:42 +00:00
z3/src/opt
Copilot 058a8c082d
Refactor mk_and and mk_app to use std::span API (#8285)
* Initial plan

* Refactor mk_and and mk_app to use std::span

- Made mk_and(unsigned num_args, expr * const * args) private
- Added new public mk_and(std::span<expr* const> args) method
- Added new public mk_app(family_id fid, decl_kind k, std::span<expr* const> args) method
- Updated all convenience overloads to use std::span version
- Updated all external call sites to use the new std::span API

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Fix remaining test files to use std::span API

- Updated src/test/sorting_network.cpp
- Updated src/test/ho_matcher.cpp with explicit cast to resolve ambiguity

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

* Revert overlapping changes superseded by PR #8286

Reverted 30 files to match the state from PR #8286 (commit ebc0688) which refactored mk_and/mk_or call sites to use vector overloads. This supersedes the std::span changes in those files.

Retained std::span changes in files unique to this PR:
- Core API changes (ast.h, ast.cpp)
- Files not affected by PR #8286 (api_context.cpp, ast_util.cpp, bool_rewriter.h, datatype_rewriter.cpp, dom_simplifier.cpp, factor_rewriter.cpp, pb2bv_rewriter.cpp, quant_hoist.cpp, spacer_cluster_util.cpp, sortmax.cpp, array_axioms.cpp, smtfd_solver.cpp, goal.cpp, ho_matcher.cpp, qe_arith.cpp, sorting_network.cpp)
- Special case in hnf.cpp where both PRs modified different lines

Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
2026-01-22 16:58:38 -08:00
..
CMakeLists.txt adding totalizer 2022-06-29 08:20:01 -07:00
maxcore.cpp Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-01-22 13:21:22 -08:00
maxcore.h update wcnf front-end and add new wcnf strategy 2026-01-01 17:50:42 -08:00
maxlex.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
maxlex.h separate pre-processing, add callback parameter to push/pop in python API 2022-04-11 17:05:59 +02:00
maxsmt.cpp update wcnf front-end and add new wcnf strategy 2026-01-01 17:50:42 -08:00
maxsmt.h Fix unused parameter warnings in empty override functions by omitting parameter names (#8174) 2026-01-12 21:27:33 -08:00
opt_cmds.cpp Fix unused parameter warnings in empty override functions by omitting parameter names (#8174) 2026-01-12 21:27:33 -08:00
opt_cmds.h booyah 2020-07-04 15:56:30 -07:00
opt_context.cpp Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-01-22 13:21:22 -08:00
opt_context.h fix #8102 2025-12-23 09:44:22 -08:00
opt_cores.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
opt_cores.h add option to "rotate" cores during core finding 2022-05-01 15:26:56 -07:00
opt_lns.cpp refine maxresw option 2026-01-02 16:23:51 -08:00
opt_lns.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
opt_mux.h separate pre-processing, add callback parameter to push/pop in python API 2022-04-11 17:05:59 +02:00
opt_params.pyg update wcnf front-end and add new wcnf strategy 2026-01-01 17:50:42 -08:00
opt_pareto.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
opt_pareto.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
opt_parse.cpp Refactor mk_and/mk_or call sites to use vector overloads (#8286) 2026-01-22 13:21:22 -08:00
opt_parse.h booyah 2020-07-04 15:56:30 -07:00
opt_preprocess.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
opt_preprocess.h core opt 2022-05-21 10:27:37 -04:00
opt_sls_solver.h Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
opt_solver.cpp Standardize for-loop increments to prefix form (++i) (#8199) 2026-01-14 19:55:31 -08:00
opt_solver.h add user propagators to opt_solver 2025-10-02 19:44:22 -07:00
optsmt.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
optsmt.h fix #5254 2021-05-17 15:42:01 -07:00
pb_sls.cpp Centralize and document TRACE tags using X-macros (#7657) 2025-05-28 14:31:25 +01:00
pb_sls.h booyah 2020-07-04 15:56:30 -07:00
sortmax.cpp Refactor mk_and and mk_app to use std::span API (#8285) 2026-01-22 16:58:38 -08:00
totalizer.cpp totalizer 2022-06-30 19:49:19 -07:00
totalizer.h totalizer 2022-06-30 19:49:19 -07:00
wmax.cpp Add [[nodiscard]] to AST factory functions and modernize iterator loops (#8143) 2026-01-11 09:58:25 -08:00
wmax.h re-enable pre-process 2022-04-13 11:24:24 +02:00