Closed j123123 closed 5 years ago
hyper isn't terminating; the definition isn't well formed. Z3 does not tell you that you defined a non-terminating function. It makes no such checks and check-sat can produce arbitrary answers in this case.
and check-sat can produce arbitrary answers in this case.
Why? Why not produce "unknown" answer?
I find proof assistants are more suitable for checking consistency of recursive definitions because they basically need to accept or find a well-founded ordering. The SMT-LIB analogue would be to annotate with some well-founded ordering and then produce auxiliary proof obligations for these, and in the common case of primitive recursive functions just figure out that they are well-formed. But this functionality is replicated in program verification environments and interactive provers that support problem decomposition.
Output:
I think this is bug.