-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems with scaling predicates #873
Comments
Your first error is because your quantifier with multiple binders gets split up into a nested quantifier. I've minimized that case down to this:
@niomaster Do you see how maybe the simplifier messes this up? As soon as you remove the inline or the scaling the problem indeed goes away. A theory for why the second case is an error is that this splitting up of quantifiers causes the injectivity knowledge to be unusable, hence the injectivity check fails. |
Yes, this is the report for the bad simplification (when passing
Note that the expression is in fact not yet split up into multiple quantifiers before this point, but the simplifier treats foralls with multiple bindings as equivalent to multiple foralls with one binding, to keep the simplification rules manageable. That did improve the situation (because we no longer need to split up every quantifier), but clearly in this case is not enough. |
We could consider first translating all quantifiers with multiple bindings to their tupled form:
That way we no longer have to hack around quantifiers having multiple bindings, and we can just write simplifications as though quantifiers have only one binding. As a consequence we can never split out quantifiers over their bindings, but that is probably just what we want. |
Do you mean, define rewrite rules about quantifiers, that are parametric over the number of arguments the quantifier has? Do we even have rules like that? We could consider moving those to a specialized pass anyway, as the exact way of whether or not to split a quantifier or not seems delicate. |
No, I mean to alter the nesting level of quantifiers. |
I encountered some issues scaling predicates:
Removing the scaling in the specification for the method
m()
removes the error, as does removing the\forall
loop with the injectivity check.Changing the predicate pred() to the following introduces a different error:
I'd expect this to work because of the injectivity check
arr[i] != arr[j]
. Again, removing the scaling on the predicate removes this error and gives a successful verification.The text was updated successfully, but these errors were encountered: