Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Call graph generator for OCaml or Reason

I want to analyze a OCaml/Reason code repository and understand calls between various functions. Is there a tool that provides such functionality?

like image 363
xennygrimmato Avatar asked Dec 24 '22 02:12

xennygrimmato


2 Answers

I actually never used it but only thing I can remember for OCaml is pfff. Readme says that it supports codemaps and codegraphs.

like image 189
Kakadu Avatar answered Jan 26 '23 01:01

Kakadu


One of the option is to take advantage of the existing OCaml editors or IDE since you can re-use their parsers to obtain the parsed tree or AST tree. I'm aware of two relatively good IDE for OCaml, which are:

  • OcaIDE (written in Java)

  • Merlin (written in OCaml)

like image 30
Trung Ta Avatar answered Jan 26 '23 01:01

Trung Ta