Object-sensitive Type Analysis for Python
Summary
Python is an interpreted, interactive and object-oriented programming language that stresses code readability. In Python, objects interact with each other to accomplish various tasks. Such interaction is usually achieved by attribute lookup, storage and deletion.
We consider whether Python's attribute access semantics with different precision affect the precision of type analysis. Type inference for Python is hard due to the extensive use of external libraries and the dynamic language features. In this thesis we propose an object-sensitive type analysis for Python based on an extension of the notion of monotone frameworks to deal with dynamic flow manipulation. In addition, we also implement a type parser to partially support retrieving types from Python stub files. Our results show that the analysis precision is not improved substantially when employing sophisticated attribute access semantics.