This repository contains a Python script designed to generate control flow graphs (CFGs) from source code. A control flow graph visually represents the flow of control within a program, illustrating the sequence in which statements are executed based on conditions.
- Source Code Input: Accepts source code as input and produces a corresponding control flow graph.
- Visual Representation: Generates a graphical representation of the program's execution paths using the Graphviz library.
- Decision Nodes: Highlights decision points in the program, such as if-else conditions, and connects them to their respective outcomes.
- User-Friendly: Designed with simplicity in mind, making it accessible for both beginners and experienced developers.
- Input your source code into the provided Python script.
- Adjust the nodes and connections in the script to accurately represent the control flow of your specific program. Note: The provided code example demonstrates the control flow for a simple comparison program and may require modifications for other programs.
- Run the script to generate the control flow graph.
- View and analyze the graph to understand the program's execution flow and decision points.
Contributions are welcome! If you have suggestions, enhancements, or bug fixes, feel free to submit a pull request.