arXiv:2602.21251cs.SEcs.AI2026-02中稿 · ICSE 2026 Student …被引 2

用智能代理自动为老旧代码添加类型,省去人工一天工作量。

AgenticTyper: Automated Typing of Legacy Software Projects Using Agentic AI

  • 基于大模型的智能代理,通过编译对比持续纠错
  • 20分钟修复81K行代码中633个类型错误
  • 适合需要快速升级老旧项目的开发团队

遗留的JavaScript系统缺乏类型安全,维护风险高。尽管TypeScript能改善这一问题,但手动添加类型成本高昂。以往自动化类型研究多聚焦于类型推断,却很少关注类型检查配置、类型定义生成、错误识别或仓库级行为正确性。我们提出AgenticTyper,一个基于大语言模型的智能体系统,通过迭代错误修正和编译结果比对实现行为保留。在两个私有仓库(共81K LOC)上的评估显示,AgenticTyper在20分钟内解决了全部633个初始类型错误,将人工工作量从一天减少至几乎为零。

原文摘要 · Abstract (English)

Legacy JavaScript systems lack type safety, making maintenance risky. While TypeScript can help, manually adding types is expensive. Previous automated typing research focuses on type inference but rarely addresses type checking setup, definition generation, bug identification, or behavioral correctness at repository scale. We present AgenticTyper, a Large Language Model (LLM)-based agentic system that addresses these gaps through iterative error correction and behavior preservation via transpilation comparison. Evaluation on two proprietary repositories (81K LOC) shows that AgenticTyper resolves all 633 initial type errors in 20 minutes, reducing manual effort from one working day.

智能代理类型系统代码重构

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。