How to bulid a set from an arrary

33 views
Skip to first unread message

LUMING DONG

unread,
Aug 4, 2019, 11:36:12 PM8/4/19
to tlaplus
 Hi, Dear all:

I have a tuple     CliState     for  CLIENT = {"C1","C2","C3"}

CliTypeOK == /\ CliState  \in [CLIENT-> {"PowerOn","Init","wait_Reg_Rslt","work"}]


and I wan to bulid  a  Set  to contain  all the client's currently state in  CLIENT.      What shall I do?

Amir Hossein Sayyad Abdi

unread,
Aug 5, 2019, 1:42:25 AM8/5/19
to tla...@googlegroups.com
Hi,

I think you can use CONSTANTS in your spec. There is an example in [1].


Regards,
AmirHossein

--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/8870a63a-39d7-494e-99e7-508cfc9877cc%40googlegroups.com.

Amir Hossein Sayyad Abdi

unread,
Aug 5, 2019, 1:48:42 AM8/5/19
to tla...@googlegroups.com
Sorry I think this other example is much better [2] and clearer, please observe how the CONSTANT RM and the VARIABLE rmState are being used.


Regards,
AmirHossein

On Mon, Aug 5, 2019, 8:06 AM LUMING DONG <donglu...@gmail.com> wrote:
--
Reply all
Reply to author
Forward
0 new messages