Hello, in order to select the elements of a message buffer whose first item equals a given key, you can define the operator FilterMsgID(buf, key) == { msg \in buf : msg[1] = key } Your attempt does not work for multiple reasons, concerning TLC the most fundamental one is that your action does not assign a new value to the variable Rcv. Remember that TLC interprets as assignments formulas of the form Rcv' = ... or Rcv' \in ... You can use the operator FilterMsgID above in the definition of an action, for example Rcv' = FilterMsgID(Rcv, "c1") or Rcv' = Rcv \ FilterMsgID(Rcv, "c1") etc., depending on what your intended application is. I suggest that you separate the definition of an action and the definition of operators such as the one above: this will make your specification much more readable. Hope this helps, Stephan P.S.: Please do not attach files to messages sent to the group unless absolutely necessary, such as a screenshot of the Toolbox if you report a putative Toolbox problem that would be too hard to describe in a text message. -s
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/1D5236BD-167C-4A12-9B69-B82D3F9B1032%40gmail.com. |