软件的功能性冗余能够有效提高计算机系统可靠性和安全性。研究了SPEC#语言中的前后置断言和对象不变式等契约机制,分析了如何通过这些机制来实现输入输出域控制、主动冗余和故障恢复等软件功能性冗余的方法和手段,并总结了软件开发过程中应用契约设计和冗余技术的若干准则和建议。这种基于契约的冗余技术能够显著地提高软件的可靠性、可维护性和可测试性,进而提高软硬件系统的整体可信性水平。
Software functional redundancy is a key technique for improving reliability and safety of computer systems. The contractoriented features including pre-conditions, post-conditions, and object invariants of SPEC# are studied. The ways of utilizing these features to achieve software functional redundancies such as input/output redundancy, active redundancy, and failure resume are analyzed. Finally a set of principles and suggestions for applying contract design and redundancy in software development are summarized. Such contract-based redundancy techniques significantly improve software reliability, testability and maintainability, and hence contribute to the overall trustiness of software and hardware systems.