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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b6eb4d0
feat: added cobol_cfg package
NeoKaios Aug 14, 2024
2e609b7
feat: add an Open CFG entry to context menu
NeoKaios Aug 14, 2024
4873d5c
feat: wip cfg with goto stmt
NeoKaios Aug 16, 2024
ac9ddc9
feat: cfg with perform and cleanup
NeoKaios Aug 16, 2024
bb83111
feat: wip improved cfg interaction, started using d3
NeoKaios Aug 23, 2024
8a99331
feat: isolated html and change d3-force layout
NeoKaios Aug 27, 2024
26d309f
feat: goto cfg node from file cursor pos
NeoKaios Aug 27, 2024
4ab800e
feat: add d3-zoom fix coloration when closing cfg
NeoKaios Aug 27, 2024
2ff6a45
refactor: isolate cfg_explorer
NeoKaios Aug 27, 2024
5cf6686
feat: collapse states with fallthrough together
NeoKaios Aug 28, 2024
3353916
feat: improve fallthru, add init state
NeoKaios Aug 29, 2024
a75d747
feat: fix if/goto cfg bug, remove need for ez_subst
NeoKaios Sep 2, 2024
a35b567
feat: added customizable option to generate cfg
NeoKaios Sep 3, 2024
4a5208e
feat: add arc cfg diagram
NeoKaios Sep 5, 2024
52a2fa3
feat: improved arc and add evaluate stmt
NeoKaios Sep 5, 2024
2cd6756
refactor: cleanup and add onclick to arc nodes
NeoKaios Sep 5, 2024
7e0d856
feat: improve on click effect for dot
NeoKaios Sep 6, 2024
06ceeca
feat: added feedback between text_doc and cfg
NeoKaios Sep 6, 2024
b1bc963
refactor: cleanup code
NeoKaios Sep 9, 2024
6594f5c
feat: added possibility to have both arc and graph
NeoKaios Sep 9, 2024
6c65fee
chore: pr review changes
NeoKaios Sep 9, 2024
86a2902
feat: changed split hubs style, refactor dot render
NeoKaios Sep 11, 2024
c60fa74
feat: arrow in arc, click behavior changed, unify string
NeoKaios Sep 11, 2024
2b11227
feat: added legend to both cfg
NeoKaios Sep 12, 2024
7a16e4d
feat: split html and js in separate file
NeoKaios Sep 12, 2024
25cd9b2
refactor: node type in cfg
NeoKaios Sep 16, 2024
d7cb4d3
feat: context menu for nodes with various action
NeoKaios Sep 18, 2024
18fd579
refactor: reorganize cfg module
NeoKaios Sep 18, 2024
8cf289e
feat: call entry support, various improvements
NeoKaios Sep 18, 2024
0e3d953
fix: arc legend and refactor
NeoKaios Sep 19, 2024
4ddd480
feat: add section_name to node for correct color
NeoKaios Sep 19, 2024
e843ab1
refactor: ocp-indent
NeoKaios Sep 19, 2024
d15ed58
feat: add graph title and change 3-hop neighbor
NeoKaios Sep 24, 2024
c867353
feat: new workflow and persistant options
NeoKaios Sep 27, 2024
4c94348
chore: apply suggestions from code review
NeoKaios Oct 1, 2024
7cceb64
fix: interaction between shatter and collapse
NeoKaios Oct 1, 2024
ccf42e1
refactor: review changes and minor bugfixes
NeoKaios Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 21 additions & 7 deletions .drom

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ jobs:

- run: opam pin add . -y --no-action

- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser
- run: opam depext -y superbol-studio-oss superbol-vscode-platform polka-js-stubs interop-js-stubs node-js-stubs vscode-js-stubs vscode-languageclient-js-stubs vscode-json vscode-debugadapter vscode-debugprotocol superbol-free superbol_free_lib superbol_preprocs superbol_project cobol_common cobol_parser cobol_ptree ebcdic_lib cobol_lsp ppx_cobcflags pretty cobol_config cobol_indent cobol_indent_old cobol_preproc cobol_data cobol_typeck cobol_unit ez_toml ezr_toml sql_ast sql_parser cobol_cfg
# if: steps.cache-opam.outputs.cache-hit != 'true'

- run: opam install -y opam/*.opam --deps-only --with-test
Expand Down
2 changes: 1 addition & 1 deletion Makefile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions assets/cfg-arc-renderer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<!-- Base html file used to render arc cfg variant -->
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v7.min.js"></script>
</head>
<body>
<h2 id="title">Title</h2>
<div id="buttons">
<button onclick="toggleLegend()">Toggle Legend</button>
</div>
<div id="legend" class="hidden"></div>
<div id="graph"></div>
</body>
29 changes: 29 additions & 0 deletions assets/cfg-arc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
html, body {
height: 100%;
}
text {
font: 12px monospace;
pointer-events: none;
}
svg {
background-color: white;
}
path {
animation: dash 1.5s linear infinite;
animation-play-state: paused;
}
.animated {
animation-play-state: running;
}

@keyframes dash {
to {
stroke-dashoffset: -51; // lcm of sum of dasharray values to avoid flicker
}
}
.hidden {
display: none !important;
}
#title {
margin-block: .2em;
}
Loading
Loading