Design by Contract 契约式设计 Institute of Computer Software 2022-2-27 Nanjing University
契约式设计 Design by Contract 2022-2-27 Institute of Computer Software Nanjing University
&雪扇 摘要 UNIVE 2 口引言 o Eiffel的DbC机制 口DbC与继承 口如何应用DbC Institute of Computer Software 2022-2-27 Nanjing University
摘要 引言 Eiffel 的 DbC 机制 DbC与继承 如何应用DbC 2022-2-27 Institute of Computer Software Nanjing University 2
引言 1902 3 口Design by Contract(DbC)契约式设计 口方法学层面的思想 ■以尽可能小的代价开发出可靠性出众的软件系统 Eiffel语言的直接支持 Bertrand Meyer:DbC是构建面向对象软件系统方法 O 的核心! 口James McKim:“只要你会写程序,你就会写契约” Institute of Computer Software 2022-2-27 Nanjing University
引言 Design by Contract (DbC) 契约式设计 方法学层面的思想 以尽可能小的代价开发出可靠性出众的软件系统 Eiffel语言的直接支持 Bertrand Meyer:DbC是构建面向对象软件系统方法 的核心! James McKim: “只要你会写程序,你就会写契约” 2022-2-27 Institute of Computer Software Nanjing University 3
引言 1902 4 A discipline of analysis,design,implementation, management (可以贯穿于软件创建的全过程,从分析到设计,从文 档到调试,甚至可以渗透到项目管理中) Viewing the relationship between a class and its clients as a formal agreement,expressing each party's rights and obligations. (把类和它的客户程序之间的关系看做正式的协议,描 述双方的权利和义务) Institute of Computer Software 2022-2-27 Nanjing University
引言 A discipline of analysis, design, implementation, management (可以贯穿于软件创建的全过程,从分析到设计,从文 档到调试,甚至可以渗透到项目管理中) Viewing the relationship between a class and its clients as a formal agreement, expressing each party ’ s rights and obligations. (把类和它的客户程序之间的关系看做正式的协议,描 述双方的权利和义务) 2022-2-27 Institute of Computer Software Nanjing University 4
&扇 NAN 引言 1902 5 o Every software element is intended to satisfy a certain goal,for the benefit of other software elements(and ultimately of human users). This goal is the element's contract. The contract of any software element should be ▣Explicit.. Part of the software element itself. Institute of Computer Software 2022-2-27 Nanjing University
引言 Every software element is intended to satisfy a certain goal, for the benefit of other software elements (and ultimately of human users). This goal is the element’ s contract. The contract of any software element should be Explicit. Part of the software element itself. 2022-2-27 Institute of Computer Software Nanjing University 5