THE SOFTWARE LIFE CYCLE
An early definition of software engineering was proposed by Fritz Bauer at the first major conference dedicated to the subject:The establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines[1].
Although many more comprehensive definitions have been proposed,all reinforce[2] the importance of engineering discipline in software development.
Software engineering is an outgrowth[3] of hardware and system engineering.It encompasses a set of three key elements—methods,tools,and procedures—that enable the manager to control the process of software development and provide the practitioner with a foundation for building high-quality software in a productive manner。
Fig.8-1 illustrates the classic life cycle[4] paradigm for software engineering.Sometimes called the“waterfall model[5]”,the life cycle paradigm demands a systematic,sequential approach to software development that begins at the system level and progresses through analysis,design,coding,testing,and maintenance.Modeled after the conventional engineering cycle,the life cycle paradigm encompasses the following activities:
軟體的生存周期
早期對軟體工程的定義是由弗裡茲•鮑爾在針對這一學科的第一次大會上提出的:建立和採用穩妥的工程原理,以節儉方式得到一種能在實際機器上可靠而生產力的軟體的學科。
儘管又提出了許多更複雜的定義。但都是強調軟體開發中工程規則的重要性。
軟體工程是硬體和系統工程的產物,它包含3個關鍵元素:方法、工具和過程。這3個元素使管理者能控制軟體開發過程並為軟體具體開發人員提供一個建立生產高品質軟體的基礎。
圖8. 1示出了軟體工程生存周期的經典範例。生存周期範例,有時稱之為“瀑布模型”,它要求軟體開發按系統的、順序的方式,從系統級開始按分析、設計、編碼、測試和維護階段進行。模仿常規工程周期,軟體的生存周期範例包含以下活動。
System engineering and analysis.Because software is always part of a larger system,work begins by establishing requirements for all system elements and then allocating some subset of these requirements to software.This system view is essential when software must interface with other elements such as hardware,people,and databases.System engineering and analysis encompass requirements gathering at the system level with a small amount of top-level[6] design and analysis.
Software requirements analysis.The requirements gathering process is intensified and focuses specifically on software[7].To understand the nature of the program(s)to be built,the software engineer(analyst)must understand the information domain for the software,as well as required function,performance,and interfacing.Requirements for both the system and the software are documented and reviewed with the customer.
Design.Software design is actually a multistep process that focuses on three distinct attributes of the program:data structure,software architecture,and procedural detail.The design process translates requirements into a representation of the software that can be assessed for quality before coding begins.Like requirements,the design is documented and becomes part of the software configuration.
Coding.The design must be translated into a machine-readable form.The coding step performs this task.If design is performed in a detailed manner,coding can be accomplished mechanistically.
Testing.Once code has been generated,program testing begins.The testing process focuses on the logical internals of the software,assuring that all statements have been tested,and on the functional externals,that is,conducting tests to assure that defined input will produce actual results that agree with required results.
Maintenance.Software will undoubtedly,undergo change after it is delivered to the customer(a possible exception is embedded software).Change will occur because errors have been encountered,because the software must be adapted to accommodate changes in its external environment(e. g. a change required because of a new operating system or peripheral device),or because the customer requires functional or performance enhancements.Software maintenance applies each of the preceding life cycle steps to an existing program rather than a new one.
The classic life cycle is the oldest and the most widely used paradigm for software engineering.However,over the past few years,criticism of the paradigm has eaused even active supporters to question its applicability in all situations.Among the problems that are sometimes encountered when the classic life cycle paradigm is applied are:
(1)Real projects rarely follow the sequential flow that the model proposes.Iteration always occurs and creates problems in the application on the paradigm.
(2)It is often difficult in the beginning for the customer to state all requirements explicitly.The classic life cycle requires this and has difficulty accommodating the natural uncertainty that exists at the beginning of many projects.
(3)The customer must have patience.A working version of the program(s)will not be available until late in the project time span.A major blunder undetected until the working program is reviewed can be disastrous.
Each of these problems is real.However,the classic life cycle paradigm has a definite and important place in software engineering work.It provides a template into which methods for analysis,design,coding,testing,and maintenance can be placed.The classic life cycle remains the most widely used procedural model for software engineering.While it does have weaknesses,it is significantly better than a haphazard approach to software development.
系統工程和分析由於軟體總是大系統的一部分,所以工作就從為所有系統元素建立需求開始,然後再將這此軟體需求的某一子集分配給軟體。當軟體必須與諸如硬體、人員和資料庫等其他因素介面時,系統觀點是不可少的。系統工程和分析包括系統級的需求收集和少量的頂層設計和分析。
軟體需求分析。加強需求收集過程,並特別著重於軟體方面為理解要建立的程式的性質,軟體工程師(“分析員”)必須瞭解軟體的資訊範疇以及所需功能、效能和介面。把系統和軟體的需求製成文檔並與顧客聯合加以評審。
設計。軟體設計實際上是多步驟的過程,它著重於程式的3個顯著特徵:資料結構、軟體體繫結鉤和過程細節。在編碼前,設計過程把需求翻譯成可評估品質的軟體表示。像需求一樣,設計也要編製文檔並成為軟體配置的一部分。
編碼。設計必須被翻譯成機器可讀的形式。編碼階段就是做這項工作。如果設計做得詳細,編碼就能以機械的方式完成。
測試。一旦代碼產生,程式測試就開始。測試過程注重軟體內部邏輯和外部功能,對於前者,主要確保所有語句都測試到;對於後者,主要是確保已定義的輸入能產生與要求相符的實際結果。
維護。毫無疑問,軟體在交付使用者之後還要進行修改(嵌入式軟體可能例外)。由於遇到了一些差錯,由於必須調節軟體以適應外部環境變化(例如:由於新的作業系統或外部裝置產生的變化),或者由於使用者要求提高功能和效能,因此修改是必然的。軟體維護前述周期的每一步都適用於現存的程式(而非新程式)。
經典的生存周期是軟體工程中最早也是應用得最廣泛的範例。不過.最近幾年裡出現了對此範例的批評,即使是對此範例的積極支援者對它是否適合於所有情況也提出了質疑。應用傳統生存周期範例有時會遇到下列問題。
(1)實際工程很少遵循模型中提出的順序流。應用此範例時經常發生重複,併產生一些問題。
(2)要求使用者在開始時明確指出全部要求往往是困難的。經典的生存周期是這樣要求的,但由於許多工程開始時存在著自然的不確定性而很難滿足這種要求。
(3)使用者必須耐心,程式的工作版本到工程的後期才能使用,大錯在評審工作程式時仍未檢出將是災難性的。
所有這些問題都是實際存在的。儘管如此,經典的生存周期範例在軟體工程中佔有肯定的重要地位,它提出了一個包含分析、設計、編碼,測試和維護方法的模板。經典的生存周期仍然是軟體工程中應用最廣泛的過程模型,儘管它有一些不足,但比起雜亂無章地進行軟體開發要好得多。
NOTES
[1]the establishment... real machines:這是一個複合名詞短語,而不是一個句子;in order to引出的不定式作定語,修飾principle;that引導一個定語從句修飾software。
[2]reinforce:v.加強,強調。
[3]outgrowth:n.產物,副產品。
[4]classic life cycle:經典生存周期。
[5]waterfall model:瀑布模型。
[6]top-level design:頂層設計。
[7]The requirements... on software:此處gathering是名詞,與requirements組成的名詞片語,修飾process。此句譯為:強化需收集過程,並特別著重於軟體方面。
EXERCISES
1.Fill in the blanks using appropriate definition or term.
(1)In software development ______is most important.
(2)Software engineering is an outgrowth of______.
(3)Sometimes we call the life cycle paradigm of software engineering______.
(4)It is often difficult in the beginning for customer to______.
(5)When software must interface with hardware,people and databases______is necessary.
(6)Software design should become a part of______.
(7)______undetected until the working program is reviewed can be disastrous.
(8)After______program testing begins.
(9)The design process translates requirements into______.
(10)The life time paradigm of software has been modeled through______.
a.the“waterfall model”
b.the conventional engineering cycle
c.A major blunder
d.engineering discipline
e.software configuration
f.state all requirements explicitly
g.a system view
h.code has been generated
i.hardware and system engineering
j.a representation of the software
2.Multiple choices.
(1)Software engineering encompasses the following key
a.programming
b.procedures
c.tools
d.elements
(2)The life cycle paradigm of software engineering requires approach.
a.a systematic
b.a random
c.a sequential
d.a conventional engineering-modeled
(3)Software design focuses on
a.data structure
b.software architecture
c.document
d.procedural detail
(4)Coding in software engineering can be
b.translated into a machine-readable form
c.taken before maintenance
d.taken after maintenance
(5)Testing process focuses on
a.the functional internals
b.the logical internals
c.the functional externals
d.the logical externals
(6)Maintenance is necessary because
a.software undergoes change after it is delivered to the customer
b.software is embedded
c.some errors have been encountered
d.the customer requires performance enhancements
(7)The classic life cycle paradigm has
a.a definite place in software engineering
b.a template for analysis,design,coding,testing and maintenance
c.a definition of software engineering
d.been criticized over the past few years
(8)The classic life cycle includes
a.design
b.coding
c.analysis
d.maintenance
(9)Software requirements analysis includes
a.understanding the nature of the programs
b.understanding the information domain
c.understanding required developers
d.gathering process
(10)Goal of software engineering is
a.to obtain economically software
b.to obtain efficiently work on real computer
c.to obtain reliable work on real machine
d.to provide sound software engineering principles
key:
1.(1)d(2)i(3)a (4)f(5)g(6)e(7)c (8)h(9)j(10)b
2.(1)b,c,d(2)a,c,d(3)a,b,c,d(4)a,b,c(5)b,c
(6)a,c,d(7)a,b,c,d(8)a,b,c,d(9)a,b,d(10)a,b,c,d