l coherent sets of activities for specifying, designing ...scharff/cs389/ref/ch3cs389.pdf · ©ian...
TRANSCRIPT
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 1
Software Processes
l Coherent sets of activities forspecifying, designing, implementingand testing software systems
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 2
Objectives
l To introduce software process models
l To describe a number of different process modelsand when they may be used
l To describe outline process models forrequirements engineering, software development,testing and evolution
l To introduce CASE technology to supportsoftware process activities
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 3
Topics covered
l Software process models
l Process iteration
l Software specification
l Software design and implementation
l Software validation
l Software evolution
l Automated process support
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 4
The software process
l A structured set of activities required to develop asoftware system• Specification
• Design
• Validation
• Evolution
l A software process model is an abstractrepresentation of a process. It presents adescription of a process from some particularperspective
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 5
Software process models
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 6
Generic software process models
l The waterfall model• Separate and distinct phases of specification and development
l Evolutionary development• Specification and development are interleaved
l Formal systems development• A mathematical system model is formally transformed to an
implementation
l Reuse-based development• The system is assembled from existing components
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 7
Waterfall modelRequirements
definition
System andsoftware design
Implementationand unit testing
Integration andsystem testing
Operation andmaintenance
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 8
Waterfall model phases
l Requirements analysis and definition
l System and software design
l Implementation and unit testing
l Integration and system testing
l Operation and maintenance
l The drawback of the waterfall model is thedifficulty of accommodating change after theprocess is underway
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 9
Waterfall model problems
l Inflexible partitioning of the project into distinctstages
l This makes it difficult to respond to changingcustomer requirements
l Therefore, this model is only appropriate whenthe requirements are well-understood
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 10
Evolutionary development
l Exploratory development• Objective is to work with customers and to evolve a final
system from an initial outline specification. Should start withwell-understood requirements
l Throw-away prototyping• Objective is to understand the system requirements. Should start
with poorly understood requirements
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 11
Evolutionary development
Validation Finalversion
Development Intermediateversions
Specification Initialversion
Outlinedescription
Concurrentactivities
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 12
Evolutionary development
l Problems• Lack of process visibility
• Systems are often poorly structured
• Special skills (e.g. in languages for rapid prototyping) may berequired
l Applicability• For small or medium-size interactive systems
• For parts of large systems (e.g. the user interface)
• For short-lifetime systems
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 13
Formal systems development
l Based on the transformation of a mathematicalspecification through different representations toan executable program
l Transformations are ‘correctness-preserving’ so itis straightforward to show that the programconforms to its specification
l Embodied in the ‘Cleanroom’ approach tosoftware development
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 14
Formal systems development
Requirementsdefinition
Formalspecification
Formaltransformation
Integration andsystem testing
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 15
Formal transformations
R2Formalspecification R3 Executable
program
P2 P3 P4
T1 T2 T3 T4
Proofs of transformation correctness
Formal transformations
R1
P1
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 16
Formal systems development
l Problems• Need for specialised skills and training to apply the technique
• Difficult to formally specify some aspects of the system such asthe user interface
l Applicability• Critical systems especially those where a safety or security case
must be made before the system is put into operation
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 17
Reuse-oriented development
l Based on systematic reuse where systems areintegrated from existing components or COTS(Commercial-off-the-shelf) systems
l Process stages• Component analysis
• Requirements modification
• System design with reuse
• Development and integration
l This approach is becoming more important butstill limited experience with it
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 18
Reuse-oriented development
Requirementsspecification
Componentanalysis
Developmentand integration
System designwith reuse
Requirementsmodification
Systemvalidation
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 19
Process iteration
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 20
Process iteration
l System requirements ALWAYS evolve in thecourse of a project so process iteration whereearlier stages are reworked is always part of theprocess for large systems
l Iteration can be applied to any of the genericprocess models
l Two (related) approaches• Incremental development
• Spiral development
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 21
Incremental development
l Rather than deliver the system as a singledelivery, the development and delivery is brokendown into increments with each incrementdelivering part of the required functionality
l User requirements are prioritised and the highestpriority requirements are included in earlyincrements
l Once the development of an increment is started,the requirements are frozen though requirementsfor later increments can continue to evolve
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 22
Incremental development
Validateincrement
Develop systemincrement
Design systemarchitecture
Integrateincrement
Validatesystem
Define outline requirements
Assign requirements to increments
System incomplete
Finalsystem
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 23
Incremental development advantages
l Customer value can be delivered with eachincrement so system functionality is availableearlier
l Early increments act as a prototype to help elicitrequirements for later increments
l Lower risk of overall project failure
l The highest priority system services tend toreceive the most testing
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 24
Extreme programming
l New approach to development based on thedevelopment and delivery of very smallincrements of functionality
l Relies on constant code improvement, userinvolvement in the development team andpairwise programming
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 25
Spiral development
l Process is represented as a spiral rather than as asequence of activities with backtracking
l Each loop in the spiral represents a phase in theprocess.
l No fixed phases such as specification or design -loops in the spiral are chosen depending on whatis required
l Risks are explicitly assessed and resolvedthroughout the process
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 26
Spiral model of the software process
Riskanalysis
Riskanalysis
Riskanalysis
Riskanalysis Proto-
type 1
Prototype 2
Prototype 3Opera-tionalprotoype
Concept ofOperation
Simulations, models, benchmarks
S/Wrequirements
Requirementvalidation
DesignV&V
Productdesign Detailed
design
Code
Unit test
IntegrationtestAcceptance
testService Develop, verifynext-level product
Evaluate alternativesidentify, resolve risks
Determine objectivesalternatives and
constraints
Plan next phase
Integrationand test plan
Developmentplan
Requirements planLife-cycle plan
REVIEW
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 27
Spiral model sectors
l Objective setting• Specific objectives for the phase are identified
l Risk assessment and reduction• Risks are assessed and activities put in place to reduce the key
risks
l Development and validation• A development model for the system is chosen which can be
any of the generic models
l Planning• The project is reviewed and the next phase of the spiral is
planned
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 28
Software specification
l The process of establishing what services arerequired and the constraints on the system’soperation and development
l Requirements engineering process• Feasibility study
• Requirements elicitation and analysis
• Requirements specification
• Requirements validation
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 29
The requirements engineering process
Feasibilitystudy
Requirementselicitation and
analysisRequirementsspecification
Requirementsvalidation
Feasibilityreport
Systemmodels
User and systemrequirements
Requirementsdocument
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 30
Software design and implementation
l The process of converting the systemspecification into an executable system
l Software design• Design a software structure that realises the specification
l Implementation• Translate this structure into an executable program
l The activities of design and implementation areclosely related and may be inter-leaved
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 31
Design process activities
l Architectural design
l Abstract specification
l Interface design
l Component design
l Data structure design
l Algorithm design
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 32
The software design process
Architecturaldesign
Abstractspecification
Interfacedesign
Componentdesign
Datastructuredesign
Algorithmdesign
Systemarchitecture
Softwarespecification
Interfacespecification
Componentspecification
Datastructure
specification
Algorithmspecification
Requirementsspecification
Design activities
Design products
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 33
Design methods
l Systematic approaches to developing a softwaredesign
l The design is usually documented as a set ofgraphical models
l Possible models• Data-flow model
• Entity-relation-attribute model
• Structural model
• Object models
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 34
Programming and debugging
l Translating a design into a program and removingerrors from that program
l Programming is a personal activity - there is nogeneric programming process
l Programmers carry out some program testing todiscover faults in the program and remove thesefaults in the debugging process
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 35
The debugging process
Locateerror
Designerror repair
Repairerror
Re-testprogram
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 36
Software validation
l Verification and validation is intended to showthat a system conforms to its specification andmeets the requirements of the system customer
l Involves checking and review processes andsystem testing
l System testing involves executing the systemwith test cases that are derived from thespecification of the real data to be processed bythe system
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 37
The testing process
Sub-systemtesting
Moduletesting
Unittesting
Systemtesting
Acceptancetesting
Componenttesting
Integration testing Usertesting
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 38
Testing stagesl Unit testing
• Individual components are tested
l Module testing• Related collections of dependent components are tested
l Sub-system testing• Modules are integrated into sub-systems and tested. The focus
here should be on interface testing
l System testing• Testing of the system as a whole. Testing of emergent properties
l Acceptance testing• Testing with customer data to check that it is acceptable
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 39
Testing phases
Requirementsspecification
Systemspecification
Systemdesign
Detaileddesign
Module andunit codeand tess
Sub-systemintegrationtest plan
Systemintegrationtest plan
Acceptancetest plan
Service Acceptancetest
Systemintegration test
Sub-systemintegration test
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 40
Software evolution
l Software is inherently flexible and can change.
l As requirements change through changingbusiness circumstances, the software thatsupports the business must also evolve andchange
l Although there has been a demarcation betweendevelopment and evolution (maintenance) this isincreasingly irrelevant as fewer and fewersystems are completely new
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 41
System evolution
Assess existingsystems
Define systemrequirements
Propose systemchanges
Modifysystems
Newsystem
Existingsystems
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 42
Automated process support
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 43
CASE
l Computer-aided software engineering (CASE) issoftware to support software development andevolution processes
l Activity automation• Graphical editors for system model development
• Data dictionary to manage design entities
• Graphical UI builder for user interface construction
• Debuggers to support program fault finding
• Automated translators to generate new versions of a program
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 44
Case technology
l Case technology has led to significantimprovements in the software process though notthe order of magnitude improvements that wereonce predicted• Software engineering requires creative thought - this is not
readily automatable
• Software engineering is a team activity and, for large projects,much time is spent in team interactions. CASE technology doesnot really support these
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 45
CASE classification
l Classification helps us understand the differenttypes of CASE tools and their support for processactivities
l Functional perspective• Tools are classified according to their specific function
l Process perspective• Tools are classified according to process activities that are
supported
l Integration perspective• Tools are classified according to their organisation into
integrated units
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 46
Functional tool classificationTool type ExamplesPlanning tools PERT tools, estimation tools,
spreadsheetsEditing tools Text editors, diagram editors, word
processorsChange management tools Requirements traceability tools, change
control systemsConfiguration management tools Version management systems, system
building toolsPrototyping tools Very high-level languages,
user interface generatorsMethod-support tools Design editors, data dictionaries, code
generatorsLanguage-processing tools Compilers, interpretersProgram analysis tools Cross reference generators, static
analysers, dynamic analysersTesting tools Test data generators, file comparatorsDebugging tools Interactive debugging systemsDocumentation tools Page layout programs, image editorsRe-engineering tools Cross-reference systems, program re-
structuring systems
Activity-based classification
Reengineering tools
Testing tools
Debugging tools
Program analysis tools
Language-processingtools
Method support tools
Prototyping tools
Configurationmanagement tools
Change management tools
Documentation tools
Editing tools
Planning tools
Specification Design Implementation Verificationand
Validation
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 48
CASE integration
l Tools• Support individual process tasks such as design consistency
checking, text editing, etc.
l Workbenches• Support a process phase such as specification or design,
Normally include a number of integrated tools
l Environments• Support all or a substantial part of an entire software process.
Normally include several integrated workbenches
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 49
Tools, workbenches, environments
Single-methodworkbenches
General-purposeworkbenches
Multi-methodworkbenches
Language-specificworkbenches
Programming TestingAnalysis anddesign
Integratedenvironments
Process-centredenvironments
FilecomparatorsCompilersEditors
EnvironmentsWorkbenchesTools
CASEtechnology
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 50
Key points
l Software processes are the activities involved inproducing and evolving a software system. Theyare represented in a software process model
l General activities are specification, design andimplementation, validation and evolution
l Generic process models describe the organisationof software processes
l Iterative process models describe the softwareprocess as a cycle of activities
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 1 Slide 51
Key points
l Requirements engineering is the process ofdeveloping a software specification
l Design and implementation processes transformthe specification to an executable program
l Validation involves checking that the systemmeets to its specification and user needs
l Evolution is concerned with modifying thesystem after it is in use
l CASE technology supports software processactivities