“Suppose we have a revolving door with 4 compartments, each taking up 90 degrees, like in the picture below. There are sensors both inside and outside the building. If a sensor detects a person approaching, the door starts turning. It will turn exactly 180 degrees, and then stop. Is this door safe to use?”
This exercise comes from a course on concurrency and distributed systems that I used to teach at Oxford. Students would build a model and then check for deadlocks with a model checker. But of course it is way more fun to check this in real life. So when I realised that the revolving doors at ITU were programmed in this exact way, I proceeded to test if I could get myself stuck, and I succeeded. Of course, I had to test if it was not just a fluke. So I tried it again, and succeeded once more. I must have looked like a lunatic walking around in a revolving door, but I was doing it for science! Can you figure out how I got myself stuck?