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

Merged
merged 40 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 39 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c14456f
feat: added cobol_cfg package
NeoKaios Aug 14, 2024
3beba63
feat: add an Open CFG entry to context menu
NeoKaios Aug 14, 2024
d022d2b
feat: wip cfg with goto stmt
NeoKaios Aug 16, 2024
02b263c
feat: cfg with perform and cleanup
NeoKaios Aug 16, 2024
09062a0
feat: wip improved cfg interaction, started using d3
NeoKaios Aug 23, 2024
47540eb
feat: isolated html and change d3-force layout
NeoKaios Aug 27, 2024
287d945
feat: goto cfg node from file cursor pos
NeoKaios Aug 27, 2024
b7a9103
feat: add d3-zoom fix coloration when closing cfg
NeoKaios Aug 27, 2024
50a77e5
refactor: isolate cfg_explorer
NeoKaios Aug 27, 2024
b4f4aec
feat: collapse states with fallthrough together
NeoKaios Aug 28, 2024
3fef39a
feat: improve fallthru, add init state
NeoKaios Aug 29, 2024
d92a5c5
feat: fix if/goto cfg bug, remove need for ez_subst
NeoKaios Sep 2, 2024
bfd1f07
feat: added customizable option to generate cfg
NeoKaios Sep 3, 2024
c44e214
feat: add arc cfg diagram
NeoKaios Sep 5, 2024
e07fd90
feat: improved arc and add evaluate stmt
NeoKaios Sep 5, 2024
25b6572
refactor: cleanup and add onclick to arc nodes
NeoKaios Sep 5, 2024
6796108
feat: improve on click effect for dot
NeoKaios Sep 6, 2024
aa34b8d
feat: added feedback between text_doc and cfg
NeoKaios Sep 6, 2024
3ba939a
refactor: cleanup code
NeoKaios Sep 9, 2024
32d22c0
feat: added possibility to have both arc and graph
NeoKaios Sep 9, 2024
e2b4494
chore: pr review changes
NeoKaios Sep 9, 2024
66ae5f1
feat: changed split hubs style, refactor dot render
NeoKaios Sep 11, 2024
3c71a23
feat: arrow in arc, click behavior changed, unify string
NeoKaios Sep 11, 2024
fbb1b76
feat: added legend to both cfg
NeoKaios Sep 12, 2024
7f2d143
feat: split html and js in separate file
NeoKaios Sep 12, 2024
798d102
refactor: node type in cfg
NeoKaios Sep 16, 2024
1f2c418
feat: context menu for nodes with various action
NeoKaios Sep 18, 2024
c20b4f3
refactor: reorganize cfg module
NeoKaios Sep 18, 2024
70d97ec
feat: call entry support, various improvements
NeoKaios Sep 18, 2024
1eee79e
fix: arc legend and refactor
NeoKaios Sep 19, 2024
5553088
feat: add section_name to node for correct color
NeoKaios Sep 19, 2024
c3c3fb4
refactor: ocp-indent
NeoKaios Sep 19, 2024
ef42007
feat: add graph title and change 3-hop neighbor
NeoKaios Sep 24, 2024
1d54ebe
feat: new workflow and persistant options
NeoKaios Sep 27, 2024
90794c2
chore: apply suggestions from code review
NeoKaios Oct 1, 2024
888cd5c
fix: interaction between shatter and collapse
NeoKaios Oct 1, 2024
a3d4346
refactor: review changes and minor bugfixes
NeoKaios Oct 2, 2024
617734a
fix: licence, isolate cfg_types, rename shatter
NeoKaios Oct 22, 2024
a7e56e6
docs: adding note about id list
NeoKaios Oct 22, 2024
56546b2
chore: updated CHANGELOG
NeoKaios Oct 22, 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
32 changes: 26 additions & 6 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.

27 changes: 27 additions & 0 deletions assets/cfg-arc-renderer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!-- ----------------------------------------------------------------------- -->
<!-- -->
<!-- SuperBOL OSS Studio -->
<!-- -->
<!-- -->
<!-- Copyright (c) 2024 OCamlPro SAS -->
<!-- -->
<!-- All rights reserved. -->
<!-- This source code is licensed under the MIT license found in the -->
<!-- LICENSE.md file in the root directory of this source tree. -->
<!-- -->
<!-- ----------------------------------------------------------------------- -->

<!-- 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>
43 changes: 43 additions & 0 deletions assets/cfg-arc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/* -----------------------------------------------------------------------
*
* SuperBOL OSS Studio
*
*
* Copyright (c) 2024 OCamlPro SAS
*
* All rights reserved.
* This source code is licensed under the MIT license found in the
* LICENSE.md file in the root directory of this source tree.
*
* -----------------------------------------------------------------------
*/

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