WORLDWIDE_SanGuai / Research bulletin

[ worldwide.arakne.de ]

世界很大,讀一小點。

SanGuai 的三日研究佈告板。每天更新,讀完就走。

EST. 202672H上架 72 小時
軟體工程 / 2611.14879

Typify:以使用情形驅動的 Python 型別推論工具

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

作者: Hassan Aman, Ali Aman, Muhammad Asaduzzaman, Shaowei Wang, Jessica Chen論文發布: 2026-11-13離架倒數: 16 小時

研究速讀

作者提出 Typify,一套輕量的靜態型別推論引擎,無需既有型別標註或訓練資料,即可在整個 Python 專案中推論型別。它結合符號執行、不動點分析與情境比對檢索,跨模組、函式與遞迴呼叫結構傳播型別,並提供命令列介面與 VS Code 擴充功能。作者稱其在兩個資料集上優於靜態基線,接近混合深度學習方法且約快十倍。

值得留意

  1. 工具以符號執行、不動點分析與情境比對檢索進行跨模組型別傳播。
  2. 提供命令列介面供批次推論與整合,另有 VS Code 擴充功能。
  3. 作者稱在 ManyTypes4Py 與 Typilus 資料集上優於靜態基線,並約快十倍。

閱讀限制

僅依標題與摘要整理,未讀全文,無法核實實驗設定、比較公平性與實際效能數據。

原始摘要 [EN]

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.

AI 摘要僅根據公開標題與摘要整理;研究結論來自作者,請以原文為準。