ConCovUp:面向并发测试的有效代理基于测试驱动生成
ConCovUp: Effective Agent-Based Test Driver Generation for Concurrency Testing
AI总结:
本文提出ConCovUp框架,结合LLM与程序分析,通过静态分析提取共享内存访问及调用上下文,利用LLM驱动的逆向追踪方法生成有效并发测试,提升SMAP覆盖率。
摘要:
并发测试对于提高多线程程序的可靠性和安全性至关重要。动态分析工具如TSan依赖高质量的测试驱动在运行时达到关键的共享内存交互。然而,当前测试实践主要关注顺序逻辑,留下自动并发测试生成的空白。最近,大语言模型(LLMs)在生成顺序测试方面表现出色,但缺乏对并发语义的深入理解时难以生成有效并发测试。本文提出了ConCovUp,一种结合LLM与程序分析的多代理框架。ConCovUp基于静态分析提取共享内存访问及其调用上下文。为触发难以到达的访问,它引入了由LLM驱动的逆向追踪方法,利用模型的语义推理推断满足复杂路径约束的具体输入,并通过动态执行反馈迭代优化生成的测试。在九个真实世界的C/C++库上的评估显示,ConCovUp将平均共享内存访问对覆盖率(SMAP覆盖率)从36.6%提升到68.1%。
英文摘要:
Concurrency testing is essential to improve the reliability and security of multi-threaded programs. Dynamic analysis tools, such as TSan, depend on high-quality test drivers that reach critical shared-memory interactions at runtime. However, current testing practices predominantly focus on sequential logic, leaving a gap in automated concurrent test generation. Recently, large language models (LLMs) have shown promise in generating sequential tests, but they struggle to produce effective concurrent tests without a deep understanding of concurrency semantics. This paper presents ConCovUp, a multi-agent framework that combines LLMs with program analysis. ConCovUp grounds test generation in static analysis to extract shared memory accesses and their calling contexts. To trigger hard-to-reach accesses, it introduces an LLM-driven backward tracing approach, leveraging the model's semantic reasoning to deduce concrete inputs that satisfy complex path constraints, and iteratively refines the generated tests via dynamic execution feedback. Our evaluation on nine real-world C/C++ libraries shows that ConCovUp improves average Shared Memory Access Pair Coverage (SMAP Coverage) from 36.6% to 68.1% over the general Claude Code agent baseline.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。