Understanding user_propagator_base’s propagate method #5644
-
I hope this isn't too stupid of a question, but: what is the meaning of the I believe I understand how to use |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
I haven't tried the user propagator with too many different scenarios. The idea with conseq argument is that you can propagate an arbitrary formula. So if you want to instantiate a quantifier yourself you could track the quantifier (forall x phi(x)), which is a Boolean, and whenever it is assigned to true have the option to generate an instance phi(t). You set conseq to phi(t) and use the identifier from the quantified formula as a premise for the propagation. |
Beta Was this translation helpful? Give feedback.
-
Note (for others reading this thread) also that there is a new sample https://github.com/Z3Prover/z3/tree/master/examples/userPropagator It offers an introductory illustration of the feature. |
Beta Was this translation helpful? Give feedback.
I haven't tried the user propagator with too many different scenarios. The idea with conseq argument is that you can propagate an arbitrary formula. So if you want to instantiate a quantifier yourself you could track the quantifier (forall x phi(x)), which is a Boolean, and whenever it is assigned to true have the option to generate an instance phi(t). You set conseq to phi(t) and use the identifier from the quantified formula as a premise for the propagation.
In practice there are going to be some limitations for what works with propagation. Formulas with existential quantifiers don't work with the current setup. It can be fixed, but I am not sure how important it is to change the code w…