Hacker News new | ask | show | jobs
by spinningslate 60 days ago
> But I think it corresponds to 8 separate states in an FSM (or statechart? not sure)

In a conventional FSM yes but not a statechart. Statecharts support parallel regions within a single state. You’d have 3 regions for your example: one waiting for each person. There would be 4 states total: one to wait on each person, each in its own region, plus the superstate. The superstate would exit when all 3 “waiting for person <x>” sub states exited, independent of their sequence.

I’m with you on Petri nets though, very helpful for modelling concurrent behaviour.

1 comments

Thanks to the both of you. I have always just stuck to plain old Control Flow Diagrams, which can be quite tricky to get all the nuances of a FSM. Always been interested to commit to using Statecharts or PetriNets, but I think the usefulness of concurrency tips it over the edge… To Amazon I go