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

Re: [tlaplus] Weak fairness until a majority



So if I want to express weak fairness of an action with some conditions, I simply write WF_vars(conditions /\ MyAction)?

On Thursday, December 8, 2022 at 5:44:03 PM UTC+1 hwa...@xxxxxxxxx wrote:
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 <stepha...@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 <vanli...@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+u...@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+u...@xxxxxxxxxxxxxxxx.

--
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/95f9d555-b351-4613-a549-46e2e2cd50c8n%40googlegroups.com.