Putting assertions in their place

Putting assertions in their place
复制标题

将断言放在适当的位置

DOI:
10.1109/issre.1994.341367
复制
发表时间:
1994
期刊:
Proceedings of 1994 IEEE International Symposium on Software Reliability Engineering
影响因子:
--
通讯作者:
K. Miller
K. Miller
中科院分区:
--
文献类型:
--
作者:
J. Voas;K. Miller

文献摘要

被引文献

相似文献

程序中每个语句中放置的断言可以自动监视程序执行的内部计算。但是,普遍断言的优势是有代价的。具有如此广泛的内部仪器的程序将比没有仪器的同一程序慢。某些断言可能是多余的。在每个位置在每个位置使用正确断言的代码的任务都是繁重的,并且不能保证断言本身是正确的。我们提倡在每个位置的主张(最常见的实践)和主张理论理想之间的中间立场。我们的妥协是仅在传统测试不太可能发现软件故障的地方放置断言。一种可检验性测量,灵敏度分析,确定了不太可能有效测试的位置。<< etx >>
Assertions that are placed at each statement in a program can automatically monitor the internal computations of a program execution. However, the advantages of universal assertions come at a cost. A program with such extensive internal instrumentation will be slower than the same program without the instrumentation. Some of the assertions may be redundant. The task of instrumenting the code with correct assertions at each location is burdensome, and there is no guarantee that the assertions themselves will be correct. We advocate a middle ground between no assertions at all (the most common practice) and the theoretical ideal of assertions at every location. Our compromise is to place assertions only at locations where traditional testing is unlikely to uncover software faults. One type of testability measurement, sensitivity analysis, identifies locations where testing is unlikely to be effective.<<ETX>>