paperbot · PL 论文追踪

全部论文 待读 收藏

P1 TypeScript Repository Indexing for Code Agent Retrieval

面向代码智能体检索的 TypeScript 仓库索引
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026匹配度 7/10 · 论文为 Coding Agent 的代码检索构建函数级索引,直接使用 TypeScript Compiler API 的 AST、语义与模块解析,属于 PL 技术服务于 Agentic 程序/代码智能体的方向,且有开放框架与大规模工程评估;但未对 Agentic 程序本身做静态分析,也未涉及 LLM 改进静态分析、浮点或贝叶斯程序分析。引用 2 inbox
Junsong Pu, Yichen Li, Zhuangbin Chen
crossref: 2026-10-09

AI 速览

一句话:基于 TypeScript Compiler API 实现 abcoder-ts-parser,直接复用编译器 AST 与语义信息,为代码智能体高效构建函数级代码索引。

基于图的代码索引通过保留调用链与依赖关系,能改善 LLM 代码智能体的上下文检索,弥补关键词检索与相似度检索的不足。开源框架 ABCoder 将代码库解析为函数级的 UniAST 索引,但其现有解析器把轻量 AST 解析与语言服务器语义解析结合,每个符号查找都需一次 JSON-RPC 调用,在大型 TypeScript 仓库上成为性能瓶颈。本文提出 abcoder-ts-parser:它构建于 TypeScript Compiler API 之上,直接使用编译器自身的 AST、语义信息与模块解析逻辑,从而在一次编译分析中完成符号解析与索引构建。作者在三个开源 TypeScript 项目(最大约 120 万行代码)上评估该解析器,结果显示其生成的索引可靠,且效率显著优于原有架构。现场演示见所给视频链接。

问题
现有 ABCoder 解析器依赖语言服务器进行语义解析,每个符号查找都要发起一次 JSON-RPC 调用,导致在大型 TypeScript 仓库上构建代码索引时性能成为瓶颈。
方法
基于 TypeScript Compiler API 实现 abcoder-ts-parser,直接复用编译器的 AST、语义信息与模块解析逻辑,替代逐符号的 JSON-RPC 查询,生成函数级的 UniAST 代码索引。
评估
在三个开源 TypeScript 项目(代码规模最高约 120 万行)上与现有架构对比,验证其索引结果的可靠性,并表明其构建效率显著更高。
原文摘要(Abstract)

Graph-based code indexing can improve context retrieval for LLM-based code agents by preserving call chains and dependency relationships that keyword search and similarity retrieval often miss. ABCoder is an open-source framework that parses codebases into a function-level code index called UniAST. Its existing parsers combine lightweight AST parsers for syntactic analysis with language servers for semantic resolution, but because such resolution requires a JSON-RPC call for each symbol lookup, these per-symbol calls become a bottleneck on large TypeScript repositories. We present abcoder-ts-parser, a TypeScript parser built on the TypeScript Compiler API that works directly with the compiler's AST, semantic information, and module resolution logic. We evaluate the parser on three open-source TypeScript projects with up to 1.2 million lines of code and find that it produces reliable indexes significantly more efficiently than the existing architecture. For a live demonstration, watch: https://youtu.be/ryssr7ouvdE

链接与引用

DOI 原文 · arXiv · DBLP

BibTeX
@inproceedings{abs-2604-18413,
  title = {TypeScript Repository Indexing for Code Agent Retrieval},
  author = {Junsong Pu and Yichen Li and Zhuangbin Chen},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834616}
}