2

I am doing composition of two automaton (Actually it is a transducer). So at the of it, I want to visually represent it to analyze it.

Which is the best tool/library for the same?

People have suggested me dot and graphviz. Which is better? I am writing code in OCaml. Does that have any library to draw that?

This is an example transducer which I want to draw?

enter image description here

user1280282
  • 303
  • 4
  • 12
  • This answer contains some LaTeX code for drawing an automaton: http://stackoverflow.com/questions/26310253/what-fsm-captures-only-binary-strings-that-have-the-same-number-of-01-and-10/27712372#27712372 – jub0bs Dec 30 '14 at 21:44

2 Answers2

5

People have suggested me dot and graphviz. Which is better?

There is no better - graphviz uses graphs in the dot language as input (and output among others), and has a layout command called dot which lays out directed graphs.

I am writing code in OCaml. Does that have any library to draw that?

I don't know OCaml, but it looks like there is ocamlgraph which is able to create the dot graphs - see also this similar question. It also looks like there are graphviz ocaml extensions available for some platforms.

This is an example transducer which I want to draw?

Not sure what the question is, but this graph looks like it has been made with graphviz.

Community
  • 1
  • 1
marapet
  • 54,856
  • 12
  • 170
  • 184
2

If you want high-quality renderings I suggest to generate dot files and then try dot2tex (never used it though) to generate PGF/TikZ to use with LaTeX. Here a few examples of TikZ automata renderings.

Daniel Bünzli
  • 5,119
  • 20
  • 21