Open Day Presentation
BSc Algorithm Analysis Tool
Student
Desk
Initial task setting
Supervisor
Second Reader

g24-20

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:

  • Sorting
  • Searching
  • Graph algorithms
  • Matrix algorithms
    The system is designed to be easily extensible.

It includes:

  • A command-line interface
  • An interactive web app built with Streamlit

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.