Concolic testing, a powerful hybrid software testing technique, has historically been plagued by fundamental limitations such as path explosion and the high cost of constraint solving, which hinder its practical application in large-scale, real-world software systems. This paper introduces a novel algorithmic framework that synergistically integrates concolic execution with Large Language Models (LLMs) to overcome these challenges. Our hybrid approach leverages the semantic reasoning capabilities of LLMs to guide path exploration, prioritize interesting execution paths, and assist in constraint solving. We formally define the system architecture and algorithms that constitute this new paradigm. Through a series of experiments on both synthetic and real-world Fintech applications, we demonstrate that our approach significantly outperforms traditional concolic testing, random testing, and genetic algorithm-based methods in terms of branch coverage, path coverage, and time-to-coverage. The results indicate that by combining the strengths of both concolic execution and LLMs, our method achieves a more efficient and effective exploration of the program state space, leading to improved bug detection capabilities.
翻译:符号执行测试作为一种强大的混合软件测试技术,长期受限于路径爆炸和约束求解成本高昂等根本性局限,阻碍了其在大规模实际软件系统中的实际应用。本文提出一种新颖的算法框架,通过协同整合符号执行与大型语言模型来克服这些挑战。我们的混合方法利用LLMs的语义推理能力来引导路径探索、优先处理有价值的执行路径,并辅助约束求解。我们形式化定义了构成这一新范式的系统架构与算法体系。通过对合成场景及实际金融科技应用的一系列实验,我们证明该方法在分支覆盖率、路径覆盖率和达到覆盖率所需时间等指标上,均显著优于传统符号执行测试、随机测试以及基于遗传算法的方法。实验结果表明,通过结合符号执行与LLMs的双重优势,我们的方法能够更高效、更有效地探索程序状态空间,从而提升缺陷检测能力。