Closed LeventErkok closed 3 years ago
I don't understand why this should be a priority to change. The parser throws away parameters to declared functions. Having it complain could trigger other support calls.
Not a priority at all. Just pedantry, and wanted to make sure you're aware. Feel free to ignore.
It looks up the symbol here:
It has information that there are parameters, but they are ignored. Failing the "try" function if num_indices > 0 would make your example complain, but I don't see how this is a usability improvement. It will for sure reject input that isn't strictly well-formed, but then the internal representation is well formed and can be queried (from programmatic API or through solving).
I'm a little confused about why this definition is accepted by z3:
The term
(_ sum 0)
suggestssum
is an indexed function, which isn't really true. I'd expect z3 to error-out on this input, but it accepts it happily.For whatever it's worth, cvc4/cvc5 both reject this definition since
sum
is not an indexed function.Obviously this isn't really a big deal as z3 seems to accept more than it should, but maybe it's good to reject it to be SMTLib compliant?