I’m used to writing models in Alloy that have each “step” in a predicate and then require that all steps satisfy the predicate. Now that the keyword “all” is no longer supported, it seems that it is difficult to quantify over variables passed to a predicate as in:
sig A {}
pred allsteps {
some s:A ,sPrime:A | step [a,aPrime]
}
pred step[a,aPrime:A] {
a = aPrime
}
Any hints on how to quantify over arguments passed to predicates in the new Alloy? I want to keep the structure of the separation of concerns in the predicates.
I see that I posted the wrong code for my question. Sorry! Here is the error message that we are getting.
I interpreted this error message to mean the ``all’’ keyword is no longer supported as a quantifier. If that’s not the case, what does the error message mean?
I seem to recall it was possible to use all as a relation qualifier, like one, some and no currently, in old versions of Alloy (before Alloy 4). So there was probably a time where writing all r not followed by : became syntactically incorrect, hence the error message.
Yes, that’s exactly right. My recollection is that I was being rather fanatical about consistency in the language design, so indeed it seemed that if you could write no expr and some expr, you should be able to write all expr too, but then we realized it was a terrible idea!
Interesting. We should perhaps remove these error messages (there are two occurrences in the Alloy grammar specifications). This would still yield an error, but at least a “nominal” one rather than ad-hoc one (which gives a misleading message like the one you had).