Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for COBOL CFG display with graphviz and d3 #368

Open
wants to merge 37 commits into
base: master
Choose a base branch
from

Conversation

NeoKaios
Copy link
Contributor

@NeoKaios NeoKaios commented Sep 9, 2024

  • Adds ocaml-graph dependency to generated a dot graph of the CFG of a COBOL program / section
  • Adds 2 commands to acces a dot svg graph and a arc-reprensentation of the CFG via Vscode webviews
  • Adds context menus to access those graphs

src/lsp/cobol_cfg/cfg_builder.ml Outdated Show resolved Hide resolved
src/lsp/cobol_lsp/lsp_request.ml Outdated Show resolved Hide resolved
src/lsp/superbol_free_lib/vscode_extension.ml Outdated Show resolved Hide resolved
src/lsp/cobol_cfg/cobol_cfg.ml Outdated Show resolved Hide resolved
assets/cfg-dot-renderer.html Outdated Show resolved Hide resolved
assets/cfg-dot-renderer.html Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure to see what .html file in assets is actually used: could you add a comment in them to describe what they are used for? Also they possibly need a license header (at least those with code I think).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one ? OCAMLPRO-NON-COMMERCIAL license ?

assets/cfg-dot-renderer.html Outdated Show resolved Hide resolved
assets/cfg-dot-renderer.html Outdated Show resolved Hide resolved
src/lsp/cobol_cfg/cfg_jumps.ml Show resolved Hide resolved
src/lsp/cobol_cfg/cfg_builder.mli Show resolved Hide resolved
src/lsp/cobol_cfg/cfg_builder.mli Outdated Show resolved Hide resolved
src/lsp/cobol_cfg/cfg_builder.ml Outdated Show resolved Hide resolved
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only skimmed through this file, which appears fine as a draft. Some changes will be needed (possibly later) to avoid doing the actual export in this library (which should mostly be about internal CFG representation and construction, with possibly a Cobol_cfg.As_dot module which may be helpful in other contexts).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants