Build a Bug Detection System
Preston Smith, Benedek Kaibas, Duru Akbas and Miguel Orti Vila
September 1, 2025
What is Uncomputability?
It isn’t possible to algorithmically solve or do
There isn’t one program that can complete the task with every input
Why is it Uncomputable?
Book Figure
What problems can you solve?
You can write programs that detect bugs
Can also detect specific kinds of bugs
Bug detectors for specific programs
Bug Detecting through Fuzzing
What are unused variables?
Our Methodology to Detect Unused Variables
Creating an AST
Opening the AST and check how many times a given variable occurs in the tree.
Detecting Unused Variables
Is it Possible Not To Detect Unused Variables?
Short answer: Yes!
Altough it is easy to detect unused variables!
Even in most cases static analyzers detect unused variables in some cases they cannot detect them
Unreachable Code
Output Using Vulture
Unreachable Code
TypeError
Detecting Unclosed Print Statements
Using AST to not to execute but to review the code by creating a string
If the code did not have defects in them, it still would not print anything
The unclosed print statements or parantheses will always be caught by ast.parse() method
Detecting Division by Zero