I would like to have some variables in z3 that takes values in some infinite set, whose elements have no operations except equality comparisons (the theory of atoms in the sense of lisp). Currently I'm simply encoding the values by strings, but then z3 may assign ill-formed strings which I want to avoid, and I'm worried that the other operations on strings might be an overhead for the solver.
I have a relation P(x, y, z)
on this set that, given two of the variables, have only finitely many possibilities for the other variable. An example might be x^2 + y^2 + z^2 = 0 mod 10000
, but in my case it is much more complex and I don't think it is convenient to encode or axiomatize the relation directly into z3. So I'm planning to write a custom propagator that adds in implication clauses like "x = "a"
and z = "b"
implies y = "ab"
or y = "ba"
" whenever x
and z
gets assigned. Is this the right way to go? Or is this type of problems better solved by something else?