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

Re: [tlaplus] Weak fairness until a majority



One tweak, if `counter` is unbound then it should be

Nodes0 == {n \in Nodes : counter[n] = 0}
NodesInc == {n \in Nodes : counter[n] >= 1}
WF_vars(Card(Nodes0) >= Card(NodesInc) /\ Increment)

On Thu, Dec 8, 2022 at 10:29 AM Stephan Merz <stephan.merz@xxxxxxxxx> wrote:
How about

Nodes0 == {n \in Nodes : counter[n] = 0}
Nodes1 == {n \in Nodes : counter[n] = 1}
WF_vars(Card(Nodes0) > Card(Nodes1) /\ Increment)

Stephan

On 8 Dec 2022, at 13:59, Jack Vanlightly <vanlightly@xxxxxxxxx> wrote:

Hi all,

Let's say that I have an ensemble of nodes and each node has a counter. I have the action Increment which increments the counter of a node, if the value is 0.

Increment == 
    \E n \in Nodes : 
        /\ counter[n] = 0
        /\ counter' = [counter EXCEPT ![n] = @ + 1]

I would like to express weak fairness of Increment, but only while a minority of nodes have incremented their counter. So once a majority have incremented their counter, the weak fairness no longer applies.

Is there a way of defining weak fairness in this way?

Thanks
Jack Vanlightly

--
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/b32e95fb-e3db-4425-84d7-c0392ead61bcn%40googlegroups.com.

--
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/4878083E-8EB0-4BA6-9A9E-2B9E84FBC6A0%40gmail.com.

--
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/CAJ-b8sxdpcYt-NWcU%2BZJ6i2rsV_Jkv46wb9%2B9R8hf_FPUaVgBA%40mail.gmail.com.