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?
656 Views Asked by RandomDSdevel At
1
There are 1 best solutions below
Related Questions in STATIC-ANALYSIS
- How to detect functions, that are only called from unused functions using cppcheck?
- Use static analysis tools to check null pointers and memory leaks in Linux device drivers
- Why it is not suggested to pass hardcoded absolute path name to File object constructor File(String)
- Visual Studio - Discover if method is called by another method at some point
- False positive: precondition is redundant
- Cppcheck GUI: Excluding a file or folder from checking
- How to get better results from LLVM's MemoryDependenceAnalysis pass?
- How to enforce static imports for some methods using checkstyle?
- Dealing with code movement when comparing static analysis reports
- Is there a way to find the ignored JUnit Test with the most lines of code in a large codebase?
- JSHint in javascript is not showing all warnings for code to be corrected
- Parsing Hack code into Abstract Syntax Tree
- Understanding x86 r/m32 instruction
- LLVM Error When Using a Pass from Another Pass
- Sonar - Python plugin rules, what tools it uses behind?
Related Questions in DOCUMENTATION-GENERATION
- Heisenberg was here: Aliases for PowerShell parameters only appear in cmdlet help when you do NOT document the cmdlet
- Why is Doxygen so unfriendly to mobiles?
- How to generate a legend with colors in PlantUML?
- How to customize the documents generated by Doxygen?
- Python - Sphinx: vague Import error
- Unresolved assembly in Sandcastle
- Is it possible to write Markdown links in a way that satisfies both Github and Doxygen?
- Page-level docblocks and phpdocumentor templates
- writing documentation of angular projects using grunt-ngdocs
- Parsing a php script for documentation purposes
- How can I identify comments associated with a Java class/function?
- Apidocjs document creation issue, warning : plugin param parser not found and missing comma issue
- Bulk generation of many office documents - which technology is best suitable?
- Generate JSON schema from typescript
- Cannot run styleguidist along side with laravel development server
Related Questions in CODE-DOCUMENTATION
- Parsing a php script for documentation purposes
- Documentation about compiler options for Swift
- Is this an off-by-one bug in Java 7?
- PHPDoc: Typehint in nested arrays (with e.g. 2 dimensions)
- Kotlin Dokka - Can't find Dokka task in android studio
- Automatic INLINE Document Generation
- Best way to add documentation to vb.net project pointing to an article on the web
- How to make reference to method in PHPDoc
- How can i make this comments with jsdoc
- How to write documentation comments in ANSI C?
- Is there any offline javascript API document tool available like YARD for ruby does?
- Objective-C syntax in doxygen markdown pages
- JSDoc - how to document prototype methods
- Override or augment setuptools build_ext error messages
- How to create a comment to an oracle database view
Related Questions in CODE-VISUALIZATION
- R ggplot grid of rectangles, borders top, bottom, left right individual colors
- Visual representation of classes and/or objects
- Dependency Graphs similar to VS 2010 Ultimate?
- Exploring Real-time Code Execution Visualization in Node.js with React and Socket.io
- IDE or plugin to add helpful graphics or illustrate code as-is?
- Represent more than 20 levels in a glmtree
- Static code visualization tool for any language?
- Eclipse Code Visualizer
- Visualising complex code flows in Visual Studio
- Which tool allows to generate such nice source code pictures?
- C++ plotting libraries for visualizing the solution of TSP using Genetic Algorithms
- How does this specific nested for loop work in vanilla JavaScript?
- how to use pythontutor.com visualization in pycharm or visual studio IDE
- Can I configure code_swarm to only create the png files sans visual display?
- UML or CASE tool to analyze *huge* JavaScript code base?
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 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.