Content

Speaker:

Juan Altmayer Pizzorno

Abstract:

Python has become one of the most widely used programming languages, valued for its flexibility and ease of use. However, that same flexibility makes programs more difficult to write reliably: in the absence of static guarantees, errors are more likely to remain undetected until runtime. Testing and type annotations can mitigate these issues, yet both are burdensome to produce manually, and are therefore often underused. Approaches to automating test generation and type inference are hindered not only by Python’s dynamic features but also by the substantial performance limitations of CPython, the standard Python interpreter.

In this dissertation, I explore how lightweight dynamic analysis can be used to improve the reliability of Python software. First, I introduce SlipCover, a code coverage measurement tool that significantly reduces runtime overhead through efficient bytecode instrumentation and dynamic de-instrumentation [4]. SlipCover enables practical use of coverage tracking in iterative workflows by achieving near-zero overhead, supporting a range of software engineering applications. Building on SlipCover, I next present CoverUp, a regression test generation tool that uses coverage feedback to efficiently guide a large language model in generating unit tests that significantly outperform previous methods in coverage. Finally, I propose RightTyper, an efficient and effective type annotation system. RightTyper combines lightweight dynamic analysis, sampling, statistical filtering, and careful aggregation of runtime type information to generate precise annotations based on actual program behavior, avoiding errors while improving recall in type checking.

Collectively, these contributions advance the state of the art by showing how lightweight dynamic analysis helps overcome significant challenges in writing and maintaining reliable Python code.

 

Advisor: 

Emery Berger