Error Management with Design Contracts
Eivind J Nordby, Martin Blom, Anna Brunström · 2001
When designing a software module or system, a software engineer needs to consider and differentiate between how the system handles external and internal errors. External errors must be tolerated by the system, while internal errors should be discovered and eliminated. This paper presents a development strategy based on design contracts to minimize the amount of internal errors in a software system while accommodating external errors. A distinction is made between weak and strong contracts that corresponds to the distinction between external and internal errors. According to the strategy, strong contracts should be applied initially to promote the correctness of the system. Before release, the contracts governing external interfaces should be weakened and error management of external errors enabled. This transformation of a strong contract to a weak one is harmless to client modules. In addition to presenting the strategy, the paper also presents a case study of an industrial project where this strategy was successfully applied. 1