Thanks very much again for everyone’s reply. I managed to cobble something that’s basically exactly what I had in mind over past few days.
Below is an attached screenshot for people who might be interested in doing something similar and wondering if very feasible.
(The black bars are not part of the graphics, it’s just for censoring as the program is part of a research project that’s not published yet)
The whole program basically loads a file of some kind, runs a parser over it, then produce a tree.
Some technical details
- Parsing is done on OCaml’s side using mparser
- All core stuff(e.g. AST manipulation, heavy lifting) is done in OCaml
- Was using sigma initially for graphing, but moved to cytoscape. The transition was fairly easy cause the libraries were kept in separate OCaml modules
- Threading and synchronisation is done using Lwt, and some related Lwt modules in js_of_ocaml
Comments on experience
- I.e. Jstable when passed as object, the key has an extra underscore at the end instead of just the raw string you used
- Have an interface on the left side of the screen that shows a tree that you can select nodes, click, drag, move, zoom etc
- Have a control panel on the right side(just a list of buttons with event handlers tied to Lwt threads etc) for opening files, etc