Skip to content

Latest commit

 

History

History
18 lines (14 loc) · 1.39 KB

File metadata and controls

18 lines (14 loc) · 1.39 KB

Control Flow Graph Generator

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.

Features:

  • 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.

Usage:

  1. Input your source code into the provided Python script.
  2. 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.
  3. Run the script to generate the control flow graph.
  4. View and analyze the graph to understand the program's execution flow and decision points.

Contribution:

Contributions are welcome! If you have suggestions, enhancements, or bug fixes, feel free to submit a pull request.