arXiv preprint ·
Typify: A Tool for Usage-driven Type Inference in Python
- Published
- Source
- arXiv preprint, posted before peer review
- Original
- Read it at arXiv
- Topics
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.
The authors’ abstract, as arXiv lists it. arXiv’s listings, abstracts included, are free for anyone to reuse.
Read it on ReadSearch
Each opens after you create an account, and brings you back to this paper.
More in Software Engineering
Does a Self-Learning Migration Agent Learn? An Audited Evaluation of Evidence-Graded Experience Memory for Oracle-to-PostgreSQL Migration
Caprese: Change Impact Recommendation Using History and Runtime Analysis
Guided Generation of Linux Kernel Semantic Patches with Small Local Language Models
TSBugs Explorer: Exploring and Benchmarking TypeScript Bugs
Eliciting and Mitigating Specification Satisficing in Coding Agents
Get the few papers worth your time in Software Engineering every morning.
ReadSearch reads the new papers in your field each day and brings you the few worth reading, each with its key finding in a sentence.