Coder Social home page Coder Social logo

erlesy's Introduction

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

  • OTP 19
  • rebar3 accessible via path

Building

rebar3

ErlEsy can be build by rebar3

rebar3 get-deps rebar3 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 | plantuml) -> ok. otp_parser:create_graph(FileName, IncludeFiles, Mode).

  • FileName should be a path to the .erl file you want to graph
  • IncludeFiles is a list of paths towards include files
  • Mode is dot or plantuml

Output and graphing

ErlEsy currently supports two forms of output, a DOT (.gv) formatted file, or PlantUML

DOT

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

PlantUML

PlantUML file can be used e.g. at https://www.plantuml.com/plantuml/uml/SyfFKj2rKt3CoKnELR1Io4ZDoSa70000

Example

Suppose your project structure is

  • project/src/your_fsm.erl: The FSM or statem you want to graph
  • project/include/: Path to include files used by the fsm

Then execute the following in the erlesy folder:

  • make shell
  • otp_parser:create_graph("/absolute_path_to_project/project/src/your_fsm.erl",["/absolute_path_to_project/project/include/"], dot].

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

erlesy's People

Contributors

albsch avatar haljin avatar lrascao avatar ngunder avatar ruanpienaar avatar sebastiw avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.