Re: [tlaplus] Why this TLA spec runs into stuttering state?

100 views
Skip to first unread message

Hillel Wayne

unread,
Nov 29, 2024, 5:40:10 AM11/29/24
to tla...@googlegroups.com

If you remove the liveness property, does TypeOk still pass? Does NotSolved?

On 11/28/2024 5:40 PM, Anthony Lee wrote:
Hi all,
I have created a TLA spec to try 8 Queens problem.
It runs into stuttering state after several steps even when the Spec action has Strong Fairness setting.

Could anyone take a look and give me some hint?
Thanks.
Anthony
--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tlaplus/570a80f0-0929-4f17-90ec-d23400aac344n%40googlegroups.com.

Stephan Merz

unread,
Nov 29, 2024, 7:47:16 AM11/29/24
to tla...@googlegroups.com
The liveness property asserts that every run of the algorithm eventually leads to a solution. Instead, you certainly want to check that a solution exists, in other words that there exists a run that leads to a solution. However, I notice that on my side, the invariant NotSolved holds (for TOTAL = 4)?

Stephan

On 29 Nov 2024, at 00:40, Anthony Lee <antho...@gmail.com> wrote:

Hi all,
I have created a TLA spec to try 8 Queens problem.
It runs into stuttering state after several steps even when the Spec action has Strong Fairness setting.

Could anyone take a look and give me some hint?
Thanks.
Anthony

--
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...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/tlaplus/570a80f0-0929-4f17-90ec-d23400aac344n%40googlegroups.com.
<8Queens.cfg><8Queens.tla>

Anthony Lee

unread,
Nov 29, 2024, 8:39:34 PM11/29/24
to tlaplus
@Stephan
   Yes, you're right. A bug in my code which checks if a position is valid caused this stuttering -- actually in this case it is a real deadlock but I has been reading too much things about fairness and stuttering so that I didn't verify my code enough.

@Hillel,
   Yes, I did that and both passed, but it is false positive.

Now I wonder if there is a way to get all counter-examples.

Abhishek Singh

unread,
Dec 3, 2024, 3:27:02 AM12/3/24
to tla...@googlegroups.com
Please check the definition of SameDiagonal. Diagonals lie on x+y = constant and x-y = constant.

-Abhishek

Anthony Lee

unread,
Dec 6, 2024, 4:42:52 PM12/6/24
to tlaplus
Hi Abhishek,
Yes, that's the bug in the spec that made TLC runs into stuttering state.

Thanks.
Anthony
Reply all
Reply to author
Forward
0 new messages