Theorem provers has been used extensively in software engineering for software testing or verification. However, software is now so large and complex that additional architecture is needed to guide theorem provers as they try to generate test suites. The SNAP test suite generator (introduced in this paper) combines the Z3 theorem prover with the following tactic: cluster some candidate tests, then search for valid tests by proposing small mutations to the cluster centroids. This technique effectively removes repeated structures in the tests since many repeated structures can be replaced with one centroid. In practice, SNAP is remarkably effective. For 27 real-world programs with up to half a million variables, SNAP found test suites which were 10 to 750 smaller times than those found by the prior state-of-the-art. Also, SNAP ran orders of magnitude faster and (unlike prior work) generated 100% valid tests.
翻译:用于软件测试或核查的软件工程中广泛使用了理论验证器。 但是,软件现在如此庞大和复杂,在试图生成测试套件时,需要额外的结构来指导理论验证器。 SNAP 测试套件生成器(在本文件中引入)将Z3理论验证器与以下策略结合起来:将一些候选测试集中起来,然后通过向集束中子提出小变异来寻找有效的测试。这一技术有效地消除了测试中反复出现的结构,因为许多重复的结构可以用一个机器人替换。在实践中,SNAP非常有效。对于27个具有高达50万变量的实际世界程序,SNAP发现测试套件比先前最新工艺所发现的要小10至750倍。此外,SNAP运行的量级更快,(与以前的工作不同)产生了100%的有效测试。