Though nimz3 is based on Z3 integration into Nim, I think that to open the syntax to other SMT libraries (like CVC4, SMT-RAT, veriT, etc.), you should define a more general API without direct reference to Z3.
The SMT DSL that you defined in nimz3 is simple and general enough that it shouldn't be bound to Z3 only.
You would only have to rename the public facing keywords: z3: block and Z3Exception exception as far as I see. I'm not good at suggesting replacement keywords, but let's try:
for the z3: template: theory: or smt_theory:, smt:, problem:, solver:
for the exception: SMTException for general error and/or add SMTUnsatException for unsatisfiability and SMTUnknown in case of indecidability.
Do you need to expose the Z3_L_TRUE, Z3_L_FALSE and Z3_L_UNDEF constants for general user problem solving? If that's the case, perhaps they could be hidden in a general enum. The examples should be rewritten to replace if s.check() == Z3_L_TRUE: with s.check_model: or change check() signature to use this enum.
Though nimz3 is based on Z3 integration into Nim, I think that to open the syntax to other SMT libraries (like CVC4, SMT-RAT, veriT, etc.), you should define a more general API without direct reference to Z3.
The SMT DSL that you defined in nimz3 is simple and general enough that it shouldn't be bound to Z3 only.
You would only have to rename the public facing keywords:
z3:
block andZ3Exception
exception as far as I see. I'm not good at suggesting replacement keywords, but let's try:z3:
template:theory:
orsmt_theory:
,smt:
,problem:
,solver:
SMTException
for general error and/or addSMTUnsatException
for unsatisfiability andSMTUnknown
in case of indecidability.Do you need to expose the
Z3_L_TRUE
,Z3_L_FALSE
andZ3_L_UNDEF
constants for general user problem solving? If that's the case, perhaps they could be hidden in a general enum. The examples should be rewritten to replaceif s.check() == Z3_L_TRUE:
withs.check_model:
or changecheck()
signature to use this enum.