# What does "expect 1" mean?

**URL:** <https://alloytools.discourse.group/t/what-does-expect-1-mean/308>\
**Category:** Questions\
**Created:** [December 12, 2022, 9:39pm UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308 "2022-12-12T21:39:45Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianhicks](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/brianhicks/32/5_2.png) [@brianhicks](https://alloytools.discourse.group/u/brianhicks)\
**Post date:** [December 12, 2022, 9:39pm UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308/1 "2022-12-12T21:39:45Z")

</div>

When you open up Alloy, the default `run` in the menu is “Run Default for 4 but 4 int, 4 seq expect 1.” I know what `for 4` and `but 4 int` mean but I don’t know what “expect 1” means! Further, it doesn’t look like [the spec](http://alloytools.org/spec.html) mentions it at all. Does anyone here know?

---

<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:** [December 12, 2022, 10:31pm UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308/2 "2022-12-12T22:31:00Z")

</div>

We introduced the expect clause to support a kind of regression test script: `expect N` would mean that when you run the command, you expect N solutions. It turned out that counting solutions was too dependent on symmetry and other settings, so we reverted to 1 and 0 as the options. So` expect 1` means that the command is expected to produce an instance; `expect 0` means that no instances are expected.

---

<div class="post-metadata">

**Author:** ![brianhicks](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/brianhicks/32/5_2.png) [@brianhicks](https://alloytools.discourse.group/u/brianhicks)\
**Post date:** [December 12, 2022, 10:43pm UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308/3 "2022-12-12T22:43:20Z")

</div>

Oh, how interesting! Is that useful for normal model authors in any way, or only for folks working on developing Alloy?

---

<div class="post-metadata">

**Author:** ![alcino](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/alcino/32/25_2.png) [@alcino](https://alloytools.discourse.group/u/alcino)\
**Post date:** [December 13, 2022, 6:43am UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308/4 "2022-12-13T06:43:26Z")

</div>

I find it very useful, since when I make some changes to a model I can just select Execute All and check if everything still executes “as expected”.

---

<div class="post-metadata">

**Author:** ![NganTran-0017](https://yyz2.discourse-cdn.com/free1/user_avatar/alloytools.discourse.group/ngantran-0017/32/250_2.png) [@NganTran-0017](https://alloytools.discourse.group/u/NganTran-0017)\
**Post date:** [May 10, 2026, 6:23am UTC](https://alloytools.discourse.group/t/what-does-expect-1-mean/308/6 "2026-05-10T06:23:45Z")

</div>

Hello,

I’m using `expect` in my `run` commands. However, the CLI Alloy Analyzer produces the same result regardless of the use of `expect`. Is there any way I can show the result of a command as SAT when it produces no instance, as expected?

Ps: I’m using Alloy-6-2.0

Thank you!
