All Projects → state-machines → state_machines-graphviz

state-machines / state_machines-graphviz

Licence: MIT License
Graphviz module for state machines

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to state machines-graphviz

laraflow
State machine and workflow package for Laravel Eloquent
Stars: ✭ 52 (+92.59%)
Mutual labels:  state-machine
xstate-viz
Visualizer for XState machines
Stars: ✭ 274 (+914.81%)
Mutual labels:  state-machine
examples
YAKINDU Statechart Tools examples
Stars: ✭ 20 (-25.93%)
Mutual labels:  state-machine
cl-dot
Common Lisp package for generating GraphViz (dot) files
Stars: ✭ 24 (-11.11%)
Mutual labels:  graphviz
statemachine-go
🚦 Declarative Finite-State Machines in Go
Stars: ✭ 47 (+74.07%)
Mutual labels:  state-machine
graphviz network
Creating network diagrams with Graphviz
Stars: ✭ 72 (+166.67%)
Mutual labels:  graphviz
DecisionTrees
A python implementation of the CART algorithm for decision trees
Stars: ✭ 38 (+40.74%)
Mutual labels:  graphviz
spark-sql-flow-plugin
Visualize column-level data lineage in Spark SQL
Stars: ✭ 20 (-25.93%)
Mutual labels:  graphviz
ember-fsm
[Maintenance Mode] A promise-aware finite state machine implementation for Ember
Stars: ✭ 37 (+37.04%)
Mutual labels:  state-machine
spring-statemachine-learning
spring-statemachine 学习记录
Stars: ✭ 84 (+211.11%)
Mutual labels:  state-machine
aerial autonomy
Easily extendable package for interacting with and defining state machines for autonomous aerial systems
Stars: ✭ 22 (-18.52%)
Mutual labels:  state-machine
useStateMachine
The <1 kb state machine hook for React
Stars: ✭ 2,231 (+8162.96%)
Mutual labels:  state-machine
typed-machine
A strict Finite State Machine, written in TS
Stars: ✭ 21 (-22.22%)
Mutual labels:  state-machine
pyrfidhid
Python library to control Chinese USB HID 125Khz RFID Reader/Writer
Stars: ✭ 104 (+285.19%)
Mutual labels:  state-machine
golib
Open version of common golang libraries useful to many projects.
Stars: ✭ 47 (+74.07%)
Mutual labels:  state-machine
SMACC2
An Event-Driven, Asynchronous, Behavioral State Machine Library for ROS2 (Robotic Operating System) applications written in C++
Stars: ✭ 58 (+114.81%)
Mutual labels:  state-machine
xstate-catalogue
Professionally designed, interactive state machines
Stars: ✭ 616 (+2181.48%)
Mutual labels:  state-machine
pathway-mapper
PathwayMapper: An interactive and collaborative graphical curation tool for cancer pathways
Stars: ✭ 47 (+74.07%)
Mutual labels:  graphviz
vscode-interactive-graphviz
Interactive Graphviz Dot Preview for Visual Studio Code
Stars: ✭ 57 (+111.11%)
Mutual labels:  graphviz
xstate-cpp-generator
C++ State Machine generator for Xstate
Stars: ✭ 33 (+22.22%)
Mutual labels:  state-machine

StateMachines::Graphviz

This adds support for generating di-graphs based on the events, states, and transitions defined for a state machine using GraphViz.

Installation

Add this line to your application's Gemfile:

gem 'state_machines-graphviz' , group: :development

And then execute:

$ bundle

Or install it yourself as:

$ gem install state_machines-graphviz

Usage

The default output folder for the images is doc/state_machines.

Examples

To generate a graph for a specific file / class:

rake state_machines:draw FILE=vehicle.rb CLASS=Vehicle

From a Rails app directory:

rake state_machines:draw CLASS=Vehicle

To save files to a specific path:

rake state_machines:draw FILE=vehicle.rb CLASS=Vehicle TARGET=files

To customize the image format / orientation:

rake state_machines:draw FILE=vehicle.rb CLASS=Vehicle FORMAT=jpg ORIENTATION=landscape

See http://rdoc.info/github/glejeune/Ruby-Graphviz/GraphViz/Constants for the list of supported image formats. If resolution is an issue, the svg format may offer better results.

To generate multiple state machine graphs:

rake state_machines:draw FILE=vehicle.rb,car.rb CLASS=Vehicle,Car

To use human state / event names:

rake state_machines:draw FILE=vehicle.rb CLASS=Vehicle HUMAN_NAMES=true

Note that this will generate a different file for every state machine defined in the class. The generated files will use an output filename of the format #{class_name}_#{machine_name}.#{format}.

For examples of actual images generated using this task, see those under the examples folder.

Interactive graphs

Jean Bovet's Visual Automata Simulator is a great tool for "simulating, visualizing and transforming finite state automata and Turing Machines". It can help in the creation of states and events for your models. It is cross-platform, written in Java.

Contributing

  1. Fork it ( https://github.com/state-machines/state_machines-graphviz/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].