[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*From*: Stephan Merz <stephan.merz@xxxxxxxxx>*Date*: Mon, 1 Nov 2021 19:21:19 +0100*Ironport-hdrordr*: A9a23:BkAHnaumZVwj9XlYCBRM3TJg7skCQ4Mji2hC6mlwRA09T+WxjMqunOsW2FvdlV8qKSwdcLG7SdO9qBznhOJICOMqUYtKYjOW+VdAQLsSlrcLLVXbanfDHsA079YmT0FVMqy1MbDj5vyKuzVRKr4bsYG6GErBv5aZ854Vd3AyV0gf1XYHNu/rKDwKeOAcP+t4ZdmhD6N8zlLKExtnDbXYdxx1O5ml1qS77K4OByR2SyLPxzP+zw9Ag4SKXiRwsC1uLQ+mTtoZgBi14DAQ2M+Ywr6GI2fnph7uxqUTvNvl19dZCMHksLlmW0DRY2uTCbiIUNe5zX4ISfmUhmrCiuOsn/4/BaROwkKUQWmxoRbkxgnn13Ik+xbZuBWlaKTY0KrEbQN/CI5KhIBcehvdr2Ymo9141rtT0wuixu4nei/orWD/o9LIVRVjlk/xm3AliuJ7tQ0oIMIjQY4UrsgU/UFQGJcEWBjm4J06CoBVfYmsr8p+QBecaTTQpWNvwMOhN05DWyu7fg==*References*: <3c62cdf2-6ed4-4d1f-ae25-529bc6616cben@googlegroups.com> <CAEPrOmK_+GU5Wn78xJEftQRK8tKWxQODuEiw4q+B5sk+OfdJMg@mail.gmail.com> <21d17d43-ecfc-4812-96d7-b83f03056f35n@googlegroups.com>

If you need the element elsewhere in the definition of the action that removes it from the set, you can write LET e == CHOOSE x \in set : TRUE IN /\ set' = set \ {e} /\ \* remainder of the action If you need e in a different action later in the execution, you will need to represent it as a state variable and you can write /\ e' = CHOOSE x \in set : TRUE /\ set' = set \ {e} /\ ... Note that CHOOSE picks an arbitrary but fixed element from the set: if the set contains {1,2,3} then TLC will generate one successor state in which the chosen element (say, 1) has been removed. If you wish to model check your system for all possible choices of elements, use an existential quantifier as in \E e \in set : set' = set \ {e} In the above example, TLC will explore three successor states corresponding to removing each of the elements. Stephan
You received this message because you are subscribed to the Google Groups "tlaplus" group. To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx. To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/8AD659AF-D1F0-448C-ACAB-5FD773CD71E9%40gmail.com. |

**Follow-Ups**:**Re: [tlaplus] Removing item taken from CHOOSE***From:*thomas...@xxxxxxxxx

**References**:**[tlaplus] Removing item taken from CHOOSE***From:*thomas...@xxxxxxxxx

**Re: [tlaplus] Removing item taken from CHOOSE***From:*Alex Weisberger

**Re: [tlaplus] Removing item taken from CHOOSE***From:*thomas...@xxxxxxxxx

- Prev by Date:
**Re: [tlaplus] Removing item taken from CHOOSE** - Next by Date:
**Re: [tlaplus] Removing item taken from CHOOSE** - Previous by thread:
**Re: [tlaplus] Removing item taken from CHOOSE** - Next by thread:
**Re: [tlaplus] Removing item taken from CHOOSE** - Index(es):