A Dumb Introduction to Z3 (2025)
11–20 of 29 posts
Re: A Dumb Introduction to Z3 (2025)
#12Earlier quoted context omitted.
The authors of a powerful solver package thought differently.
It might have more to do with the first release of Z3 being in 2012, with the first stable Rust release being in 2015. Rather than the authors of Z3 passing some kind of judgment on Rust…
Re: A Dumb Introduction to Z3 (2025)
#13Re: A Dumb Introduction to Z3 (2025)
#14Problems solved nothing learned. Poking my problems into a black box and getting numbers let me only learn how to poke numbers into black boxes
Re: A Dumb Introduction to Z3 (2025)
#15Problems solved nothing learned. Poking my problems into a black box and getting numbers let me only learn how to poke numbers into black boxes
Using a database or 3D Printer isn't bad because you don't learn anything about the internals.
Re: A Dumb Introduction to Z3 (2025)
#16Earlier quoted context omitted.
What solver would you have them use? Z3 is very mature and the Rust bindings are pretty good in my (limited) experience.
I would write the tutorial in C++, for a more direct experience.
Z3 is presumably written in C++ for performance, but without data I am very confident the vast majority of programs that use Z3 consume it via one of the other APIs.
Re: A Dumb Introduction to Z3 (2025)
#17Problems solved nothing learned. Poking my problems into a black box and getting numbers let me only learn how to poke numbers into black boxes
step 1: insert the problem
step 2: ???
step 3: profit
Re: A Dumb Introduction to Z3 (2025)
#18Z3 struggles with larger problems. CVC5 or Bitwuzla do a lot better once you get into anything complex. If you're familiar with the Z3 Python API, you'll find the CVC5 one familiar. Caveat: I mostly do logic design, maybe there are some software verification tasks where Z3 comes out ahead. I've never seen one though.
One place where Z3 exposes a superior interface to CVC5 is when you want to do term simplification. CVC5 does not have any real analogue to Z3's simplification tactics (like ctx-solver-simplify), so if you want to take a term and simplify it with respect to a set of assumptions, Z3 is your only choice. I think CVC5 has all the machinery you need to implement that stuff inside of it, but as a user you can't access it.
The place where CVC5 really pulls ahead of Z3 is when you want to produce proofs (eg, to integrate SMT solving into a proof assistant like Lean, HOL, or Rocq). Both tools have support for generating proofs, but CVC5's are noticeably less buggy, to the point that Lean's SMT integration uses CVC5, even though Leo de Moura (Lean's designer) was also the original designer of Z3.
Re: A Dumb Introduction to Z3 (2025)
#19Re: A Dumb Introduction to Z3 (2025)
#20I wonder how often interviewers object to the approach of solving their dynamic programming problem using a constraint solver?
It totally depends for WHAT you're interviewing, but unlikely the company will want Z3-backed code, so most reactions would be the later.