arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.08923cs.SE
收藏

循环展开的形式化定义及其在测试覆盖率中的应用

A formal definition of loop unrolling with applications to test coverage

Bertrand Meyer

AI总结:

本文为循环展开概念提供形式化定义和理论基础,以改进仅执行循环体一次的标准测试覆盖率实践,并指出该框架可推广到任何循环推理场景。

摘要:

实现各种形式测试覆盖率(如分支覆盖率)的技术通常不迭代循环;换言之,它们将循环视为条件语句,执行零次或一次。作者及其合作者的现有工作可生成保证完全分支覆盖率的测试套件。更新的工作表明,通过“展开”循环,该方法能够发现显著更多的缺陷。本文的讨论为这一循环展开概念提供了理论基础和精确定义。虽然最初动机是改进标准测试覆盖率实践(其仅执行循环体一次)以获得更好的测试覆盖率,但本文提出的框架适用于任何关于循环的推理形式。

英文摘要:

Techniques to achieve various forms of test coverage, such as branch coverage, typically do not iterate loops; in other words, they treat a loop as a conditional, executed zero or one time. Existing work by the author and collaborators produces test suites guaranteeing full branch coverage. More recent work has shown that by "unrolling" loops the approach can find significantly more bugs. The present discussion provides the theoretical basis and precise definition for this concept of unrolling. While initially motivated by the need to improve standard test coverage practices (which execute loop bodies only once), to better testing coverage, the framework presented here is applicable to any form of reasoning about loops.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑