The following is a question about how to implement a certain piece of TLA+ in Rust, Python, Java Or Go (any language will do, I just need to get my head around it):
I am implementing the algorithm ewd687a/EWD687aPlusCal.tla from the Specifications listed on GitHub for the TLAExamples repo. I am having difficulty describing the TLA+ statement for the network in Rust (see below):
This is the statement in the spec and the part I find tricky is: msg->[snd \in Node |-> 0]:
(* For every node we keep the following counters:
- number of base messages received, per sending node