Do you know of any existing tool to graphically render the diagram of an Erlang gen_fsm starting from the source code?
The next-state in gen_fsm can be a computed value that static source analysis would not be able to find out in the general case.
Of course; with type annotations it would be possible, but then you could just as well write down your state transitions explicitly to generate your .dot
file from.
This forum post ("I would like to try some tool than link gen_fsm (or other erlang FSM) and dot (graphviz) file.") might be of use to you:
When you say you want to analyze the source code of an Erlang program, it made me wonder if you were by chance interested in dependency analysis of your program itself. (You might only care to analyze the FSM that you are writing, but I wanted to double check).
If so, Erlang's Xref - The Cross Reference Tool, might be of interest.
I'm a new user, so I can't post another hyperlink, but if you search for "erlang xref graphviz" you will find a post on erlang.org where Ulf W describes connecting Xref to GraphViz.
The next-state in gen_fsm can be a computed value that static source analysis would not be able to find out in the general case.
Of course; with type annotations it would be possible, but then you could just as well write down your state transitions explicitly to generate your .dot
file from.
© 2022 - 2024 — McMap. All rights reserved.