Advanced Software Engineering
Lecture 2: The Software Process
Today’s Topics The role of process in SE Typical process elements Evolution of processes (CMM) Specific life-cycle models Associated Reading:
Chapter 4 in SEPA 5/e
Fundamental Questions
What is the problem to be solved? What are the characteristics of a possible
solution? How will the solution be designed? How will the solution be built? How will we test the design and implementation? How will we maintain over time?
3 Conceptual Phases Definition
• What is to be constructed?
Development• How shall we construct it?
Support• How will we maintain it over time?
Who are the Players? Roles
• Client: person(s) requesting the SW
• Developer: person(s) building the SW
• User: person(s) using the SW
User and client may be different! Internal SW development vs.
contract SW development
Typical Activities (Phases)
Requirements Elicitation (Phase) Specification Phase Design Phase Implementation Phase Integration Phase Maintenance Phase Retirement Phase
Requirements Elicitation (Phase)
What’s the problem? What are the constraints?
• Cost, deadlines, performance, platform, …
Elicitation of requirements Successive refinement
• Technical feasibility
• Financial justification
Requirements [2] Challenges:
• “I know this is what I asked for, but it’s not what I needed”
• Software is complex
• The customer doesn’t understand the problem well
Possible Solution: rapid prototyping
Specification Phase Specification Document
• Explicit description of functionality
• Explicit list of constraints
• List of inputs and outputs
Specification is a Contract• Includes acceptance criteria
• Should be written as precisely as possible!
Specification Phase [2]
Challenges• Ambiguous: a specification has more than one interpretation
• Incomplete: an important specification is omitted
• Contradictory: two statements about the same situation which don’t agree
Possible Solution:formal specification review
Design Phase
Specification=“what” to build Design=“how” to build it Data flow Modular decomposition Algorithms and data structures Two components:
• Architectural Design (global level)• Detailed Design (module level)
Design Phase [2]
Challenges:• Generality vs. Complexity
• Planning for future enhancements
• Design for reusability, maintainability
Approach:• Be explicit about your goals
• Conduct formal design reviews
Implementation Phase
Coding up the data structures, algorithms, and modules Commenting the code Separate written documentation Testing document, test cases Unit (module) Testing Evaluation:
formal code walk-throughs
Integration Phase
Combine all the modules Realistic operational tests Methods
• Bottom-up integration
• Top-down integration
Challenges• Both methods have drawbacks
• Best to integrate while implementing
Integration Phase [2]
Product Testing• Developer vs. SQA group
• Installation testing
• Documentation testing
• Performance testing
• Robustness testing
Acceptance Testing• Client tests specified functionality
Maintenance Phase Activities
• Correction
• Adaptation
• Enhancement
• Prevention
Integration• Regression testing
Retirement Phase
Good software is maintained Sometimes software is rewritten from scratch
• Software is now unmaintainable because• A drastic change in design has occurred• The product must be implemented on a totally new
hardware/operating system• Documentation is missing or inaccurate• Hardware is to be changed—it may be cheaper to rewrite the software
from scratch than to modify it
True retirement is a rare event
Process-Specific Difficulties
Does the product meets the user’s real needs? Is the specification document free of ambiguities,
contradictions, and omissions?
Umbrella Activities
Project tracking, formal reviews Formal technical reviews Quality assurance Configuration management Documentation preparation and production Reusability management Measurement / testing Risk management
Common process framework Tasks Milestones, deliverables SQA points
Process Evolution How can we measure the effectiveness of our SE
processes? Reflective practice involves a cycle of
measurement, analysis, and adjustment(“learning from experience”)
Capability Maturity Model (CMM)
Improving the Software Process
U.S. Department of Defense initiative Software Engineering Institute (SEI) The fundamental problem with software
• The software process is badly managed
Improving the Software Process (contd)
Software process improvement initiatives• Capability maturity model (CMM)
• ISO 9000-series
• ISO/IEC 15504
Capability Maturity Model
Not a life-cycle model A set of strategies for improving the software process
• SW–CMM for software• P–CMM for human resources (“people”)• SE–CMM for systems engineering• IPD–CMM for integrated product development• SA–for software acquisition
These strategies are being unified into CMMI (capability maturity model integration)
SW–CMM
A strategy for improving the software process Put forward in 1986 by the SEI Fundamental ideas:
• Improving the software process leads to• Improved software quality• Delivery on time, within budget
• Improved management leads to• Improved techniques
Five levels of “maturity” are defined Organization advances stepwise from level to level
Level 1. Initial Level
Ad hoc approach• Entire process is unpredictable
• Management consists of responses to crises
Most organizations world-wide are at level 1
Level 2. Repeatable Level
Basic software management• Management decisions should be made on the basis of
previous experience with similar products• Measurements (“metrics”) are made• These can be used for making cost and duration predictions in
the next project• Problems are identified, immediate corrective action is taken
Level 3. Defined Level
The software process is fully documented• Managerial and technical aspects are clearly defined
• Continual efforts are made to improve quality, productivity
• Reviews are performed to improve software quality
• CASE tools are applicable now (and not at levels 1 or 2)
Level 4. Managed Level
Quality and productivity goals are set for each project• Quality, productivity are continually monitored
• Statistical quality controls are in place
Level 5. Optimizing Level
Continuous process improvement• Statistical quality and process controls
• Feedback of knowledge from each project to the next
Summary
Key Process Areas
There are key process areas (KPAs) for each level Level 2 KPAs include:
• Requirements management• Project planning• Project tracking• Configuration management• Quality assurance
Compare• Level 2: Detection and correction of faults• Level 5: Prevention of faults
Experience
It takes:• 3 to 5 years to get from level 1 to level 2
• 1.5 to 3 years from level 2 to level 3
• SEI questionnaires highlight shortcomings, suggest ways to improve the process
Original idea:• Defense contracts would be awarded only to capable
firms
Experience (contd)
Profitability• Hughes Aircraft (Fullerton, CA) spent $500K (1987–90)
• Savings: $2M per year, moving from level 2 to level 3
• Raytheon moved from level 1 in 1988 to level 3 in 1993• Productivity doubled
• Return of $7.70 per dollar invested in process improvement
Other SPI Initiatives Other software process improvement (SPI) initiatives:
• ISO 9000-series
• ISO/IEC 15504
ISO 9000
Set of five standards for industrial activities• ISO 9001 for quality systems
• ISO 9000-3, guidelines to apply ISO 9001 to software
• There is an overlap with CMM, but they are not identical
• Not process improvement
• Stress on documenting the process
• Emphasis on measurement and metrics
• ISO 9000 is required to do business with the E.U.
• Also by many U.S. businesses, for example, GE
• More and more U.S. businesses are ISO 9000 certified
ISO/IEC 15504
Original name: Software Process Improvement Capability dEtermination (SPICE)• International process improvement initiative
• Started by British Ministry of Defence (MOD)
• Includes process improvement, software procurement
• Extends and improves CMM, ISO 9000
• Framework, not a method• CMM, ISO 9000 conform to this framework
• Now referred to as ISO/IEC 15504
• Or just 15504 for short
Process Improvement Data
SEI report on 13 organizations in the original study They used a variety of process improvement techniques, not
just SW–CMM
Process Improvement Data (contd)
Results of 34 Motorola projects
Software Process Models
Strategies encompassing process, methods, tools and generic steps
Choice based on nature of the application Cycle: from status quo, to new problem
definition, to new technical development, to solution integration (Figure 2.3a, SEPA 5/e)
The Basic Process Loop
[from SEPA 5/e]
Steps:• System engineering
• Requirements analysis
• Design
• Code generation
• Testing
• Maintenance
Linear Sequential Model
Linear Sequential Model
[From SEPA 5/e]
Linear Sequential Model
Challenges:• Real projects rarely follow sequential flow (changes cause
confusion)
• Difficult for customer to state requirements explicitly
• Customer must have patience
• Developers sometimes delayed unnecessarily (‘blocking states’)
Prototyping Model
Steps: • Listen to customer
• Build prototype
• Customer “test drives” prototype
Challenges:• “Throw-away” phenomenon
• Demos can set unrealistic expectations
• Compromises that solidify
Prototyping Model
[From SEPA 5/e]
RAD Model
Rapid Application Development Linear sequential, short cycle
(60-90 days) Steps:
• Business modeling• Data modeling• Process modeling• Application generation• Testing and turnover
Rapid ApplicationDevelopment (RAD)
[From SEPA 5/e]
RAD Model
Challenges:• For large projects, sufficient resources are needed for rapid
cycle
• Strong commitment from developers and customers
• Presupposes modular solution
• Reusability sometimes implies loss of performance
The Incremental Model
Linear sequential, with iterative prototyping “Core product” vs. incremental enhancements Each increment operational Useful when human/machine resources are
limited
Incremental Model[From SEPA 5/e]
The Spiral Model
Iterative prototyping, with framework activities For example:
• First circuit: specification
• Second circuit: prototype
• Third circuit: product release
Includes development and maintenance
Spiral Model
[From SEPA 5/e]
The Spiral Model (2)
Challenges:• Hard to show controllability
(size and timing of each circuit)
• Risk assessment is fundamental
• Model fairly new (less experience)
WINWIN Spiral
A variation of the standard Spiral Model Identify key “stakeholders” Determine stakeholder win conditions Reconcile win conditions into a set of win-win
conditions for the whole project
WINWIN Spiral
[From SEPA 5/e]
Component Assembly Model
Spiral Model, plus object-oriented reusability Challenges:
• Reusability requires careful planning
• Most existing programs are not reusable
• More suitable for particular application domains(with significant patterns of reuse)
Component Assembly[From SEPA 5/e]
Concurrent Development
State charts for each activity Events trigger state transitions Useful for interorganizational development Useful where there is a high degree of
interdependence between different modules (e.g., client-server apps)
Concurrent DevelopmentModel
[From SEPA 5/e]
Other Models
Formal Methods• Rigorous mathematical (logical) specification of software
• Formal models are time-consuming
• Requires developer, customer skill
Fourth Generation Techniques• High-level definition language
• E.g., UML -> Java code generation
• Benefits small/midsize projects most
Product and Process
Advances in one area trigger advances in another “Pendulum” phenomenon “The process should be as enjoyable as the
product”
Questions?