Papers for

software analysis teams

Papers whose findings have a practical use for this group, as judged from the abstract. Open a paper to read what it means in practice.

Typify infers precise Python types faster without annotations

Typify: A Tool for Usage-driven Type Inference in Python

Abstract: Python's dynamic type system, while expressive and flexible, creates significant challenges for static analysis tools in unannotated or partially annotated codebases. Existing approaches either require pre-existing type annotations, or depend on deep learning models that demand large training corpora and significant computational resources. We present Typify, a lightweight, usage-driven static type inference engine that infers precise type information across entire Python projects without annotations or training data. Typify integrates symbolic execution, fixpoint analysis, and context-matching retrieval to propagate types across modules, functions, and recursive call structures. The tool is available as both a command-line interface (CLI) for batch inference, evaluation and downstream integration with other tools, and a Visual Studio Code (VS Code) extension for interactive type assistance. Evaluation on the ManyTypes4Py and Typilus datasets shows that Typify outperforms all static baselines and closely matches state-of-the-art hybrid deep learning approaches, while running approximately 10x faster.

Wed 11 NovSoftware Engineering
The gist
Python’s flexibility with types makes it hard for tools to understand code before running it, especially without type hints. The authors developed Typify, a tool that guesses types by examining how code uses values, without needing extra information or training on large datasets. Typify combines techniques like symbolic execution and analysis of function calls to predict types accurately across projects. Tests show it works better than existing static methods and almost as well as heavier AI-based tools, but much faster.
Open → 2611.14879v1