Towards A Method Of Programming With Assertions

Towards A Method Of Programming With Assertions
复制标题

走向一种使用断言进行编程的方法

DOI:
10.1145/143062.143098
复制
发表时间:
1992
期刊:
International Conference on Software Engineering
影响因子:
--
通讯作者:
David S. Rosenblum
David S. Rosenblum
中科院分区:
--
文献类型:
--
作者:
David S. Rosenblum

文献摘要

被引文献

相似文献

长期以来,嵌入式断言已被认为是在调试,测试和维护过程中自动运行的软件故障检测的功能强大的工具。然而,尽管符号和通过断言编程开发的技术和工具的成熟度具有丰富性,但断言是一种开发工具,在实践中几乎没有广泛使用。主要原因似乎是(1)以前的断言处理工具与现有编程环境不容易集成,并且(2)尚不清楚哪种断言在检测软件故障方面最有效。本文使用一种构建的断言处理工具来描述经验,该工具旨在解决易用性和有效性的关注点。该工具称为应用程序,这是一种在基于UNIX的DE-VELOPMENT环境中开发的C程序的注释预处理器。在过去三年中,根据这种经验,APP已用于开发许多软件系统,该论文对最有效检测故障的断言进行了分类。虽然描述了针对许多常见的故障和错误的断言,但这种故障的共同点表明,需要对所需行为进行明确的,高级,自动可检查的规范。希望本文介绍的分类将被证明是开发具有断言编程方法的有用的第一步。
Embedded assertions have long been recognized as a Po- tentially powerful tool for automatic runtime detection of software faults during debugging, testing and maintenance. Yet despite the richness of the notations and the maturity of the techniques and tools that have been developed for programming with assertions, assertions are a development tool that has seen little widespread use in practice. The main reasons seem to be that (1) previous assertion processing tools did not integrate easily with existing programming environments, and (2) it is not well understood what kinds of assertions are most effective at detecting software faults. This paper describes experience using an assertion processing tool that was built to address the concerns of ease-of-use and effectiveness. The tool is called App, an Annotation Pre- Processor for C programs developed in UNIX-based de- velopment environments. APP has been used to develop a number of software systems over the past three years Based on this experience, the paper presents a classification of the assertions that were most effective at detecting faults. While the assertions that are described guard against many common kinds of faults and errors, the very commonness of such faults demonstrates the need for an explicit, high-level, automatically check-able specification of required behavior. It is hoped that the classification presented in this paper will prove to be a useful first step in developing a method of programming with assertions.