How to visualize an Erlang gen_fsm [closed]
Asked Answered
E

3

9

Do you know of any existing tool to graphically render the diagram of an Erlang gen_fsm starting from the source code?

Erk answered 8/2, 2010 at 10:25 Comment(0)
W
1

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.

Windcheater answered 8/2, 2010 at 16:21 Comment(0)
C
2

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:

http://www.trapexit.org/forum/viewtopic.php?p=44468

Cattleman answered 8/2, 2010 at 16:20 Comment(1)
Thanks to Internet Archive (web.archive.org/web/20111105111111/http://www.trapexit.org/…) I managed to find the mentioned tools - see github.com/lavrin/graph_draw and erlang.org/pipermail/erlang-questions/2001-October/003717.html. I'm not sure yet whether they're of any use.Meneses
C
2

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.

Cattleman answered 8/2, 2010 at 16:30 Comment(0)
W
1

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.

Windcheater answered 8/2, 2010 at 16:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.