erlesy

ErlEsy is a simple graphing tool for Erlang. It allows for automatic generation of state machine diagrams out of Erlang source files. It works by parsing an .erl source file and building a digraph out of it. The digraph can be then transformed into any format that will allow for its graphical representation.

Dependencies

Building

rebar3

ErlEsy can be build by rebar3

rebar3 get-depsrebar3 compile

make

You can also use the makefile, with these directives: make compile - fetches deps and compiles erlesy make shell - starts a erlesy shell

Running

To run ErlEsy open a shell with

make shell

Then you can create any file by using

-spec create_graph(string(), [string()], dot) -> ok.otp_parser:create_graph(FileName, IncludeFiles, Mode).

Output and graphing

ErlEsy currently supports one form of output, a DOT (.gv) formatted file.

DOT

DOT file can be used e.g. at http://www.webgraphviz.com/

Example

Suppose your project structure is

Then execute the following in the erlesy folder:

This will create a .gv dot file in the same folder the source is located in.