用语义代码图帮开发者跨仓库理解复杂系统逻辑
LogicLens: Leveraging Semantic Code Graph to explore Multi Repository large systems
- 构建跨仓库的语义代码图,融合语法分析与大模型语义增强
- 支持自然语言查询,动态返回相关代码子图和功能解释
- 可实现影响分析与症状调试,适合大型分布式系统开发
理解大型软件系统是一项挑战,尤其当代码分布在多个仓库和微服务中时。开发者不仅需关注代码结构,还需推断隐含的领域逻辑与运行行为,这些信息通常分散且不明确。我们提出 LogicLens,一种响应式对话代理,通过语义多仓库代码图辅助开发者探索复杂系统。该图在预处理阶段构建,结合抽象语法树解析、仓库遍历与大语言模型的语义增强,捕捉文件、类、函数等结构元素,以及领域实体、操作和工作流等功能抽象。图构建完成后,LogicLens 支持自然语言交互,动态检索相关子图并回答技术或功能问题。我们展示了系统架构,讨论了涌现行为,并在真实多仓库场景中评估其有效性。结果表明,基于语义图结构可自然产生影响分析与症状驱动的调试能力。
原文摘要 · Abstract (English)
Understanding large software systems is a challenging task, especially when code is distributed across multiple repositories and microservices. Developers often need to reason not only about the structure of the code, but also about its domain logic and runtime behaviors, which are typically implicit and scattered. We introduce LogicLens, a reactive conversational agent that assists developers in exploring complex software systems through a semantic multi-repository graph. This graph is built in a preprocessing step by combining syntactic code analysis, via AST parsing and repository traversal, with semantic enrichment using Large Language Models (LLMs). The resulting graph captures both structural elements, such as files, classes, and functions, as well as functional abstractions like domain entities, operations, and workflows. Once the graph is constructed, LogicLens enables developers to interact with it via natural language, dynamically retrieving relevant subgraphs and answering technical or functional queries. We present the architecture of the system, discuss emergent behaviors, and evaluate its effectiveness on real-world multi-repository scenarios. We demonstrate emergent capabilities including impact analysis and symptom-based debugging that arise naturally from the semantic graph structure.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。