CSC 480 Software Engineering Lecture 2 August 23, 2004
Jan 13, 2016
CSC 480Software Engineering
Lecture 2August 23, 2004
CSC 480 Software Engieering 28/26/2002
Topics
Overview Process models Iterative models
CSC 480 Software Engieering 38/26/2002
Process
A software process is a set of activities that leads to the production of a software system. It consists of partially ordered steps to achieve a goal
In software engineering, your goal is to Efficiently and predictably deliver a software product
that meets the need of your business What are the steps? In what order?
There is not one single answer to all cases
CSC 480 Software Engieering 48/26/2002
Some Application Types
Stand-alone residing on a single computer e.g., word processor
Distributed consist of parts interacting across a network e.g., Web-based video game
Embedded part of unique application involving hardware e.g., automobile controller
Real-time functions must execute within small time limit (typically micro-sec) e.g., radar software
CSC 480 Software Engieering 58/26/2002
Trends & Influences
Structured programming Object-Orientation Reuse and components Formal methods
CSC 480 Software Engieering 68/26/2002
Structured Programming
Use control constructs, avoid using gotoA hierarchy of functions, with those in higher
levels calling those at lower levelsModules tend to couple with each other,
making change difficult
CSC 480 Software Engieering 78/26/2002
Illustration – Structured Programming
CSC 480 Software Engieering 88/26/2002
Object-Orientation
Encapsulate data and functionality in objectsMapping to real-world entities
Both congregation and inheritance hierarchies
Easier to modify and add components
CSC 480 Software Engieering 98/26/2002
Illustration – Object Orientation
CSC 480 Software Engieering 108/26/2002
Class & Object Hierarchies
CSC 480 Software Engieering 118/26/2002
Reuse & Components
Reuse can reduce cost and improve quality
Reuse at component level is more effective
COM JavaBeans
Example – a JClass chart by sitraka.com
CSC 480 Software Engieering 128/26/2002
Formal Methods
SE methods that rely on mathematics as their base are called formal methods.
The logical, not the computational aspects are used
Requirements and design can be express more precisely
Domain element A
Range element A(x)
1 4
2 6
3 3
4 4
5 6
6 8
t, t´ : N N
dom(t´) = dom(t) rng(t´) = rng(t) x, y dom(t), x y t´(x) t´(y) x rng(t´), card[ t´-1(x) ] = card[ t-1(x) ]
SortPartial function
Range of t
Number ofelements in the set ...
Set of elementsmapped onto x by t
“implies”
CSC 480 Software Engieering 138/26/2002
A Typical S.E. Roadmap1. Understand nature & scope of proposed product
2. Select the development process, and create a plan
4. Design and build the product
6. Deliver and maintain the product
3. Gather requirements
5. Test the product Activities commonly found in all projects
CSC 480 Software Engieering 148/26/2002
Five Key Expectations (Humphrey)
Influencedby people
Used forprocess development
Part oftheproject
Aspectof the product
3. Keep all work visible
5. Measure quality
4. A. Design onlyagainst requirements
B. Programonly against designsC. Test only against
requirements and designs
1. Predetermine quantitative quality goals
2. Accumulate data for subsequent use
CSC 480 Software Engieering 158/26/2002
Software Process Models
A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective
CSC 480 Software Engieering 168/26/2002
Process Models The waterfall model
Separate and distinct phases of specification and development
Evolutionary development Specification and development are interleaved
Formal systems development A mathematical system model is formally transformed to an
implementation
Reuse-based development The system is assembled from existing components
CSC 480 Software Engieering 178/26/2002
The Waterfall Model
Requirementsanalysis
Design
Implementation
Integration & Test
Produces … specification
... diagrams & text
... code & comments
... test report for entire code
Operation & Maintenance... user manual & enhancements
CSC 480 Software Engieering 188/26/2002
Waterfall Model Problems
Inflexible partitioning of the project into distinct stages
This makes it difficult to respond to changing customer requirements
Therefore, this model is only appropriate when the requirements are well-understood
The customer cannot see how the system works until the end of the project
CSC 480 Software Engieering 198/26/2002
Process Iteration (iterative models)
System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems
Iteration can be applied to any of the generic process models
CSC 480 Software Engieering 208/26/2002
Spiral Development
Process is represented as a spiral rather than as a sequence of activities with backtracking
Each loop in the spiral represents a phase in the process.
No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required
Risks are explicitly assessed and resolved throughout the process
CSC 480 Software Engieering 218/26/2002
The Spiral Model
Riskanalysis
Riskanalysis
Riskanalysis
Riskanalysis Proto-
type 1
Prototype 2Prototype 3
Opera-tionalprotoype
Concept ofOperation
Simulations, models, benchmarks
S/Wrequirements
Requirementvalidation
DesignV&V
Productdesign Detailed
design
CodeUnit 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
CSC 480 Software Engieering 228/26/2002
Incremental Development Rather than deliver the system as a single
delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality User requirements are prioritised and the highest
priority requirements are included in early increments Once the development of an increment is started, the
requirements are frozen though requirements for later increments can continue to evolve
CSC 480 Software Engieering 238/26/2002
Incremental Development
Valida teincrement
Develop systemincrement
Design systemarchitecture
Integrateincrement
Valida tesystem
Define outline requirements
Assign requirements to increments
System incomplete
Finalsystem
CSC 480 Software Engieering 248/26/2002
Iteration No.
Analyzerequirements
Test whole
Implement
Design
Test units
Integrate
1 2 3 867 868
Update SRS3
Update SDS2
Update source code
Update Test documentation
Update SPMP1
1 Software Project Management Plan; 2 Software Design Specification;3 Software Requirements Specification
CSC 480 Software Engieering 258/26/2002
Incremental Development
Advantages Customer value can be delivered with each
increment so system functionality is available earlier Early increments act as a prototype to help elicit
requirements for later increments Lower risk of overall project failure The highest priority system services tend to receive
the most testing
CSC 480 Software Engieering 268/26/2002
USDP: Classification of Iterations
Inception iterations: preliminary interaction with stakeholders primarily customer users financial backers etc.
Elaboration iterations : finalization of what’s wanted and needed; set architecture baseline
Construction iterations : results in initial operational capability
Transition iterations : completes product release Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
CSC 480 Software Engieering 278/26/2002
ElaborationInception Construction Transition
Requirements
Analysis
Iter.#1
Iter.#n
Iter.#n+1
Iter.#m
Iter.#m+1
Iter.#k
….. …..Prelim.iterations
USDP vs. Standard Terminology ½ (Booch, Jacobson & Rumbaugh)
Design
Implemen-tation
Test
USDP calls these “core workflows”
(Classically called “phases”)
Classification of iterations
Individual iteration
CSC 480 Software Engieering 288/26/2002
Requirements
Analysis
USDP vs. Standard Terminology 2 of 2
Design
Implementation
Test
Requirements analysis
Implementation
USDP Terminology
Classical Terminology
Integration
Design
Test
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
CSC 480 Software Engieering 298/26/2002
Elaboration
Unified Process MatrixInception Construction Transition
Requirements
Analysis
Jacobson et al: USDP
Prelim.iterations
Iter.#1
Iter.#n
Iter.#n+1
Iter.#m
Iter.#m+1
Iter.#k
….. …..
Design
Implemen-tation
Test
..
Amount of effort expendedon the requirements phaseduring the first Constructioniteration
CSC 480 Software Engieering 308/26/2002
The Six USDP Models (Views of the Application)
Use-casemodel
Analysismodel
Designmodel
Deploymentmodel
Implementationmodel
Testmodel
Graphics reproduced with permission from Corel.
CSC 480 Software Engieering 318/26/2002
Identify the Process You Will Use1. Decide which of waterfall, spiral, and incremental
processes is appropriate.Usually a spiral for a semester project.
Combining parts is OK e.g. start with spiral, end with incremental
2. Decide how many iterations.Usually two for a semester project (there are many artifacts to
coordinate at the end of each iteration).
Three provides lots of practice -- but this is a challenge; make the first increment as minor as possible
Three promotes the collection and use of metric data -- use metric data collected from each iteration on next.
3. Rough out a weekly schedule. Coordinate with course assignments.
(The next chapter discusses scheduling.)
Adapted from Software Engineering: An Object-Oriented Perspective by Eric J. Braude (Wiley 2001), with permission.
CSC 480 Software Engieering 328/26/2002
Extreme Programming
New approach to development based on the development and delivery of very small increments of functionality
Relies on constant code improvement, user involvement in the development team and pairwise programming
Visit www.extremeprogramming.org for details
CSC 480 Software Engieering 338/26/2002
Process Trade-offs
Factor Pure Waterfall
Iterative
Spiral
Iterative
Incremental
Ease of doc control
Easier Harder Harder/Medium
Enabling of customer interaction
Harder Easier Easier
Promotion of good design
Medium/Easier
Easier Harder
Leverage of metric data
Harder Medium/Easier
Medium/Easier
CSC 480 Software Engieering 348/26/2002
Additional Info
CSC 480 Software Engieering 358/26/2002
More Detailed Waterfall Version
Design
Implementation& unit testing
Integration
System testing
Conceptanalysis
Analysis
Maintenance
CSC 480 Software Engieering 368/26/2002
Evolutionary Development
Exploratory development Objective is to work with customers and to evolve a
final system from an initial outline specification. Should start with well-understood requirements
Throw-away prototyping Objective is to understand the system
requirements. Should start with poorly understood requirements
CSC 480 Software Engieering 378/26/2002
Evolutionary Development
ValidationFinal
version
Development Intermediateversions
Specification Initialversion
Outlinedescription
Concurrentactivities
CSC 480 Software Engieering 388/26/2002
Evolutionary Development Problems
Lack of process visibility Systems are often poorly structured Special skills (e.g. in languages for rapid prototyping)
may be required
Applicability For small-/medium-size interactive systems For parts of large systems (e.g. the UI) For short-lifetime systems
CSC 480 Software Engieering 398/26/2002
Formal Systems Development
Based on the transformation of a mathematical specification through different representations to an program
Transformations are ‘correctness-preserving’ so it is straightforward to show that a program conforms to its specification
Embodied in the ‘Cleanroom’ approach to software development
CSC 480 Software Engieering 408/26/2002
Formal Systems Development
Requirementsdefinition
Formalspecification
Formaltransformation
Integration andsystem testing
CSC 480 Software Engieering 418/26/2002
Formal Transformations
R2Formalspecification R3 Executable
program
P2 P3 P4
T1 T2 T3 T4
Proofs of transformation correctness
Formal transformations
R1
P1
CSC 480 Software Engieering 428/26/2002
Formal Systems Development
Problems Need for specialised skills and training to apply the
technique Difficult to formally specify some aspects of the
system such as the user interface
Applicability Critical systems especially those where a safety or
security case must be made before the system is put into operation
CSC 480 Software Engieering 438/26/2002
Reuse-Oriented Development
Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems
This approach is becoming more important but still limited experience with it
CSC 480 Software Engieering 448/26/2002
Reuse-Oriented Development
Requirementsspecification
Componentanalysis
Developmentand integration
System designwith reuse
Requirementsmodification
Systemvalidation
Process stagesComponent analysisRequirements modificationSystem design with reuseDevelopment and integration
CSC 480 Software Engieering 458/26/2002
The Spiral Model
CSC 480 Software Engieering 468/26/2002
Spiral Model Sectors Objective setting
Specific objectives for the phase are identified Risk assessment and reduction
Risks are assessed and activities put in place to reduce the key risks
Development and validation A development model is chosen
Planning The project is reviewed and the next phase of the spiral is
planned