I am doing composition of automata. So at the end of that, I want to draw the composed automata also. So are there any libraries for that in ocaml? or are there ocaml wrappers written for any graph visualization tool? I have googled for it but didn't get much for ocaml. Any comments on ocamlgraph? I will get more than 100 states in composed automata.
相关问题
- Writing an interpreter in OCaml [closed]
- Using Core.Std.List.fold_left without label
- See if key exists in a String Map
- Passing a string to a C library from OCaml using C
- Initialize Array to Blank custom type OCAML
相关文章
- Android Visualizer class throwing runtime exceptio
- ocaml %identity function
- Functors in Ocaml
- Sankey diagrams in Python
- What is the easiest way to add an element to the e
- How to display the path of a Decision Tree for tes
- Explicit polymorphic type in record
- Visualization of Groups of Poisson random samples
Use ocamlgraph -- it is a graph library that can generate a dot/graphviz file for you but can also do a lot of other stuff that maybe interesting for handling your automata. The library can do fixpoints, spanning trees, graph search, find strongly connected components, etc., etc.
Here is a complete example of some directed graph with labeled edges + module for doing depth-first-search + module for creating dot-representations of it:
with that you can write your program; e.g. something like this:
I would just write automata as text to file (in format suitable for graphviz) and then run graphviz against that file.