Typify: A Tool for Usage-driven Type Inference in Python
Hassan Aman, Ali Aman, Muhammad Asaduzzaman, Shaowei Wang, Jessica Chen
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.
Create a lesson
Metadata
- Comments
- Accepted in the 42nd IEEE International Conference on Software Maintenance and Evolution (ICSME 2026)
Related papers
Dhaani: A Data-Flow-Driven Tool for Greenfield Construction and Brownfield Modernisation
Shared title terminologycs.SEShraddha Surana, Ashwin Srinivasan
Decision Models for Definition-Driven GitHub Actions Workflow Smell Detection
Shared title terminologycs.SERohit Gheyi, Anderson Uchôa, Wesley Assunção et al.
STUN-Bench: Truly Unseen Tools for Evaluating Shared Tool Experience
Shared title terminologycs.SEAbhijit Chakraborty, Ni Trieu, Vivek Gupta
Schema-Validated LLM Workflows: A Benchmark Protocol and Comparative Evaluation Across Six Python Implementations
Shared title terminologycs.SESidney Shapiro, Sanad Al-Khatib, Aurora Pinzón Arzola et al.
Epistemic Guard: Out-of-Process MCP Receipt Proxying, Post-Turn Prose Supervision, and Provenance-Gated Memory for Tool-Using Autonomous Agents
Shared title terminologycs.SESean Maxwell
Metadata-Driven AI: An Architectural Pattern for Sustainable Data Analysis with LLMs
Shared title terminologycs.SERenaud Pawlak, Armen Sulejmani, Jordi Cabot