A formula with quantifiers contains declaration of trans function. Z3 successfully finds the model and prints it. But it also prints models for functions like trans!1!4464, trans!7!4463 .. which are not used anywhere in the model. What is it? How can I disable this output?
Here is the query: http://dl.dropbox.com/u/444947/asyn_arbiter_bound_16.smt2
and here is Z3’s output – http://dl.dropbox.com/u/444947/asyn_arbiter_bound_16_result.txt
Recall that the models returned by Z3 can be viewed as simple functional programs.
Your formula is in the UFBV fragment. Z3 uses several modules to decide this fragment. Each module converts a formula
Finto a “simpler” formulaF', and produces a procedure that converts a model forF'into a model forF. We call these procedures: “model converters”. Model converters will, for example, eliminate interpretations for auxiliary functions and constants introduced in theFtoF'conversion. Some auxiliary definitions can’t be removed seems they are used to give interpretation of other definitions. We should view them as “auxiliary functions”. They also create an interpretation for symbols that have been eliminated..In your example, the following happens: the last module produces a model that contains the
trans!...andk!...symbols. This model is for a formula that does not even containtrans. The functiontranshas been eliminated. As we apply the model converters, the interpretation fortransis constructed based on the interpretation of alltrans!.... At this point,trans!...andk!...symbols are still being used since the interpretation oftranshas a reference to alltrans!...symbols and the interpretation of thetrans!...functions have references to thek!...function symbols. At this step, there are no unnecessary symbols in the model. However, in a later step, the interpretation oftransis simplified by unfolding the definitions oftrans!...andk!.... So, after this simplification step,trans!...andk!...are essentially “dead code”.That being said, the model returned by Z3 is correct, that is, it is a model for your formula. I acknowledge that these extra symbols are annoying and unnecessary. To eliminate them, we have apply the equivalent of a “dead code” elimination step. We are really close to the next release. So, this feature will not be available in the next release, but I will add it for the release following the next one.