Keywords
Algorithm Analysis, Python, ast, op counting
Technologies
Python, AST, Streamlit
This project develops an automated tool to analyze algorithm performance by instrumenting Python code at runtime. While traditional algorithm analysis relies on a theoretical "bean counting" approach to estimate worst-case complexity, this system provides a practical alternative by collecting operation-level counts during execution.
The tool uses Python's Abstract Syntax Tree (AST) to automatically modify code and insert counters without altering the original structure, allowing it to make syntax-aware modifications. It supports common algorithm categories such as:
It includes:
Overall, the project bridges the gap between theoretical complexity analysis and real-world execution, offering an educational platform for students to explore how algorithms behave in practice.