# Loss of keyword "all" in Alloy

**URL:** <https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181>\
**Category:** Uncategorized\
**Created:** [October 25, 2021, 5:57pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181 "2021-10-25T17:57:56Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![nday](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nday](https://alloytools.discourse.group/u/nday)\
**Post date:** [October 25, 2021, 5:57pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/1 "2021-10-25T17:57:56Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![grayswandyr](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/grayswandyr/32/17_2.png) [@grayswandyr](https://alloytools.discourse.group/u/grayswandyr)\
**Post date:** [October 26, 2021, 9:00am UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/2 "2021-10-26T09:00:11Z")

</div>

Sorry, I don’t see what you mean… Can you expand on this?

---

<div class="post-metadata">

**Author:** ![DanielJackson](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/danieljackson/32/80_2.png) [@DanielJackson](https://alloytools.discourse.group/u/DanielJackson)\
**Post date:** [October 26, 2021, 7:00pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/3 "2021-10-26T19:00:28Z")

</div>

Wondering what you mean by “all” not being supported…

---

<div class="post-metadata">

**Author:** ![nday](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nday](https://alloytools.discourse.group/u/nday)\
**Post date:** [October 27, 2021, 5:27pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/4 "2021-10-27T17:27:11Z")

</div>

I see that I posted the wrong code for my question. Sorry! Here is the error message that we are getting.  
 ![Screenshot from 2021-10-27 11-47-19](https://global.discourse-cdn.com/free1/uploads/alloytools/original/1X/eb33fe8aeb322637aa492dbe98e8fdb76e21b71a.png)  
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?

---

<div class="post-metadata">

**Author:** ![nday](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@nday](https://alloytools.discourse.group/u/nday)\
**Post date:** [October 27, 2021, 5:50pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/5 "2021-10-27T17:50:10Z")

</div>

The following code generates the error message above in Alloy 6:

```auto
sig Snapshot{}
pred path{
	all s,s_next | operation[s,s_next]
}

```

We figured out that we needed to add types, but the error message was not very helpful!

---

<div class="post-metadata">

**Author:** ![grayswandyr](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/grayswandyr/32/17_2.png) [@grayswandyr](https://alloytools.discourse.group/u/grayswandyr)\
**Post date:** [October 27, 2021, 8:52pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/6 "2021-10-27T20:52:18Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![DanielJackson](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/danieljackson/32/80_2.png) [@DanielJackson](https://alloytools.discourse.group/u/DanielJackson)\
**Post date:** [November 14, 2021, 6:44pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/7 "2021-11-14T18:44:56Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![rix0rrr](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/rix0rrr/32/102_2.png) [@rix0rrr](https://alloytools.discourse.group/u/rix0rrr)\
**Post date:** [December 5, 2021, 10:32am UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/8 "2021-12-05T10:32:19Z")

</div>

I was bit by the same error message when I wrote (following a tutorial), something like `all x' :`.

Turns out the apostrophe has become illegal to use, but the error message told me I couldn’t use `all`…

---

<div class="post-metadata">

**Author:** ![grayswandyr](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/grayswandyr/32/17_2.png) [@grayswandyr](https://alloytools.discourse.group/u/grayswandyr)\
**Post date:** [December 5, 2021, 2:11pm UTC](https://alloytools.discourse.group/t/loss-of-keyword-all-in-alloy/181/9 "2021-12-05T14:11:13Z")

</div>

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).
