- add option smt.bv.reduce_size.
- it allows to apply incremental pre-processing of bit-vectors by identifying ranges that are known to be constant.
This rewrite is beneficial, for instance, when bit-vectors are constrained to have many high-level bits set to 0.
@nunoplopes @aqjune you can experiment by setting ALIVE_OPT to 1 and see if this helps.
A further possible optimization is to persist the "subst" object on the api_context object.
Then in Z3_substitute in api_ast.cpp, instead of declaring locally
expr_safe_replace subst(m);
you can use an attribute on the context to retrieve the same substitution object.
It is not easy to figure out if this matters without having some profiling information so I hope you can determine on your side whether this is useful.