Although it is a big patch, the changes are simple:
- There is one Z3_Context now, member of the SMTConstraintManager class.
- Z3Expr, Z3Sort, Z3Model and Z3Solver are constructed with a reference to the Z3_Context in SMTConstraintManager.
- All static functions are now members of Z3Solver, e.g, the SMTConstraintManager now calls Solver.fromBoolean(false) instead of Z3Expr::fromBoolean(false).
Most of the patch only move stuff around except:
- New method Z3Sort MkSort(const QualType &Ty, unsigned BitWidth), that creates a sort based on the QualType and its width. Used to simplify the fromData method.
Unfortunate consequence of this patch:
- getInterpretation was moved from Z3Model class to Z3Solver, because it needs to create a Z3Sort before returning the interpretation. This can be fixed by changing both toAPFloat and toAPSInt by removing the dependency of Z3Sort (it's only used to check which Sort was created and to retrieve the type width).
should be a separate revision, but OK