chore(deps): bump z3 to 0.20 in /rust#74
Merged
Merged
Conversation
z3 0.13+ removed the explicit-context API: the `'ctx` lifetime is gone and constructors run against an implicit thread-local context. Rewrite the solver in findchars-solver accordingly: - feature static-link-z3 -> vendored (builds Z3 4.16 from the z3-src crate) - drop Context; wrap solve_one in with_z3_config(&cfg, ..) with a fresh Config per group (set_timeout_msec replaces the old Params timeout), preserving the per-group context isolation - drop the leading &ctx arg from BV::new_const / BV::from_u64 - _eq -> fully-qualified Ast::eq (the bare .eq() now collides with PartialEq on BV, and _eq is deprecated) - assert() now takes Borrow<Bool>, so pass the Bool by value (no outer &) Public API (LiteralCompiler::solve / solve_with_auto_split) and AsciiFindMask are unchanged. Verified: cargo test -p findchars-solver (7/7), cargo test -p findchars -p findchars-csv, and clippy --all-targets -D warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses the second bump deferred in #72 (rand 0.10 landed in #73). The z3 crate was redesigned between 0.12 and 0.20, so this is a version bump plus a solver rewrite.
Changes (all in
findchars-solver)static-link-z3→vendored— builds Z3 4.16 statically from thez3-srccrate (cmake + C++), no system Z3 needed.src/solver.rs: the'ctxlifetime is gone and constructors no longer take&ctx.Context; wrapsolve_oneinwith_z3_config(&cfg, …)with a freshConfigper group (set_timeout_msec(5000)replaces the oldParamstimeout), preserving per-group context isolation.&ctxfromBV::new_const/BV::from_u64._eq→ fully-qualifiedAst::eq(bare.eq()now collides withPartialEqonBV, and_eqis deprecated →-D warnings).assert()now takesBorrow<Bool>, so theBoolis passed by value (no outer&).Public API unchanged —
LiteralCompiler::solve/solve_with_auto_splitsignatures andAsciiFindMaskare identical; only the z3 calls insidesolve_onechanged.Verification (local)
cargo build -p findchars-solver✓ (vendored Z3 4.16 compiles from source)cargo test -p findchars-solver✓ 7/7 (incl. the slowauto_split_many; each test actually invokes Z3 and validates the produced masks)cargo test -p findchars -p findchars-csv✓ (exercises the solver at runtime via engine construction — the 150s parity test)cargo clippy --workspace --all-targets -- -D warnings✓