軟件工程理論與實踐課件:第11章 系統(tǒng)的維護_第1頁
軟件工程理論與實踐課件:第11章 系統(tǒng)的維護_第2頁
軟件工程理論與實踐課件:第11章 系統(tǒng)的維護_第3頁
軟件工程理論與實踐課件:第11章 系統(tǒng)的維護_第4頁
軟件工程理論與實踐課件:第11章 系統(tǒng)的維護_第5頁
已閱讀5頁,還剩35頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、Maintaining the System系統(tǒng)的維護SOFTWARE ENGINEERING 11.1 The changing system 變化的系統(tǒng)Software system are evolutionary.A customer makes a decision to do something a different way.The nature of the system itself changes. Types of Systems, in terms of the way it is related to the environment in which it opera

2、tesS-systemsP-systemsE-systems軟件系統(tǒng)是演化的顧客以不同的方式做某件事系統(tǒng)自身的屬性發(fā)生了改變系統(tǒng)類型,用系統(tǒng)和系統(tǒng)運行的環(huán)境來描述S-systemsFormally defined, derivable from a specificationStatic system, no change requiredExamples: mathematical operations形式化定義、源自說明描述靜態(tài)系統(tǒng),無改變需要P-systemsThe system is based on a practical abstraction of the problem rat

3、her then on a completely defined specificationAbstraction and solution may changeExamples: pattern recognition systems系統(tǒng)基于問題的一個可行的抽象,而不是一個完全定義好的說明抽象與解決方案可能變化模式識別系統(tǒng)E-systemsEmbedded in the real world and changes as the world doesThe problem cannot be specified completelyThe success depends on the cus

4、tomer evaluationExamples: banking systems, ERP systems嵌入真實世界中并隨著真實世界的改變而改變問題不能被完全說明成功取決于客戶評價Changes during the system life cycle在系統(tǒng)生命周期中的變化A change at any stage of development can also affect the results of previous as well as subsequent stages.在開發(fā)中任意環(huán)節(jié)的改變,都可能影響前面的結果和后面的環(huán)節(jié)。 軟件開發(fā)中變動的例子Table 11.1. Exa

5、mples of change during software development.Activity from which initial change resultsArtifacts requiring consequent changeRequirements analysisRequirements specificationSystem designArchitectural design specificationTechnical design specificationProgram designProgram design specificationProgram imp

6、lementationProgram codeProgram documentationUnit testingTest plansTest scriptsSystem testingTest plansTest scriptsSystem deliveryUser documentationTraining aidsOperator documentationSystem guideProgrammer guideTraining classesThe system life span 系統(tǒng)生命期Development Time vs. Maintenance Time 開發(fā)時間與維護時間T

7、ypical development project takes between 1 and 2 years, but . requires an additional 5 to 6 years of maintenance time! 典型的開發(fā)項目耗時1-2年,但需要5-6年的維護時間。80-20 RuleTwenty percent of the effort is in development and eighty percent is in maintenance.工作量的20%是開發(fā),而80%是維護。System evolution vs. decline 系統(tǒng)演化和系統(tǒng)衰退的比較

8、Is the cost of maintenance too highIs the system reliability unacceptableCan the system no longer adapt to further change, and within a reasonable amount of timeIs system performance still beyond prescribed constraintsAre system functions of limited usefulnessCan other systems do the same job better

9、, faster or cheaperIs the cost of maintaining the hardware great enough to justify replacing it with cheaper, newer hardware維護的成本太高嗎?系統(tǒng)的可靠性可以接受嗎?在一個合理的時間內,系統(tǒng)不能再適應進一步的變化了嗎?系統(tǒng)性能仍舊超出預先規(guī)定的約束條件嗎?系統(tǒng)功能的作用有限嗎?其他的系統(tǒng)能更好、更快、更廉價地做同樣的工作?維護硬件的成本高得足以用更便宜、更新的硬件來取代嗎?Laws of software evolution 軟件演化法則Continuing change

10、(連續(xù)的變化):程序持續(xù)地被改動,或者變得越來越無用。變動或衰退過程一直持續(xù)著,直到用一個重新創(chuàng)建的版本來代替原系統(tǒng)更劃算為止。Increasing complexity(遞增的復雜性):當一個演化的程序被持續(xù)改動時,它的結構惡化了。因此它的復雜性增加,除非進行一些維護或減少它。Fundamental law of program evolution (程序演化的基本法則):程序演化服從于一種動力,這種動力產(chǎn)生了編程過程,從而產(chǎn)生了全局項目和系統(tǒng)屬性的度量,它自身由某種統(tǒng)計確定的趨勢和恒定性來調節(jié)。Conservation of organizational stability (組織穩(wěn)定性的

11、守恒):在一個程序的活動周期中,編程項目的總體活動統(tǒng)計上是不變的。Conservation of familiarity(熟悉程度的守恒 ):在一個程序的活動周期中,因程序演化連續(xù)發(fā)布版本的發(fā)布內容(改動、增加、刪減)統(tǒng)計上是不變的。11.2 the nature maintenance 維護的本質Corrective( ): maintaining control over day-to-day functionsAdaptive( ): maintaining control over system modificationsPerfective( ): perfecting existi

12、ng functionsPreventive( ): preventing system performance from degrading to unacceptable levels 防止系統(tǒng)性能下降到不可接受改正性維護維持控制日常功能適應性維護維持控制系統(tǒng)修改完善性維護完善現(xiàn)有的功能預防性維護Who performs maintenance 由誰進行維護Often, a separate group of analysts, programmers, and designers is designated as the maintenance team.通常,人們會指派一個單獨的維護小

13、組,這個小組包括分析員、程序員和設計人員。Maintenance team responsibilities 維護小組的職責understanding the systemlocating information in system documentationkeeping system documentation up-to-dateextending existing functions to accommodate new or changing requirementsadding new functions to the systemfinding the source of sys

14、tem failures or problemslocating and correcting faultsanswering questions about the way the system worksrestructuring design and code componentsrewriting design and code componentsdeleting design and code components that are no longer usefulmanaging changes to the system as they are made理解系統(tǒng)定位系統(tǒng)文檔中的

15、信息保持系統(tǒng)文檔更新擴展現(xiàn)有功能以容納新的或變動的需求給系統(tǒng)增加新的功能找出系統(tǒng)故障或問題的根源定位和糾正故障回答有關系統(tǒng)運行方式的問題重構設計和代碼組件重新編寫設計和代碼組件刪除不再有用的設計和代碼組件進行系統(tǒng)改動Use of maintenance time維護時間的分配Perfective完善性維護: 50%Adaptive適應性維護: 25%Corrective改正性維護: 21%Preventive預防性維護: 4%11.3 Maintenance problems 與維護有關的問題Staff problemsLimited understandingManagement prior

16、itiesMoraleTechnical problemsArtifacts and paradigmsTesting difficulties人員問題理解的局限性管理的優(yōu)先級士氣技術問題工件和范例測試困難Factors affecting maintenance effort 影響維護成果的因素Application typeSystem noveltyTurnover and maintenance staff abilitySystem life spanDependence on a changing environmentHardware characteristicsDesign

17、qualityCode qualityDocumentation qualityTesting quality應用類型系統(tǒng)新奇度人員翻新和維護人員能力系統(tǒng)生命期對變化的環(huán)境的依賴硬件特性設計質量代碼質量文檔質量測試質量Modelig maintenance effortd 對維護工作量建模Belady and Lehman公式 M = p + K c - d其中:M是一個系統(tǒng)花費的所有維護工作量 p表示分析、評價、設計、編碼以及測試的總工作量 K是個常量,通過與實際工作量比較而定 c是由于缺乏結構化和文檔引起的復雜度 d表示維護小組對軟件的熟悉程度,d削弱了cCOCOMO II計算維護工作量公

18、式Size=ASLOC(AA+SU+0.4DM+0.3CM+0.3IM)/100ASLOC:要改動的代碼行數(shù)AA:評估和修改評分SU:加權因子項CM: 要修改的代碼的百分比DM:要修改的設計的百分比IM:要集成的外部代碼的百分比 COCOMO II軟件理解的評分Table 11.2. COCOMO II rating for software understanding.Very lowLowNominalHighVery highStructure結構Very lowcohesion, highcoupling,spaghetti codeModerately lowcohesion, hi

19、ghcouplingReasonablywell-structured;some weakareasHigh cohesion,low couplingStrongmodularity,information-hiding in dataand controlstructuresApplicationClarity應用程序清晰度No matchbetweenprogram andapplicationworld viewsSomecorrelationbetweenprogram andapplicationModeratecorrelationbetweenprogram andapplic

20、ationGoodcorrelationbetweenprogram andapplicationClear matchbetweenprogram andapplicationworld viewsSelf-Descriptiveness自描述Obscure code;documentationmissing,obscure orobsoleteSome codecommentaryand headers;some usefuldocumentationModerate levelof codecommentary,headers,documentationGood codecommenta

21、ryand headers;usefuldocumentation;some weakareasSelf-descriptivecode;documentationup-to-date,well-organized,with designrationale SU增值SU increment5040302010 COCOMO II 評估和修改的評分Table 11.3. COCOMO II ratings for assessment and assimilation effort.Assessment and assimilation incrementLevel of assessment

22、and assimilation effort0None2Basic component search and documentation4Some component test and evaluationdocumentation6Considerable component test and evaluationdocumentation8Extensive component test and evaluationdocumentation11.4 Measuring maintenance characteristics 度量維護特性External view of maintain

23、ability 可維護性的外部屬性Internal attributes affecting maintainability 影響可維護性的內部屬性External view of maintainability 可維護性的外部屬性Necessary datatime at which problem is reportedtime lost due to administrative delaytime required to analyze problemtime required to specify which changes are to be madetime needed to

24、make the changetime needed to test the changetime needed to document the change(用平均修復時間度量所)必須的數(shù)據(jù)問題報告的時間由于行政管理延遲浪費的時間分析問題需要的時間確定進行哪種改動需要的時間進行改動需要的時間測試變動需要的時間記錄變動需要的時間External view of maintainability 可維護性的外部屬性Desirable data:ratio of total change implementation time to total number of changes implement

25、ednumber of unresolved problemstime spent on unresolved problemspercentage of changes that introduce new faultsnumber of components modified to implement a change可能有用的數(shù)據(jù)實現(xiàn)改動的總時間與實現(xiàn)的改動的總數(shù)目之比未解決問題的數(shù)目花在未解決問題上的時間引入新故障的改動的百分比為實現(xiàn)一個改動而修改的組件數(shù)Internal attributes affecting maintainability 影響可維護性的內部屬性cyclomati

26、c number 環(huán)路數(shù)Scoreboard:drawscore(int n)while(numdigits- 0 scorenumdigits-erase();/ build new score in loop, each time update positionnumdigits = 0;/ if score is 0, just display “0”if (n = 0) delete scorenumdigits;scorenumdigits = new Displayable(di gits0);scorenumdigits-move(Point(700-numdigits*18),

27、40);scorenumdigits-draw();numdigits+;while (n) int rem = n % 10;delete scorenumdigits;scorenumdigits = new Displayable(digitsrem);scorenumdigits-move(Point(700-numdigits*18),40);scorenumdigits-draw();n /= 10;numdigits+;環(huán)路數(shù)代碼中判定語句數(shù)1環(huán)路數(shù)計算的例子環(huán)路數(shù)劃分平面數(shù)線性無關路徑e n + 2Fog index可讀性度量指標F = 0.4 單詞數(shù)句子數(shù) 3個以上音節(jié)的詞的

28、百分比11.5 Maintenance Techniques and Tools維護技術和工具Configuration ManagementConfiguration Control BoardChange ControlImpact AnalysisEvaluation of the many risks associated with the change, including estimates of effects on resources, effort and scheduleAutomated Maintenance Tools配置管理配置管理委員會 變動控制后果分析對與變動有

29、關的多項風險的評估,包括對資源、工作量和進度影響的評估自動維護工具Change control issues 變動控制Synchronization 同步:When was the change made?變動是何時進行的?Identification 標識 : Who made the change?由誰進行改動的?Naming 命名 : What components of the system were changed? 系統(tǒng)的那個組件被改動了?Authentication 鑒定 :Was the change made correctly? 改動正確地進行了嗎?Authorizatio

30、n 授權 :Who authorized that the change be made?是誰批準進行的改動?Routing 發(fā)送 :Who was notified of the change?改動通知了那些人?Cancellation 取消 :Who can cancel the request for change?誰能取消變動的請求?Delegation委托 :Who is responsible for the change?誰對改動負責?Valuation 評價 :What is the priority of the change?改動的級別是什么?Impact analysis 后果分析Workproduct( ): any development artifact whose change is significantHorizontal traceability( ): relationships of components across collections of workproductsVertical traceability( ): relationships among pa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論