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

[tlaplus] Finite State Machine Visualization



As I have gone through the video lectures, the TLA+ book, and the additional papers that Lamport has written on TLA, it really clicked with me that the what is being described mathematically is a finite state machine FSM (or rather a nested set of FSMs for non-trivial specs). It should be possible to produce a visualization of the FSM(s) directly from the TLC+ spec.

This idea seemed so obvious to me that I Googled and also searched the tlaplus group here to find who had already done this. So far I've found you can get a visualization of the state search space, which is cool, but it's pretty useless for anything non-trivial. No, what I'm thinking is more useful is being able to see the spec itself as a graph. Then, of course, you can go the other way: build a spec by drawing the FSM and filling in the state and action descriptions using TLA+ expressions. 

So, just wanted to check with the group - has this been done already?

One advantage I got to visualizing the FSM based on a specification (I did this by hand): I found some enabling conditions missing from two action definitions in the example model given in the video lectures for the TwoPhase spec which did not technically affect the correctness, but after filling them in reduced by 25% the number of states searched. Fairly significant reduction - but depends - since the BFS can generate potentially exponentially many state paths. That said, the additional conditions added made the model easier to understand - which is a positive.

It makes me thing there is some potential for a "linter" that could catch such things in a TLA spec, and being able to build a specification graphically might help make it more accessible for other team members when creating a new protocol/algorithm.

Just a thought. Would appreciate any pointers to WIP on this kind of thing. Thanks!



 

--
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 post to this group, send email to tlaplus@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/tlaplus.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/38cefe08-7c71-4114-9386-65e73ae729d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.