面向SMT解的全面采样研究
Towards Comprehensive Sampling of SMT Solutions
AI总结:
本研究针对SMT公式多样化解生成问题,提出新型采样器PanSampler,整合三种新技术,通过少量解实现高覆盖率,实验表明其在覆盖率、故障检测能力及测试效率上均优于现有方法,降低了软/硬件测试验证成本。
摘要:
本研究聚焦于为可满足性模理论(SMT)公式有效生成多样化解,针对位向量、数组和未解释函数理论,这是软件和硬件测试中的关键任务。生成多样化SMT解有助于在验证和测试过程中发现故障并检测安全违规,由此产生SMT采样问题,即构建少量解同时实现约束空间的全面覆盖。虽然高覆盖率对探索系统行为至关重要,但减少解的数量也极为重要,因为过多的解会增加测试时间和资源使用,降低效率。本研究引入PanSampler,一种新型SMT采样器,可通过少量解实现高覆盖率。它整合了三种新技术,即多样性感知SMT算法、抽象语法树(AST)引导的评分函数和后采样优化技术,提升了实际性能。它通过迭代采样解、评估候选解并采用局部搜索优化解,确保用少量样本实现高覆盖率。在实际基准上的广泛实验表明,PanSampler达到高目标覆盖率的能力显著更强,同时比现有采样器实现相同覆盖率所需的解更少。此外,对来自真实软件系统的实际对象的实证评估显示,PanSampler实现了更高的故障检测能力,并将达到相同故障检测效果所需的测试用例数量从32.6%减少到76.4%,大幅提升了测试效率。PanSampler推动了SMT采样的发展,降低了软件测试和硬件验证的成本。
英文摘要:
This work focuses on effectively generating diverse solutions for satisfiability modulo theories (SMT) formulas, targeting the theories of bit-vectors, arrays, and uninterpreted functions, which is a critical task in software and hardware testing. Generating diverse SMT solutions helps uncover faults and detect safety violations during the verification and testing process, resulting in the SMT sampling problem, i.e., constructing a small number of solutions while achieving comprehensive coverage of the constraint space. While high coverage is crucial for exploring system behaviors, reducing the number of solutions is of great importance, as excessive solutions increase testing time and resource usage, undermining efficiency. In this work, we introduce PanSampler, a novel SMT sampler that achieves high coverage with a small number of solutions. It incorporates three novel techniques, i.e., diversity-aware SMT algorithm, abstract syntax tree (AST)-guided scoring function and post-sampling optimization technology, enhancing its practical performance. It iteratively samples solutions, evaluates candidates, and employs local search to refine solutions, ensuring high coverage with a small number of samples. Extensive experiments on practical benchmarks demonstrate that PanSampler exhibits a significantly stronger capability to reach high target coverage, while requiring fewer solutions than current samplers to achieve the same coverage level. Furthermore, our empirical evaluation on practical subjects, which are collected from real-world software systems, shows that PanSampler achieves higher fault detection capability and reduces the number of required test cases from 32.6\% to 76.4\% to reach the same fault detection effectiveness, leading to a substantial improvement in testing efficiency. PanSampler advances SMT sampling, reducing the cost of software testing and hardware verification.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。