# questions about Alloy coding and instances

**URL:** <https://alloytools.discourse.group/t/questions-about-alloy-coding-and-instances/352>\
**Category:** Uncategorized\
**Created:** [June 6, 2023, 8:12am UTC](https://alloytools.discourse.group/t/questions-about-alloy-coding-and-instances/352 "2023-06-06T08:12:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Najihah](https://avatars.discourse-cdn.com/v4/letter/n/bcef8e/32.png) [@Najihah](https://alloytools.discourse.group/u/Najihah)\
**Post date:** [June 6, 2023, 8:12am UTC](https://alloytools.discourse.group/t/questions-about-alloy-coding-and-instances/352/1 "2023-06-06T08:12:51Z")

</div>

questions about Alloy coding and instances

```auto
module ORparticipant

abstract sig participant {}
lone sig participant1 extends participant {verb1: lone event1, verb2: lone event2}
{(#verb1=1 or #verb2=1)}

lone sig participant2 extends participant {verb3: lone event1, verb4: lone event2}
{(#verb3=1 or #verb4=1)} 

-------------------------------------------------------------------------------------------------------
abstract sig event {}
one sig event1 extends event{}

one sig event2 extends event{}

pred showORparticipant{}
run showORparticipant{}

```

Above is the coding that I have applied. My question is, why there is instance such as (participant 1 verb 1 event 1 and participant 2 verb event1 and event2 (they shown together in one instance))

I would like to have instance only:  
participant 1 verb event 1  
participant 1 verb event 2  
participant 1 verb event 1 and event 2  
participant 2 verb event 1  
participant 2 verb event 2  
participant 2 verb event 1 and event 2  
participant 1 and participant 2 verb event 1  
participant 1 and participant 2 verb event 2  
participant 1 and participant 2 verb event 1 and event 2

there will be only 9 instances (possibility) since I would like to run an alternative choice (inclusive choice, OR)

EDIT by @grayswandyr: please use 3-backtick delimiters for code

---

<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:** [June 6, 2023, 8:23am UTC](https://alloytools.discourse.group/t/questions-about-alloy-coding-and-instances/352/2 "2023-06-06T08:23:47Z")

</div>

I’m not sure to understand. Are you asking why you’re getting and instance such that this run holds:

```auto
run {
some participant1
some participant2
some verb1
some verb2
}

```

?

`#verb1=1` should rather be written `one verb1` (or `some verb1` if you already know that `cerb1` has been declared as `lone`).

Did you rather mean `one (verb1 + verb2)` perhaps?
