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

[tlaplus] Generating records like functions



Hello, I'm new to TLA+ and trying to learn it.

I know that I can generate a set of all possible functions by writing

[{"A", "B"} -> {0, 1}] \* all functions from {"A", "B"} to {0, 1}

I'm wondering if there is a similar way for records?

For example, if I have a record that most of its fields is BOOLEAN, I'm wondering if I can write something like

mstatus \in [{SD, TSR, TW, TVM}: BOOLEAN] \* THIS DOES NOT WORK

Or is there a way to specify a function with different range for different domain?

e.g: f["x"] \in {0,1} f["y"] \in {4, 5}

Thanks,
jwnhy.

--
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/9aaa082e-b2ae-4503-a6d8-76ccfe962702n%40googlegroups.com.