【正文】
?按時交付 ? Verifiability, Reparability, Economy 維護(hù)費(fèi)用分類 2022/8/20 Institute of Computer Software Nanjing University 25 [Lientz 1980] 70% of the cost of software is devoted to maintenance! Tradeoffs 2022/8/20 Institute of Computer Software Nanjing University 26 ? 魚與熊掌不可得兼 ? 權(quán)衡 折中 ? 軟件技術(shù)研究的常見主題: ?在何種條件下 以何種方式 魚與熊掌可以得兼? ?在何種條件下 拿部分魚換取更多熊掌?何時反之? Key Concerns ? Reliability [correctness + robustness]: ?It should be easier to build software that functions properly, and easier to guarantee what it does. ? Modularity [reusability + extendibility]: ?We should build less software! ?Software should be easier to modify. 2022/8/20 Institute of Computer Software, Nanjing University 27 應(yīng)對軟件危機(jī) 2022/8/20 Institute of Computer Software Nanjing University 28 ? 開發(fā)的角度:分析、設(shè)計方法的研究 ?前對象時代 ?Structured Programming, Design, Analysis ? 管理的角度:軟件開發(fā)過程的工程化 ?生命周期模型 ?瀑布模型,快速原型法,螺旋模型,噴泉模型等 應(yīng)對復(fù)雜性的基本途徑 2022/8/20 Institute of Computer Software Nanjing University 29 ? “ 元方法” ?Deposition 分而治之 ?Abstraction 抓本質(zhì),抓重點(diǎn) ?Hierarchy 應(yīng)對大系統(tǒng),綱舉目張 復(fù)雜性是軟件開發(fā)過程中所固有的特質(zhì)。 VERIFICATION 瀑布型 PROJECT PROGRESS ?The activities are necessary. (But: merging of middle activities.) ?The order is the right one. The waterfall model of the lifecycle 2022/8/20 Institute of Computer Software, Nanjing University 33 FEASIBILITY STUDY REQUIREMENTS ANALYSIS SPECIFICATION GLOBAL DESIGN DETAILED DESIGN IMPLEMENTATION DISTRIBUTION VALIDATION amp。 welldefined interfaces ? 模塊化 (modular): 軟件構(gòu)造為一組 “ 模塊 ” 之有序組合,從而易于裝配、易于修補(bǔ)替換模塊。 ? 什么樣的方法是 “ 模塊化 ” 的? ? 目標(biāo)( Five Criteria) ? 規(guī)則( Five Rules) ? 原則( Five Principles) Five Criteria 2022/8/20 Institute of Computer Software Nanjing University 38 ? Deposability 易分解性 ? Composability 易組合性 ? Understandability 易理解性 ? Continuity 連續(xù)性 ? Protection 保護(hù)性 易分解性 Deposability 2022/8/20 Institute of Computer Software Nanjing University 39 ? Method helps depose plex problems into subproblems. ? COROLLARY: Division of labor. ? Counterexample: General initialization module. 易組合性 Composability 2022/8/20 Institute of Computer Software Nanjing University 40 ? Method favors production of software elements that may be freely bined with each other to produce new software. Example: Unix shell conventions Program1 | Program2 | Program3 易理解性 Understandability 2022/8/20 Institute of Computer Software Nanjing University 41 ? 模塊應(yīng)可單獨(dú)理解 ?不能牽涉太廣 ?自描述 ? Counter example: sequential dependencies A|B|C 連續(xù)性 Continuity 2022/8/20 Institute of Computer Software Nanjing University 42 ? Method ensures that small changes in specifications yield small changes in architecture. ? Design method: Specification ? Architecture ? Example: Principle of Uniform Access (see next) ? Counter example: static arrays The Principle of Uniform Access ? Facilities managed by a module are accessible to its clients in the same way whether implem