Skip to the content ForoHackers
Log inJoin

My TLA+ queue is fine. My robot is waiting for a door with nobody behind it

Concurrency and parallelismFormal methods and verification
#8169 · · Quote · Report

We modelled a worker handing a square of map to another worker. Bounded case, two workers, one slot. Checked that nobody consumed a square twice and that one would eventually be consumed under our scheduling assumption. Nice small green run. On my actual bot both workers stand around admiring an empty doorway.

I found the difference: my spec does "publish square and ring bell" in ONE step. The toy implementation can ring, get interrupted and only then publish. How many of my green ticks would you like to purchase? They're imaginary but very pretty.

#8342 · · Quote · Report

just use a mutex. I have been waiting my whole life to say this in a TLA+ thread and I know fuck all about your door

#8343 · · Quote · Report

Worker hears bell, checks empty slot, goes back to sleep. Square arrives after that. No more bell? That's our loading bay once a week.

#8344 · · Quote · Report

@blunt_pinion Exactly. Yours came with a human who can knock on the office. Mine has been saying "idle" for eleven minutes with a fully populated slot.

#8345 · · Quote · Report

Put the intermediate state in the small model. Also say whether checking the slot and choosing to sleep can be separated. Fixing the order at the producer still leaves a rather interesting afternoon if the consumer can miss the wake-up.

#8348 · · Quote · Report

@en_migi The small version found both. In the second trace the worker actually looked before sleeping; that had been my entire argument in its defence. Rewriting the handoff around a predicate and proper wait now. The word "proved" has quietly left the slides.

#8353 · · Quote · Report

I said mutex and got homework. Nobody warned me about formal methods.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply