Software Engineering (phần 4) pps

40 401 0
Software Engineering (phần 4) pps

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

- I ! 1 1 .1 . :I l I . i l I na < u A p T : . s . The Tools of ghe TrodeI I Eè 2 j ' j i . .j I Continuing the progression of CASE technology from tools to workbenches , the 1 a1 i ' : ! ! next item is the CASE environment. Unlike the workbench, which supports one or ti j ' , j . two activities, an environm ent supports the complete software process or, at the very y ; ! least , a large portion of the software process (Fuggetta, 19931. Figure 5.8(c) depicts s2 1 ironment that supports a1l aspects of al1 phases of the life cycle . Environments )1 j an enVl 1 are discussed in greater detail in Chapter 14.l i p 1 1 . Having set up a CASE taxonomy (namely, tools, workbenches. and environ- ' tl li ! ' . l . ments), the scope of CASE now is considered. tjk , l .' I 1 tê ! ' i ;ë! 1 u i ; ! g) ' I . .j. ' ' j y Si . ! ; 5.4 Stop: OF QA SK tk ê $ j ! . , rf ' @ ! i As mentioned previously , the need to have accurate and up-to-date documentation ' h ' l k I 'l ; ! . available at al1 times is a primal'y reason for implementing CASE technology. For , ' ' ' j' ! example, suppose that specifications are produced manually . A mem ber of the devel- g y . ; opment team has no way of telling whether a particular specification document is the kd . ' - ''' ' '' J' . k I current version or an older version. There is no way of knowing if the handwritten ' % ' i ! : h that document are part of the current specification or were merely a sugges - oj, : c anges on ; ( ' , tion later rejected. On the other hand, if the specifications of the product are produced p i ' 5 . in a CASE tool . then at any time there is only one copy of the speciscations, the , tlr: , us g . ' i . . 1 . online version accessed via the CASE tool. Then, if the specifications are changed , pl i i members of the development team easily can access the document and be sure that aë ! I k ! they are seeing the current version. In addition, the consistency checker will flag any ff 1 design changes without corresponding changes to the speciscation document . rri ' . i .1 I programmers also need online documentation . For example. online help infor- ' d, ! mation must be provided for the operating system, editor, programming language, st i : and so on . ln addition, programmers have to consult manuals of many kinds, such 'l E ' :1 as editor manuals and programming manuals. lt is highly desirable that , wherever at 1 ossible , these m anuals be available online. Apart from the convenience of having irlE P j everything at one's fingertips, it generally is quicker to query by computer than to try a I !l ; to find the appropriate manual and plow through it to find the needed item. In addition , e!l ,! I it usually is much easier to update an online m anual than to try to tind all hard-copy lx ' : (q . j , ! versions of a manual within an organization and make the necessary page changes. st ' , : As a result, online documentation is likely to be more accurate than hard-copy ver- ' ! ' : . . ' : sions of the same material- another reason for providing online docum entation to 1 ' . j : . programmers. An example of such online documentation is the UNIX manual pages bl ! , . jsobell 19951 .1 ' . Fe , CASE also can assist with communication among team members. E-mail is i rapidly becoming as m uch a part of an average office as a computer or a fax ma- ! ; chine . There are m any advantages to e-m ail. From the viewpoint of software pro- ' @ I j duction, if copies of a1l e-mail relevant to a specific project are stored in a particular th' 1! ilbox, there will be a written record of the decisions made during the project. ,' isj ma r ' l This can be used to resolve conflicts that may arise later . M any CASE environments mj ( ' i . : : 7 j ' ! ! ; ' : ' @ ' , . ' j : ô ! y Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. . I : j I li I I i 5.* R opE oF CASE M@ j ; . ; he and some CASE workbenches now incorporate e-mail systems . In other organiza- ! : : 1Or tions the e - mail system is implemented via a W orld W ide W eb browser such as : :ry Netscape. Other tools that are equally essential are spreadsheets and word proces- I ' - . i Dts sors . j 3tS ! , The term coding tools refers to CA SE tools such as text editors, debuggers, and ' : pretty printers designed to simplify the programmer s task, reduce the frustration 'n- that many program mers experience in their w ork, and increase program m er produc- tivity. Before discussing such tools, three detinitions are required. Programming-in- the-small refers to software development at the level of the code of a single m od- ule, whereas programming-in-the-large is software development at the module level (DeRemer and lfron, 19761. The latter includes aspects such as architectural de- - : sign and integration. Programming-in-the-many refers to software production by aE : team. At times, the team will work at the module Ievel', at times, at the code level. Thus programming-in-the-many incorporates aspects of both programming-in-the- !, on large and programming-in-the-sm all.2 I 7or ' A structure editor is a text editor that 'sunderstands'' the im plem entation lan- : I zl- guage. That is, a structure editor can detect a syntax fault as soon as it has been ë .he keyed in by the programmer , speeding the implementation phase because time is not . ; en wasted on futile compilations. Structure editors exist for a wide variety of languages, )s- : operating systems, and hardware. Because a structure editor has knowledge of the , ed ' rogramm ing language , it is easy to incorporate a pretty printer (or formatter) into rP . he the editor to ensure that the code always has a good visual appearance. For exam- )d, ple, a pretty printer for C++ will ensure that each l is indented the same amount 1at as its corresponding f. An early example of a structure editor that incorporates a 2 ny fonnatter is the Macintosh Pascal editor lApple, l 9841. Reserved words are auto- r matically put in boldface so that they stand out, and indentation has been carefully :)r- designed to aid readability. ln fact, m any M acintosh editors are totally or partially je, ' structured. l ch : Now consider the problem of invoking a method within the code, only to discover rer at linkage time that either the method does not exist or it has been wrongly specilied ng ' in some way . W hat is needed is for the structure editor to support online interface Ll'y . checking. That is, just as the structure editor has information regarding the name of )n, every variable declared by the program mer, so it must also know the name of every py method detined within the product. For example, if the program mer enters a call such as l .CS . I j Cr- I . average = dataArray.computeAverage (numberofvaluesl;t o res but method computeAverage has not yet been dehned, then the editor immediately ' responds with a message such as is Method computeAverage not known : 11a - - i :O- At this point, the programmer is given two choices, either to correct the name of l i2 lar the method or to declare a new method named computeAverage . If the second option I E ! Ct. is chosen, the programmer also must specify the arguments of the new method . Argu- XS ment types must be supplied when declaring a new method because the major reason i I . I ! k 1è . q 1 Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. ji 1 l i ' . ' ! 1 ; :; ë ': p ! 1Q@ < x A p T z p s * The Tools of 9he Trode 5 : ' ( t ' ' 1 ! ! .l f or having online interface checking is precisely to be able to check full interfacei I ' ' : 1 information, not just the names of methods. A common fault is for method p to callë t ' è I j , method q passing, say, four arguments, whereas method q has been specified with ' ( ; ! five arguments . It is more difticult to detect the fault when the call correctly uses four j ' j ; I arguments, but two of the arguments are transposed. For exam ple, the declaration of ' j t method q might be j i 'l void q dloo' floatvar, in@ intvar, siring sl , siring s2) .I . jp ! lI t : ' l i ! whereas the call is :j ' . ) 1 ' ' . ; ! I q (i nfva r , f Ioatva r, s 1 , s2) ; i . l . j i j . The first two arguments have been transposed in the call statement. Java compilers C k and linkers detect this fault, but only when they are invoked later . ln contrast, an ' . g : ( y : online interface checker immediately detects this and similar faults. ln addition , ift ' I' j ; the editor has a help facility, the programmer can request online information as to thei i se arguments of method q, before attempting to code the call to q. Better yet,è 1 Prec : I ' I the editor should generate a template for the call , showing the type of each argum ent. . j :@ : The programmer merely has to replace each form al argum ent by an actual argument . ( : : of the correct type. j . '1 , A major advantage of online interface checking is thathard-to-detectfaults caused i ; by calling methods with the wrong number of arguments or arguments of the wrong l l ' t e are immediately :agged . Online interface inform ation is important for the effi-; i . yp i ; ient production of high - quality software, particularly when the software is produced, c ; E by a team (programming-in-the-many). It is essential that online interface information: 1 : , regarding all modules be available to a1l programm ing team members at a1l tim es .i j 1 . j Furthermore. if one programmer changes the interface of method vuporcheck, per- ! lj haps by changing the type of one argument from in@ to flooù or by adding an additional rl : argument, then every component that calls vaporcheck must automatically be dis-: ' t , t abled until the relevant call statements have been altered to reqect the new state of .1 , ! affairs. j ' I . 1 : Even with a syntax-directed editor incorporating an online interface checker, j , j , the programmer still has to exit from the editor and invoke the compiler and linker.: ' , g Clearly, there can be no compilation faults, but the compiler still has to be invoked $ to perform code generation . Then the linker has to be called. Again. the program-q ! ' ! t ' : t mer can be sure that all external references will be satished as a consequence of ; ; ? j the presence of the online interface checker, but the linker still is needed to link . ! , :i , . the product. The solution to this is to incorporate an operating system front endj l . . ; within the editor. That is, a program mer should be able to give operating system 4 j ' commands from within the editor. To cause the editor to invoke the compiler , linker, ! ) ' l oader, and any other system software needed to cause the module to be executed ,ë 4 . - - ' ' $ i the programmer should be able to type a single command, named GO or RUN,, . I 1 I h hoose the appropriate icon or menu selection . ln UN IX, this! or use t e mouse to c! E ; ,: ' 1 i , . g can be achieved by using the make command (Section 5.9) or by invoking a shell i : ' I l script tsobell, 19951. Such front ends can be implemented in other operating systems '? y ' J as well. .! 1 j .j ' ! !1 ! ) ' j . , .j ' r ' : ' ! j ' . . j ' y : !i ' l Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. l : ! ; s.* 5:op: oF CA5E Am I ' ; ' Face One of the most frustrating computing experiences is for a product to execute for i Call a second or so . then terminate abruptly. printing a message such as ' vith Overflow at 508Four n Of The program mer is working in a high - level language such as Java or C++, not a ' low-level Ianguage like assembler or m achine code. But when debugging support is of the Overflow ot 506 variety, the programmer is forced to examine machine . code core dum ps, assembler listings, linker listings, and a variety of similar low-level . documentation, thereby destroying the whole advantage of program ming in a high- level language. A sim ilar situation arises when the only information provided is the infam ous UN IX m essage Elers Core dumped , an n, if or the equally uninformative , the ; Segmentation faultyet , , j ïellt' h is forced to examine low - level information. jHere again, t e usernent ja jn sgure 5.9 is a great improvement iIn the event of a failure. the message s own . iover the earlier terse error messages . The program mer immediately can see that the j lsed f ttempt to divide by 0 . Even more useful is for the Imethod failed because o an a 'ong Iaieh tjae joperating system to enter edit mode and automatically display the line at w effi- f il ure was detected, namely, line 6, together with the preceding and following four or ;a lced j a mer then probably can see what caused the failure and make , 1five lines . T e program j k tion th e necessary changes. I nes. j sefore the advent of CASE 'Another type of source-level debugging is trac ng . er- :P t ools, programmers had to insert appropriate print statements into their code by onal I f tjaeh and that, at execution time, would indicate the line number and the va ues o dis- b done by giving com mands to a s ource-level de-relevant variables. This now can e re of j i n.bugger that automatically causes trace output to be produced. Even better s an Iocity iteractive source - level debujser. Suppose that the value of variable escapeve ! j 'ker' b e incorrect and that method computeTraiectory seems to be faulty. Us- 'seems to lkef. 'i ng the interactive source-level debugger, the programmer can set breakpoints in the I Rked : code. W hen a breakpoint is reached, execution stops and debugging mode is en- I ram- v I i ' :tered . The programmer now asks the debugger to trace the variable escape e oc ty re of l k ilink den OW RFLOW ERROR E lker, , Closs: cyclotronEnergy .lted, j iUN Method: performcomputation I I !thi s Line ö: newvalue = (oldvalue + tempvaluel/tempvalue; : j shell oldvalue = 3.9583 tempvalue = 0.000 ! ! tem s ;Flgure 5 . * Output from source-level debugger. ; : i ! ! E Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. j ' ' 1l $ ip ' ! . ' ( $ i I j jj y j f jjje yrodep 12Q t H A p T : * 5 * T e oo s ot I . ) j ' ' i , and the metnod Eompute Irujedory. That is, every time the value of escopeveloc-i ' y ) i ) ity subsequently is either used or changed, execution again halts. The programmer l :l then has the option of entering further debugging commands , for exam ple, to re- ! ! ! h t the value of a specific variable be displayed. Alternatively, the program- 'l quest t a 7 ; j j mer may choose to continue execution in debugging mode or to return to normal '; ' ! I j execution mode. The programmer similarly can interact with the debugger when- ' 1 ? ever the method computeTraiectory is entered or exited . such an interactive source-1 q ' 1 : ffers almost every conceivable type of assistance to th e program-I level debugger ol i 1 i t mer when a produet fails . The Uxlx debugger dbx is an example of such a CASE: j ' i f ' I tool. l ' i ? As pointed out many times, it is essential that documentation of all kinds be' y ' I I 1 available online . ln the case of programmers, all documentation they might need @ . ' should be accessible from within the editor . ( I ; ' ,' W hat has now been described- a structure editor with online interface checking ; i ! - ; 7 . t ' 1 Capabilities, Operating System front end, source-level debugger, and online documenta- 1 I tion - - constitutes an adequate and effective programming workbench. 1t ; k 1 . j ) ' ; l . This sort of workbench is by no means new. All the preceding features were : : ! q supported by the FLOW software development workbench as farback as 1980 (Dooley ' dJ . , j i l and schach . 19851. Therefore, what has been put forward as a minimal but essential 1 i ' : ') programm ing workbench does not require many years of research before a prototype :E : l ) ; can be tentatively produced. Quite the contraly the necessal'y technology has been 4 è h ', . in place for over 20 years, and it is somewhat surprising that there are program mers 1 ' i i '' h e old-fashioned way,'' instead of using a workbench like 1. r . : who still implement code t i , j sun w orkshop. j1 I ! A ssential tool especially when softw are is developed by a team . is a version- 1i n e , s t . j control tool. . j1 l 1 '! 1 J j . t l ' 1j 1 ' '@ ; ! i ' j1 II ! j j s.V soF AR: V KRsloxs i ' j g - ; ' E : 'j 1 W henever a product is maintained, there will be at least two versions of the product:j ; ! . I ( the oId version and the new version. Because a product is composed of modules, there 4 ) ! 1l i ; , will also be two or more versions of each of the component m odules that have been j ! ' i . T i changed. j ( . 2 .i , , version control is described first w ithin the context of the maintenance phase (@ . .! then broadened to include earlier phases of the process . : j' ' 1 . k ' 'i l ; ! ! .I j , . . a ( ' 5.K1 Rxvlsloxs l s ' j ri : ' t . ' i i s a roduct has been installed at a number of different sites . If a fault is I. . . j uppose p ' j : ' found in a module, then that module has to be hxed. After appropriate changes have j; - (i t ! been made, there will be two versions of the module, the old version and the new ji . )1 . 5 J j ., 5 ! : . ) . 2 l - Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. ' : 4 j ' 2 s.y SOF- ARE W RsloNs 12a : . ; DC- . version intended to replace it. The new version is termed a revision. The presence j ner Of multiple versions apparently is easy to solve any old versions should be thrown . ! re- : away, leaving just the correct one. But that would be most unwise. Suppose that the I ious version of the module was revision n, and that the new version is revision i L . m- prev j nal n + 1 . First, there is no guarantee that revision n + 1 will be any more correct ' en- than revision n. Even though revision n + 1 may have been thoroughly tested by ce- the software quality assurance (SQA) group, both in isolation and linked to the rest Lm- of the product, there may be disastrous consequences when the new version of the 1 . SE product is run by the user on actual data. Revision n must be kept for a second reason. I The product m ay have been distributed to a variety of sites, and not aIl of them may I 1.be have installed revision n + 1 . If a fault report is received from a site still using zed revision n , then to analyze this new fault, it is necessary to conhgure the product in exactly the sam e way it is conligured at the user's site, that is, incorporating revision ing n of the module. It therefore is necessary to retain a copy of every revision of each ata- module. i As described in Section l .3, perfective maintenance is perform ed to extend the 1 d les are written', in other cases, ' 1ere functionality of a product . ln some instances, new mo u 1 ' ley existing modules are changed to incorporate this additional functionality. These new ) ; tial versions also are revisions of existing m odules. So are modules changed when per- j i hanges made to the product in response to lfPe : forming adaptive maintenance, that s, c , zen changes in the environment in which the product operates. As with corrective main- j lers tenance. aIl previous versions must be retained because issues arise not just during 'rl . ike the maintenance phase but from the implementation phase onward. After all, once a I f faults 1module has been coded , it continually undergoes changes as a consequence o ; On- being detected and corrected. As a result, there will be num erous versions of every ', dule, and it is vital to have some sort of control to ensure that every member of i Imo ! ' the developm ent team knows which version is the current version of a given module. I !Before we can present a solution to this problem , a further complication must be taken : into account. '' E 5.K2 V ARIATIONS Jct : Lere Consider the following exam ple. Most computers support m ore than one type of I I een printer. For example, a personal computer may support an ink-jet printer and a laser 1 printer. The operating system therefore must contain two variations of the printer : ase driver, one for each type of printer. Unlike revisions, each of which is written specif- ically to replace its predecessor, variations are designed to coexist. Another situation where variations are needed is when a product is to be ported to a variety of different , operating system s or hardware. A different variation of many of the modules may ' !have to be produced for each operating system-hardware combination . t' 1 Versions are schematically depicted in Figure 5.10, which shows both revisions .1 t t is and variations. To com plicate matters further, in general, there will be m ultiple revi- ' i : ave sions of each variation. For a software organization to avoid drowning in a morass of leW m ultiple versions, a CASE tool is needed. ; l i . i i Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. j . ' .k : l ! ' I 1 : . l ' ' ( ' 1. 4a* < x A p v z * s . The Tools of 'he Trode t ' I . ' . ' j ' l 1 * . ' j ! :I I - . : ' 1. . . ' : I j ' è ' 1 . ' : ! : i I i k i' ' ; ' j :2 i j . .I 1 (a) .E ' 1 1 q . ! ' (i 1 $ ' 2 ' i i I . ; j : ' I : ;' j ! j ', '' ) ' ' . j; ! . ' ( ' ! 1 I ' , j i j (yj t f ; I @ ! l I ylgu- sao s chematic representotion of multiple' j . . versions of modules, showing (c) revisions and (i : - i' ' , ! . (b) variations. l ( ; j J ' i ' ! . ' : ? . F ! i : . . ' ) t1 : Ei ) ' s.a toxylouRv lox touTpok t . l ) . . jj ' j ' I The code for every module exists in three forms. First is the source code. nowadays ! , /! i ; : generally written in a high-level language like C++ . Java, or Ada. Then there is the A 1 ë l , object code, produced by compiling the source code. Finally, the object code for eachl ! i ' module is combined with run-time routines to produce an executable load image . , r1 ( ' . This is shown in Figure 5. 1 l . The programmer can use various different versions of t I j ', each module. The specific version of each module from which a given version of the ti ! ) k : j complete product is built is called the conhguration of that version of the product. i I Suppose that a programmer is given a test repol't from the SQA group, stating that (i jj a module failed on a specilic set of test data . One of the first things to do is attempt to t l ', ! 1 recreate the failure. But how can the programmer determine which revisions of which! , 1l iations went into the version of the prod uct that crashed? Unless a conhguration- &1 1 ; var ' 1 1 trol tool (described in the following discussion) is used , the only way to pinpoint ;(1 coné l I i ; . ' ) : the source of error is to look at the executable load image, in octal or hexadecim al : i b ' ' f t and compare it to the object code, also in octal or hexadecimal . Specihcally, t;. ! orma ,) è ' q : ! the various versions of the source code have to be compiled and compared to the object t# ' - . . ) ) code that went into the executable load image. Although this can be done, it can take , ' ) , a long time, particularly if the product has dozens (if not hundreds) of modules, each j y: ! . ' ' , E with multiple versions. Therefore, two problem s must be solved when dealing with ' . ; . . Ii r multiple versions. First, it is necessary to be able to distinguish between versions so k : I I ê ' . : ' 1 g that the correct version of each module is compiled and linked to the product . Second, y . i S j ; : there is the inverse problem: Given an executable load image , determine which version . ill i 1 i i of each of its components went into it. ë r) ! ! I1 I Th e first item needed to solve this problem is a version-control tool. M any op- , p: , i 1 i 1 ting systems . particularly for m ainframe computers, support version control. But t b: . era 1 - 1 ', ' j k j . 1 : . ,j ' . Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. 7 I , ' I . I l I i> .a CONFIGURATION CoNTRot 1Q5 ' :Run-time I routines ! I I Executable Ioad image i ) Object Object Object Object@** file 1 file 2 file 3 file n Source Source Source Source ' @ @@ filll 1 filtl :? filtl :3 filip r) . ! Flgvre 5.1% Components of executable Ioad image. 1 many do not, in which case a separate version-control tool is needed. A common ! ! technique used in version control is for the name of each file to consist of two pieces, j the file name itself and the revision number. Thus, a module that acknowledges receipt .1 I of a message will have revisions acknowledgeMessage / 1 , acknowledgeMessage 1 I àys / 2, and so on, as depicted in Figure 5. l2(a). A programmer then can specify exactly . the which revision is needed for a given task. j tch With regard to multiple variations (slightly changed versions that fulfill the same ' e. role in different situations), one useful notation is to have a basic file name, followedg ; of by a variation name in parentheses (Babich, 19861. Thus two printer drivers are given the the names printerDriver (inuet) and printerDriver (Ioser). l I ). Of course, there will be multiple revisions of each variation, such as printerDriver ! hat (loser) / 1 2, printerDriver (Iaser) / 1 3, and printerDriver (Iaser) / 1 :. This is ' : depicted in Figure 5. l 2(b). it to ,! ich A version-control tool is the lirst step toward being able to manage m ultiple I . an- versions. Once it is in place. a detailed record (or derivation) of every version of the yint product must be kept. The derivation contains the name of each source code element, I ' ! i ' nal including the variation and revision, the versions of the various compilers and linkers . j lly, used, the name of the person who constnlcted the product, and of course, the date and 'I; ect the time at which it was constructed. Ae Version control is a great help in managing multiple versions of modules and the àch product as a whole. But more thanjust version control is needed, because of additional pith problems associated with maintaining m ultiple variations. 1 ; ! ; ; so Consider the two variations prinferDriver (inklet) and prinferDriver (Iaser). Sup- ! j nd, pose that a fault is found in printerDriver (inuet) and suppose that the fault occurs ' : ion in a part of the module that is comm on to both variations. Then it is necessary to fix not only printerDriver (inuet), but also printerDriver (Iaser). In general, if there are E op- v variations of a module, all p of them have to be fixed. Not only that, but they have :I But to be hxed in exactly the same way. ' i . l : 1. 1 Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. : ' j ' ' ' i 2 .! ' . 1 I ! :!! . i : I !xl < u a p y : R s . Th e Tools of 'he Trodei ! ! 1 j ' .E ' r I :i ' ;I ! sl I E . ' q 1 acknowledgeMessage / 1 - - ' tl: ' : E 1 .; t ( !! . acknowledgeMessage / 2 - -t 1 p knowledgeMessage / 3 - - : jji ; ac 1 acknowledgeMessage / 4 - l ir I . l : a l i (a) @ l ' ( i , ' i 1 i ' i . l 1 ! l l 1 i :. 1 I ; . ! , I 1; i ' rinteroriver (inkaets - printeroriver (Iaserl/lz - - a: P . ( j printerDriver ( Iaser) / 1 3 - -' ' i 1 l rinterDriver ( laser) / 1 4 - 0 ' : i p è ) ; ' '' V % ' I ; ' ' : a j I . . @ l ; (b) Pl l J : : : i ' yI ure sa2 Multiple revisions and variations . (a) Four revisions of module ,) . . @ pi ' ) : knowledgeMessage. (b) Two variations of module printerDriver, with three revisions of variation ,.ac ' t ' ' i terDriver (Ioser). ' 0 . . . . pr n h ! p : ? ' r j ! r j,y j ' .1 l tion to this problem is to store just one variation , say printerDriver ' iF , ! One so u î l (inklet). Then any other variation is stored in terms of the list of changes that have bi i c.to be made to go from the original to that variation . The list of differences is termedi bj a delta . Thus, what is stored is one variation and p - 1 deltas. Variation printer- ' ' i D iver (Iaser) is retrieved by accessing printerDriver (inDet) and applying the delta. n! : r . ! ' , A change madejust to printerDriver (Iaser) is implemented by changing the appropri-i ! ate delta. However, any change made to printerDriver (inuet), the original variation, P l : : automatically will apply to all the other variations . tl l ' ! '.C A eonfiguration-eontrol tool ean automatically manage multiple variations. But 11i I ) . ! l configuration control goes beyond multiple variations . A conhguration-control tool Al I bi ! also can handle problems caused by development and maintenance by teams , as l l ' ! ! d escribed in the next section. br ' ' l Ii 1 1 b i ; ' j ' l 4 . ! j 1 /( ' h . 1 ' 1 s.a.1 toxFlououlox toxn ok puwlxo pwoput. M AlxrzxAxt: a1 l v i i : , . j j. , All sorts ot difficulties can arise when more than one programmer is simultaneously 9 ' i taining a product . For example, suppose each of two programmers is assigned a bl ma n 1 @ j , : different fault report on a Monday monzing. By coincidence, both localize the faulti y .! I l . they are to fix to different parts of the same module mDual. Each programmer makes a' j t 1 ' ( . j j 6 tj tjjey start to work C' I! , j copy ol the current version of the module, namely, mDua / , ani 2 . l I . i on the faults . The first programmer tixes the first fault, has the changes approved. and . lj d : ' . ' ) replaces the module. now called mDual / 1 Z. A day later the second programmer 9! . . . 1 ! 1 1: j IC uxes the second fault, has the changes approved, and installs module mDual / 1 8. ft 4 i' ' 1 Unfortunately , revision 1 Zcontains the changes of only the firstprogrammer, whereas bl i j . j !; ; i ij E 'b ' : 1 . 1 . I 1i j . Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. I . . . ) ' s a CoNFlouRv loN CONTROL 1xy ' : '. revision 1 8 contains those of only the second programmer. Thus, al1 the changes of ' the first programmer have been lost. I Although the idea of each program mer making individual copies of a m odule : 1 . ji s far better than both working together on the same piece of software, clearly that : is inadequate for m aintenance by a team. W hat is needed is some mechanism that allows only one user at a time to change a m odule. l I s-a-a sasutlx.s I I The maintenance manager must set up a baseline, a conhguration (set of versions) of il all the modules in the product. W hen trying to lind a fault, a maintenance programmer puts copies of any needed modules into his or her private workspace. ln this private workspace, the programmer can change anything at al1 without having an impact on any other programmer in any way, because al1 changes are made to the programmer's private copy; the baseline version is left untouched. i Once it has been decided which module has to be changed to fix the fault, the ; 1 ' 1 programmer/rctuc: the current version of the module that he or she is goingto alter. No ' 'ion ther program mer m ay m ake changes to any frozen version . A fter the maintenance 2o ! programmer has made changes and they have been tested, the new version of the i I module is installed, thereby modifying the baseline. The previous version, now frozen, is retained because it m ay be needed in the future, as explained previously, but itcannot , iver I be altered. Once a new version has been installed, any other maintenance programm er 1 Lave can freeze the new version and make changes to it. The resulting module, in turn, will i ned i become the next baseline version. A similar procedure is followed if two or more !ter- modules have to be changed sim ultaneously.rlta . :Tbis scheme solves the problem with module mDual. Both programmers makepri - rivate copies of mDual / 1 8 and use those copies to analyze the respective faults !ion, P that they have been assigned to fix. The first programmer decides what changes to j make, freezes mDual / 1 6, and makes the changes to it to repair the hrst fault. iBut After the changes have been tested, the resulting revision, mDual / 1 7, becomes the !tool baseline version. ln the meantime, the second programmer has found the second fault I , a.S imenting with a private copy of mDuol / 1 6. However, changes cannot now ' 1by exper be made to mDual / 1 8 because it was frozen by the first programmer. Once mDual / 1 7 becomes the baseline, it is frozen by the second programmer whose changes , are made to mDual / 1 7. The resulting module now is installed as mDual / 1 8, a I I4t: ion that will incorporate the changes of both programmers. Revisions mDuol / : lvers . k ly 1 8 and mDual / 1 7 are retained for possible future reference, but they can never .ls . d a be altered.z àult ' i izCS a . j p k 5 @ a ZONFI/URATI/N Z/NTR/L PURIN/ PklputT D EVEL@PMENT ! '1 nda mer W hile a module is in the process of being coded, versions are changing too rapidly : 1 8. for conhguration control to be helpful. However, once coding of the module has , reas been com pleted. it should immediately be tested informally by its programm er, as i! :' j I l I ! Please purchase Image To PDF Converter on http://www.verypdf.com/ to remove this message, thank you. [...]... e o d si me t ttme t - h 1 flwi asro ite ol n setnsr : o g i u j C k= Oan s= O d N (.) ôô ' i o telo i e trd.twi b p o e b id cinta telo iv ra t w h o p s nee I l e r v n y n u to h t h o p n ain l ( 4)i ed i c e t J tbe or t l i e cut f t frttme,a s ri 6 nde s on-c us f e he oop s xe ed or he is i s e ton ( )h l s t ti.k = 0, n s= 0 w c n ie l o i v ra t( ) Be a s 66 o d ; ha s ad No o sd r o p n... o : r m n u p ch ain 6.) t ol h t o ks na rq rd Futemo e b c uek= 0,tflo ta k- 1= - 1 s te s e ui rh r r, e a s e i olws h t ,o h j i' ' : : sm i ( ie t a ds= Oa rq ie Lo piv ra t 64 teeoeitu ut u n 64)s mpy n s e urd o n ain ( )h rf r s rej s b or t hr ttm e t l i en er d ef e he s i he oop s t e Now t i tv hyp hes s s e i peror he nduc i e ot i t p s f med.A s um e t t ats e s a s ha om t ge d rn... c i he oop s xie he ue f s ven s e ton 6 , hus s if ng out ts ci c ton ( 3) atsyi pu pe t a i 6 i To rviw,gien t i s iiaton ( 1 ,i wasp ove t tl iva int e e v he nput pecfc i 6.) t r n ha oop n ra ( 4)hol wheherte l hasb n e utd 0,1 ormor tmes Fu t mor i 6 ds t h oop ee xec e , e i rher e t lj wa pr ent tatrnier i t l t mi e ,a whe i doe s te v ues s ov ha fe t atons he oop er nats nd n t s o h al . ! cost-beneit analysis, is presented in Section 5.2. Software metrics are introduced in Section 5.3. 1 . A variety of computer-aided software engineering (CASE) tools are described j in Sections. !n page 138). . 2 Ii is The task of every software professional is to ensure high-quality software at a1l 1. I d times. Notwithstanding this, the software quality assurance (SQA) group has addi-. struggle with laulty software, or the developers can hx the software but E' l E ' ! ' deliver it late. No matter what, the client probably will lose confidence in the software) . # 2

Ngày đăng: 07/07/2014, 06:20

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan