Typify: A Tool for Usage-driven Type Inference in Python
Hassan Aman, Ali Aman, Muhammad Asaduzzaman, Shaowei Wang, Jessica Chen
Key points
From the paper's conclusion- 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.
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.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- PastaLean: Deterministic transpilation from Python to Lean for VerificationarXiv · 2026
- Scitix: Scalable Constraint-Based Type Inference for Code Snippets with Missing TypesProceedings of the ACM on Software Engineering · 2026
- SMTpip: Interpreter-Aware SMT-Based Dependency Conflict Resolution for Restoring Python Source-Code ExecutabilityarXiv · 2026
- Understanding Python Linters through a Comprehensive and Systematic Empirical StudyarXiv · 2026
- How Much Static Structure Do Code Agents Need? A Study of Deterministic AnchoringProceedings of the ACM on software engineering. · 2026
- Code Comprehensor: Hierarchical Documentation and Cross-Modal Retrieval for Large RepositoriesarXiv · 2026