I would like to be able to use a tool that lets you visualize a program's control flow(s) in the context of its source code. To clarify, such a tool should basically show what happens in a program by spitting out a human-readable abstract syntax tree in the form of a multidigraph with nodes containing snippets of source-code translation units. The resulting graph initial node would, I presume, contain the block of code starting with a program's entry point (that'd be main for a C or C++ program.) New nodes would be created when a node needs to reference another block of code, whether that might be in the current file or in another one, and arrows would connect the nodes. Does such a tool exist, or would it have to be created from scratch?
Does a Tool for Automatically Visualizing a Project's Source Code's Control Flow In-Line Exist?
657 Views Asked by RandomDSdevel At
1
There are 1 best solutions below
Related Questions in STATIC-ANALYSIS
- Ansible role analysis with Checkov - facts evaluation?
- Flutter SonarQube: "The main branch has no lines of code."
- the expressionType and includePath of CDT parser
- Adding entry to program header table
- Static checker that number of arguments to python logging matches number of placeholders
- Why am I getting this error when using dataflow in Codeql
- How to disallow exception to curly_braces_in_flow_control_structures linter rule in dart?
- Security scan flagged local variable for heap inspection in C Function
- Is it possible to use Eclipse JDT static analysis for null annotations when compiling from the command line?
- Remove directory from sonar analyzer
- Sonar qube issue in using aes-256-cbc algoritm, stating Make sure that encrypting data is safe here
- Programming language/library that uses dataflow analysis to fetch only required data from the database
- Export comments from Fortify Software Security Center
- Changing lint configuration based on Cargo profile
- Can I reproduce eslint's "prefer-object-spread" rule using ast-grep?
Related Questions in DOCUMENTATION-GENERATION
- Sphinx warning: Failed to import test.test_adder from module `pythontemplate`
- Documentation generation via python docstrings
- how can i Automate documentation in my CI/CD pipeline or through my project workflow (java) ? documentation generator for the whole process?
- Take docs files from multiple folders to build Docusaurus
- Is there a way to generate asciidocs from application.properties in Quarkus?
- how can i hide certain parts of a function signature from doxygen?
- is it possible to generate documentation for anonymous classes in rdoc
- how to document function templates with `requires` clauses and `static_assert`s?
- I can't put text like [static] on the right side of the page for a certain function in doxygen
- Sphinx still generating documentation for test folders despite exclusion in conf.py
- deploy project documentation to gitlab wiki using CI/CD pipeline
- Automate Process Documentation for Boomi
- Templating based on Nunjucks with live preview and export capabilities for non coders - Open source solutions?
- code documentation with calls traceback (python)
- Jazzy: zsh: no matches found: --documentation=./*.md
Related Questions in CODE-DOCUMENTATION
- is it possible to generate documentation for anonymous classes in rdoc
- I can't put text like [static] on the right side of the page for a certain function in doxygen
- TinyMCE - onSetContent documentation
- Looking for options to visually document some seriously messy matlab code
- Override or augment setuptools build_ext error messages
- Where is the git documentation that specifies that a reset can take a branch name as an argument?
- Suggestions for contributing to Documentation
- How should data be formatted to train the Huggingface DPR model?
- Why is the PDF generation using make.bat generated by Doxygen (LateX, refman.tex) on Windows not working?
- The getter 'size' isn't defined for the type 'TaskData'
- Rust-like comment compilation for kotlin/java?
- Altair documentation example not working due to a Javascript Error
- What does Kotlin coroutines documentation mean when they say joinAll() is semantically equivalent to calling join() in sequence?
- How do I refer specifically to "this" instance of a class instead of another instance which is one of the parameters of the method?
- Pyomo, how to make a constraint with two decision variables from two different Set()
Related Questions in CODE-VISUALIZATION
- Exploring Real-time Code Execution Visualization in Node.js with React and Socket.io
- how to use pythontutor.com visualization in pycharm or visual studio IDE
- Possible approach to visualize the Tower of Hanoi problem
- C++ plotting libraries for visualizing the solution of TSP using Genetic Algorithms
- How does this specific nested for loop work in vanilla JavaScript?
- Represent more than 20 levels in a glmtree
- How can I visualize network architectures effectively?
- Interactive Flowchart Like Code Map When Debugging JavaScript (in Visual Studio Code)?
- Static code visualization tool for any language?
- Visualizing R code with a flow chart
- Code Visualization and Arrow Annotations
- Are there concrete tools or methods for visualizing the structure of a program/project?
- developing an algorithm visualization/simulation
- R ggplot grid of rectangles, borders top, bottom, left right individual colors
- Visualising complex code flows in Visual Studio
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You aren't going to get a tool that does this for arbitrary languages off the shelf. There are too many languages, each with its own syntax and semantics. You somehow need a tool per language. You might find such tools for very commonly used languages, e.g, Understand for Software.
I think that the only way to do this is to build metatools that enable the construction of language-specific tools relatively easily. Such a tool has to have the common machinery needed by all such language processing tools: strong parsers (so writing grammars for languages is relatively straightforward), AST construction machinery, symbol table support, routines to build control and data flow graphs. By providing such machinery, one can build language front ends for modest costs.
There's a class of tools that does this, program transformation. Most of them have parsing engines, but not the rest of the mechanisms I have suggested above.
I believe this enough to have invested 20 years of my life to building such meta tools. Our DMS Software Reengineering toolkit shows its strength in being able to parse some 50+ languages, including the stunningly hard C++14 (both MS and GNU variants). It shows symbol table support and control flow graph construction for COBOL, Java, C, C++. (We can't do everything at once; pedaling as fast as practical). [DMS builds these graphs as data structures rather than "showing" them; the examples on that page are drawn with the additional help of DOT].
One of the few other tools that tries to do this is Clang/LLVM; this covers a wide variety of popular languages. Clang doesn't have any specific support for parsing that I know about; you get to code it all yourself. I think you get control flow graphs only after you convert the language to LLVM. I don't think it has any specific support for drawing control flow graphs, either.
An older tool with a good reputation for multi-language support in this space is CoCo/R; I don't know a lot about it. I know it parses, and has some support for ASTs; I don't know what it does about control flow analysis.