Transcript Software Process - CS Division
Introduction to Software Process
CEN 5016 Software Engineering © Dr. David A. Workman School of EE and Computer Science
January 9, 2007
Software Engineering
DEFINITION
[Barry Boehm’76]
.
The practical application of scientific knowledge in the design and construction of computer programs and the associated documentation
required to develop, operate, and maintain them.
– – – – –
Practical Applications Scientific Knowledge Design and Construction Computer Programs and Documentation Develop, operate, and maintain
DEFINITION
[IEEE 1993]
1. The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is, the application of engineering to software.
2. The study of approaches relevant to 1 .
January 9, 2007 (c) Dr. David A. Workman 2
Computer Science
DEFINITION
Computer Science is concerned with the scientific study and description of algorithms, programs, the devices that interpret them, and the phenomena
surrounding their creation and usage.
Software Engineering focuses on the application of this scientific
knowledge to achieve stated technical, economic, and social goals.
[Peter Freeman’80]
January 9, 2007 (c) Dr. David A. Workman 3
Life Cycle vs. Development Cycle
Software Development Cycle “Cradle” “Grave” Need and Concept Formation Systems Engineering Software Requirements Elicitation Software Requirements Elaboration Software Specification and Project Planning Software Design Code & Unit Testing Component Integration and System Test Delivery Installation & Training Obsolescence and De-Commission Operation and Maintenance
January 9, 2007 (c) Dr. David A. Workman 4
Summary of the Software Lifecycle
Definition
The complete history of a software system from concept formation through decommission broken down into the following “maturation” phases:
–
Conception
– –
System Requirements elicitation and definition System Architecture Development
Systems Engineering
– –
Software Requirements elicitation and definition Software Requirements elaboration and specification
– –
Software Project Planning Design
• •
Architectural Design Detailed Design
–
Implementation
• •
Coding Unit Testing Construction
–
Integration
• •
Subsystem testing System testing (acceptance testing)
–
Operation & Maintenance
• • •
Corrective : removing bugs ( 17.5% ) Enhancement: improving exiting capability = perfective ( 60.5%) + adaptive ( 18% ) Reengineering (includes adaptive and perfective maintenance)
–
Retirement
January 9, 2007 (c) Dr. David A. Workman 5
Development Cycle Costs
Requirements = 6% Integration = 24% Unit Testing = 21% Specification = 15% Design = 19% Coding = 15%
January 9, 2007
(Schach - Classical and Object-Oriented Software Engineering)
(c) Dr. David A. Workman 6
•
Process Models
Definition
Process models are “ algorithms for developing software.” Software process is the execution of a process model.
Data = development artifacts; Processors = people; Algorithms = methods + tools
•
Water Fall Model (Winston Royce ’70)
–
First formal software development method (1950-70).
–
Each development phase was completed before the next could begin.
– –
Documents produced as the output of one phase become inputs to the next phase.
Did not allow for changing requirements. Frequently, the user was not happy with the delivered system.
Phases:
•
System Engineering
•
Software Requirements Analysis
• • • •
Software Design (Architectural & Detailed) Code and Unit Testing Integration Installation & Maintenance
January 9, 2007 (c) Dr. David A. Workman 7
Water Fall Model
Features & Contributions
– – – – – –
Author: Winston Royce 1970 First formal software development method (1950-70).
Encouraged specification of what the system is supposed to do before building it.
Encouraged planning and management monitoring and control.
Each development phase was completed before the next could begin.
Documents produced as the output of one phase become inputs to the next phase.
These documents provided a basis for verification and validation.
–
Did not allow for changing requirements. Frequently, the user was not happy with the delivered system.
Code & Unit Test System Requirements rework Software Requirements Architectural Design rework rework Detailed Design rework Integration & Test Installation & Maintenance rework
January 9, 2007 (c) Dr. David A. Workman 8
Water Fall Model
1. System Requirements:
The
system concept is defined
, customer and client
requirements are captured
,
hardware and software components
defined and
mapped
.
2. Software Requirements:
a formal (complete, precise, consistent, and unambiguous) description of
“what” each software component must do
is prepared by the developer and reviewed by the customer (
software specification document
); a
3. Design phase: software project plan
is produced at the end of this phase. The specification is elaborated in two steps that define
“how” the
product will work: Architectural Design breaks down the whole system into component parts ( modules ) and the interactions between them ( interfaces );
Detailed Design
involves elaborating the design of individual components by specifying data structures and algorithms.
4. Code & Unit:
Software module designs are translated to
code
and then
unit tested 5. Integration & Test: Software modules are integrated
into larger functional aggregates (subsystems) and
tested in the operational environment
. The final step tests the complete system
(acceptance testing or validation
– customer agrees that the system meets the specification) .
.
6. Installation & Maintenance:
The completed system is
installed
in the operational environment and
maintained (error correction and enhancement)
for the remainder of the system lifetime.
January 9, 2007 (c) Dr. David A. Workman 9
Water Fall Model
Errors Introduced Errors Detected Requirements Specification Design Code Unit Test Integration & Test Ref:
The Impact of Prototyping on Software System Engineering
, by Hassan Gomaa, George Mason University, IEEE System and Software Requirements Engineering, 1990.
January 9, 2007 (c) Dr. David A. Workman
System Acceptance Tests
10
Prototyping
•
Prototyping
The rapid and (relatively) inexpensive development of an operating model of the desired system (or a subset) developed only for the purpose of defining or elaborating requirements, and/or resolving unknown performance issues
before a full commitment of resources is made to produce the final system.
•
Benefits
–
Water Fall models limit the amount of iteration among phases – a key feature of prototyping is iterating rapidly through early phases of development.
–
Water Fall models tend to produce a working system very late in the development cycle – thus major problems may go undetected until the system is almost complete. Prototyping focuses on identifying major technical problems as early as possible.
–
System requirements cannot be properly validated without a working version – prototyping focuses on understanding and elaborating requirements through demonstration.
Ref:
The Impact of Prototyping on Software System Engineering
, by Hassan Gomaa, George Mason University, IEEE System and Software Requirements Engineering, 1990.
January 9, 2007 (c) Dr. David A. Workman 11
Prototyping
Requirements for a Prototype
1. It must be an actual working system with which one can experiment and from which lessons can be learned to revise the requirements specification.
2. It must be comparatively cheap to develop – approximately 10% of the total estimated cost of the complete system.
3. Must be developed quickly so that it may be evaluated early in the development cycle; it should be used to collect early feedback from system users.
Phases of Development
1. Preliminary analysis and specification of user requirements. (understand user's problem) 2. Design and implementation of a prototype. (emphasize user interface, small development team, development language, use prototyping development tools) 3. Exercise the prototype. (preliminary user training, user feedback) 4. Iterative refinement of the prototype. 5. Refinement of the requirements specification.
6. Design and implementation of the production system.
See Notes
January 9, 2007 (c) Dr. David A. Workman 12
• •
Prototyping
Throwaway Prototypes
are constructed as part of the problem understanding or analysis activity. Their purpose is to gain a deeper understanding of the problem and its feasible solutions. It is a learning device never intended for use - it is “thrown away” after it has served its purpose
.
–
Because the prototype will be discarded, the time and effort spent on satisfying non functional requirements and formal documentation can almost be eliminated. This reduces development time.
–
This approach should focus on understanding of requirements from the user's perspective and to obtain early user feedback.
Evolutionary Prototypes
are constructed to satisfy a subset of the system requirements - as refinements are made or layers of functionality are added, they “evolve” into the final system
. –
Because each increment or prototype version is to be of production quality, non functional requirements must be considered and some formal documentation must be part of the prototyping process.
–
The incremental nature of evolutionary prototyping ensures that a useful version of the system is produced earlier that water fall methods.
See Notes
January 9, 2007 (c) Dr. David A. Workman 13
Reengineering Process Model
Legacy System Proposed New Capability Reuse Libraries
January 9, 2007
New Requirements Identifiy off-the-shelf Units For reuse Without modification Establish Baseline Extract Requirements Legacy Requirements Legacy Test Procedures, Test Data & Results Legacy Baseline Extract Design Identified Legacy Units for Reuse & Modification Reuse & Modify Legacy Units Set of Test-ready Legacy Units Modified Requirements Legacy Design Requirements Analysis Design Changes Modify & Enhance Design Test Changes New Design New Design Re-Test Legacy Units Re-test Procedures Tested Legacy Units Produce New Test Plan New Unit test Procedures Integration test Procedures Integrate & Test All Units Construct & Test new Units Tested new Units Target System
(c) Dr. David A. Workman
Off-the-shelf Units ready for Integration
14
Spiral Model
A cyclic approach to software development marked by four basic stages that are repeated on each cycle until the target system is delivered. A risk-driven meta model .
Developed by Barry Boehm ,
“A Spiral Model of Software Development and Enhancement”,
IEEE Computer, Vol 21, No 5, May 1988.
Stage 1:
Identify objectives, alternative solutions, and constraints for the part of the system currently under consideration
.
Stage 2:
Evaluate alternatives and identify associated risks using prototyping and simulation
.
Stage 3:
Develop and verify the next system increment.
Stage 4:
Review outcome of earlier stages and plan the next cycle.
January 9, 2007 (c) Dr. David A. Workman 15
Spiral Model
See Notes 1:
Determine objectives, alternative solutions, & constraints.
2:
Evaluate alternatives and their risks
risk analysis prototyping Acceptance & Installation Planning Review 4:
Review outcome and Plan next cycle.
Test Design Implementation 3:
Develop, verify next system increment
.
January 9, 2007 (c) Dr. David A. Workman 16
See Notes
Measurement and Control
Nominal Process Flow or Execution Process Quality Assessment and Control Product Quality Assessment and Control Process Change Directives (Project Mangement) Progress & Quality Assessment Progress & Quality Data Effort and Size Metrics Product Specifications Development Activity or Procedure Raw Products Product Change Directives Quality Metrics Quality Review
January 9, 2007 (c) Dr. David A. Workman
Metrics Repository Quality Products (and specification for next Activity)
17
Unified Software Process Software Phases & Artifacts
Overview of USP
Use Case Model
Requirements Elicitation (Definition)
Problem Statement & User Needs
Requirements Elaboaration (OO-Analysis)
Analysis Model
January 9, 2007
The process of defining and modeling the Problem Space
Object-Oriented Design
The process of defining and modeling the Solution Space Design & Deployment Models
Object-Oriented Implementation (Programming)
(c) Dr. David A. Workman
Mapping design to Implementation Space Code in an OOPL (Ada95) (C++)(Java) Component Model
19
Birth
Overview of USP
Inception Elaboration Itera tion Itera tion Itera tion Itera tion Itera tion … Construction Itera tion Itera tion Death … Transition Itera tion Itera tion Itera tion
• • • •
Inception (focus on “Feasibility”)
Develop a vision of the end product and prepare a business case . Answers the questions:
•
What is the system boundary?
Begin to identify interfaces with systems outside the boundary.
•
What is the system going to do? What are the major classes of users?
Initial Use Case Model (Develop )( Identify and describe only a small % of use cases )
• •
What is a possible system architecture?
( Identify most
critical subsystems )
What is the project plan? What will the system cost?
(Develop a Project Management Plan) ( Identify critical risks )
•
Demonstrate feasibility by building a prototype .
Elaboration Construction Transition
January 9, 2007 (c) Dr. David A. Workman 20
Birth
Overview of USP
Inception Elaboration Itera tion Itera tion Itera tion Itera tion Itera tion … Construction Itera tion Itera tion Death … Transition Itera tion Itera tion Itera tion Arch. Design Detailed Design
• • • •
Inception Elaboration ( focus on “Do-Ability” )(Architecture + high-fidelity cost est.)
– –
Develop detailed use cases (80% of use cases).
Develop a stable architectural view of the system using the Analysis Model, Design Model, Implementation Model, and Deployment Model .
– –
Create a baseline system specification (SRS) .
Produce the Software Development Plan (SDP) which describes the next phase.
Construction Transition
January 9, 2007 (c) Dr. David A. Workman 21
Birth
Overview of USP
Inception Elaboration Itera tion Itera tion Itera tion Itera tion Itera tion … Construction Itera tion Itera tion Death … Transition Itera tion Itera tion Itera tion
• • • •
Inception Elaboration Construction (focus on building an operational capability)
Build the system ( usually in increments defined by releases ). Each release encapsulates defined use cases . Releases are ordered by priority determined by customer needs and project risks.
Transition (focus on producing a formal release )
Product (release) enters beta testing and then manufacturing, training , and providing distribution . This phase involves customer support infrastructure .
Transition ends with maintenance: corrective, adaptive, perfective .
January 9, 2007 (c) Dr. David A. Workman 22
USDP Models
Overview of USP
verified by test1 OK Use Case Model specified by realized by implemented by Implementation Model Analysis Model Design Model Test Model distributed by Deployment Model test2 OK
January 9, 2007 (c) Dr. David A. Workman 23
Overview of USP
Core Work Flows Elicitation Analysis Design Inception Elaboration Construction Transition Implementation Test
January 9, 2007
Distribution of Core Activities Across Phases
(c) Dr. David A. Workman 24
Use Case Modeling
© Dr. David A. Workman School of EE and Computer Science University of Central Florida September 18, 2002
Requirements Capture
• • •
Input
Client approaches Developer with a problem and or product concept. This may be expressed verbally or in the form of a document ( Statement of Work (SOW) ) ( Request for Proposal (RFP) )
Activities
– – –
Developer interacts with Client and Users to elicit product requirements. This involves face-to-face meetings and possibly the exchange of technical documents. The Developer must determine as completely and precisely as possible the following information:
–
cost and time constraints
– –
target system platform and operational environment user groups functional capabilities non-functional constraints Client and User's needs : quality and performance (as opposed to "wants")
Outputs
A complete understanding of the problem the Client and Users need to have solved.
Client should be in agreement with the Developer’s assessment of the problem. This shared view of the system is captured in the form of a UML Use Case Model .
January 9, 2007 (c) Dr. David A. Workman 26
•
Use Case Model
Definitions 1
– –
A Use Case is a sequence of actions that the system performs to offer some results of value to a User.
–
Use cases
drive the whole development process.
intuitive means of capturing
“They offer a systematic and
functional requirements from the user’s perspective .”
–
A system has many types of users. Each type of user is define by an actor . Actors may be people or external systems . Actors interact with the product via one or more Use Cases . An actor role is defined by a particular set of use cases performed by that actor to accomplish a particular goal or objective .
“All actors and uses cases make up a Use Case Model .” A good collection of use cases is central to understanding what your users want . Use Cases also present a good vehicle for project planning, because they control iterative development, … it gives regular feedback to users about where the software is going.
–
Use cases provide the basis of communication developers in planning the project.
between the client and the
1
The Unified Software Development Process,
Addison-Wesley, 1999, 0-201-57169-2.
by Rumbaugh, Jacobson, and Booch, January 9, 2007 (c) Dr. David A. Workman 27
Use Case Model
•
Definition 2 (Fowler)
A Use Case captures a typical interaction between a user and a computer system .
–
A use case captures some user-visible function.
– –
A use case may be small or large.
A use case achieves a discrete objective for the user.
In its simplest usage, you capture a use case by talking to typical users and discussing the various things they might want to do with the system. Take each discrete task or action they want to do, give it a name, and write up a short description.
During the Elaboration phase, this is all you need to do to get started.
2
UML Distilled, by Scott & Fowler
January 9, 2007 (c) Dr. David A. Workman 28
Use Case Model Outline
•
1.
2.
3.
4.
Title (System Name, Author Name, Assignment, Course, Pub. Date)
–
TOC
–
List of Figures (optional for small documents)
System Summary
–
Overview of System Purpose and Context
–
Business Case ( business need and how this system will address this need )
–
System Operation
•
Use Case Diagram
•
Supporting Narrative (explains diagram: operational flow, actor roles )
–
System Interfaces ( External Interfaces with Actors )
Use Case Specifications
1. Purpose ( function from user’s perspective )
• •
Collaboration diagram (flow of interactions between actors and interface objects ) Narrative summary of use case purpose or function
2. Precondition (system states & triggering events ) 3. Flow of Events (nominal flow of interaction events between actor and interface objects) 4. Alternative Paths (error processing flows; special case flows ) 5. Post Condition (system states & completion events ) 6. Special Requirements (non-functional : performance and quality )
Requirements Traceability Glossary
January 9, 2007 (c) Dr. David A. Workman 29
Requirements Elicitation Work Flow
System Analyst System Architect Use Case Specialist User Interface Designer Find Actors & Use Cases Prioritize Use Cases Detail Use Cases Prototype User Interface Structure Use Case Model
January 9, 2007 (c) Dr. David A. Workman 30
• • • •
Requirements Elaboration
Purpose
"To achieve a more precise understanding of requirements and to achieve a description of requirements that is easy to maintain and that helps give structure to the whole system including the architecture."
Inputs
–
Outputs from Requirements Elicitation ( Use Case Model
–
).
Technical documents or expertise relevant to problem domain, in general, and to the Client's problem, in particular.
–
Legacy System (optional)
Activities
Refine requirements by eliminating inconsistencies and ambiguities. Formalize requirements by preparing a System/Software Requirements Specification . Develop an initial Software Development Plan .
Outputs
–
System/Software Requirements Specification (SRS)
•
UML Use Case Model and Scenarios
• • • • •
UML Class Model UML Collaboration Model UML Sequence Diagrams Problem Glossary Other info.
–
Software Development Plan (SDP)
January 9, 2007 (c) Dr. David A. Workman 31
Software Requirements Specification (SRS)
1 • •
Title TOC 1. Introduction
1.1 Purpose 1.2 Scope 1.3 Definitions, Acronyms, and Abbreviations 1.4 References 1.5 Overview
2. Overall Description
2.1 Product Perspective 2.2 Product Functions 2.3 User Characteristics 2.4 Constraints 2.5 Assumptions and Dependencies
3.0 Specific Requirements
… next slide
1 IEEE Std 830-1998
January 9, 2007 (c) Dr. David A. Workman 32
Software Requirements Specification (SRS)
3.0 Specific Requirements
3.1 External Interfaces 3.2 Functions 3.3 Performance Requirements 3.4 Logical Database Requirements 3.5 Design Constraints 3.6 Software System Quality Attributes 3.7 Object Oriented Models
3.7.1 Analysis Class Model 3.7.2 Analysis Collaboration Model
• •
3.8 Additional Comments Index Appendices
January 9, 2007 (c) Dr. David A. Workman 33
Software Development Plan (SDP)
2 •
Front Matter (Title, Toc, Lof, Lot) 1. Overview
1.1 Project Summary 1.2 Evolution of Plan
2. References 3. Definitions 4. Project Organization 5. Managerial Process Plans
5.1 Start-up Plan 5.2 Work Plan 5.3 Control Plan 5.4 Risk Management Plan 5.5 Closeout Plan
6. Technical Process Plan 7. Supporting Plans 2 IEEE Std 1058-1998
January 9, 2007 (c) Dr. David A. Workman 34
Requirements Elicitation vs Elaboration (USP)
Use-case Model Described using the language of the customer . External view of the system. Analysis Model Described using the language of the developer.
Internal view of the system. Structured by Use cases structure to external view Used primarily as a ; gives contract between client and developer as to what the system should do . May contain redundancies and inconsistencies among requirements Captures functionality of the system including architecturally significant functionality . Defines use cases further analyzed in the analysis model. Structured by sterotypical classes and packages ; gives structure to internal view Used primarily by developers to understand how the system should be shaped ; that is, designed and implemented. Should be complete, precise, consistent, and testable . Outlines how to realize functionality within the system; works as the first cut at design . Defines Use-case realizations, each one representing the analysis of a use case from the Use Case model.
January 9, 2007 (c) Dr. David A. Workman 35
Design (USP)
• •
Purpose
The system is shaped to accommodate all functional and non-functional requirements. It contributes to a sound and stable architecture and creates a blueprint for the implementation model.
–
Acquire an in-depth understanding of non-functional requirements and constraints related to: programming languages, component reuse, operating systems, distribution topology, network and database technologies, user-interface technology, etc.
–
Define and harden the boundaries between subsystems.
Artifacts
–
Design Model
• • •
An object model that describes the physical realization of use cases by focusing on how functional and non-functional requirements, together with other constraints related to the implementation environment, impact the system architecture and structure.
Design classes Use-case realizations (design) Detailed Interfaces
January 9, 2007 (c) Dr. David A. Workman 36
Design (USP)
•
Artifacts
–
Architecture Description
• • •
A view of the design model focusing on the following architecturally significant artifacts: Subsystems, interfaces, and their dependencies Key classes that trace to key analysis and active classes Key use case realizations that are functionally critical and need to be developed early in the lifecycle. Ones that have coverage across subsystems are particularly important.
–
Deployment Model
• • • •
An object model that describes the physical distribution of the system in terms of how functionality is distributed among computational nodes. An essential input to the activities in design and implementation. It is a manifestation of the mapping between software architecture and system architecture.
Nodes that denote computational resources Node processes and corresponding functional allocation Node relationships and their types (internet, shared memory, ATM link, etc.) Network topology(ies)
January 9, 2007 (c) Dr. David A. Workman 37
Analysis vs Design (USP)
Analysis Model A conceptual model , because it is an abstraction of the system and avoids implementation issues. Design-generic (applicable to several possible designs). Based on three stereotyped classes that are conceptual in nature: Entity, Boundary, and Control. Less formal. Design Model A physical model , because it is a blueprint for implementation. Specific for an implementation . Any number of physical class stereotypes and modules that may be implementation language dependent. More formal. Less effort to develop (1:5 ratio) Few layers More effort to develop Many layers Dynamic, but not much focus on sequence.
Outlines the design and architecture of the system. May not be maintained throughout the lifecycle. Defines a structure that is an essential input to shaping the system including the Design Model. Dynamic with much more emphasis on sequence, concurrency, and distribution.
Manifests or realizes the design (an instantiation of the Analysis Model). Should be maintained throughout the lifecycle. Defines the structure of the system wrt both functional and non functional requirements .
January 9, 2007 (c) Dr. David A. Workman 38
Implementation (USP)
• •
Purpose
– –
To translate the design into machine-readable and executable form. Specifically to:
–
Plan system integrations required in each implementation increment or iteration
–
Distribute the system by mapping executable components to nodes in the deployment model.
Implement design classes and subsystems found in the Design Model.
Unit test the components, and integrate them by compiling and linking them together into one or more executables, before they are sent to integration and system tests.
– – – –
Artifacts
–
Implementation Model
•
Components:
•
Interfaces
•
Implementation subsystems
Components Implementation Subsystems Interfaces Build Plan
January 9, 2007 (c) Dr. David A. Workman 39
Integration & Test (USP)
•
Purpose
To verify the result of each build and to validate the complete system via acceptance tests.
–
Plan tests required in each iteration, including integration and system tests. Integration tests are required after each build, while system tests are done as part of client acceptance and system delivery.
–
Design and implement test plans by creating test cases. Test cases specify what to test and define procedures and programs for conducting test exercises.
–
Perform various test cases to capture and verify test results. Defects are formally captured, tracked and removed before delivery.
January 9, 2007 (c) Dr. David A. Workman 40
•
Integration & Test (USP)
Artifacts
–
Test Plan
Describes testing strategies, resources, and schedule for each build and for the system.
–
Test Model
• • •
Test Case Test Component Test Procedure
–
Test Cases
Designed to verify certain requirements and use cases, or use case scenarios. Demonstrates that pre- and post-conditions of use cases are satisfied. Predicts or describes expected component output and behavior.
–
Test Components
The implementation artifacts to be tested.
–
Test Procedures
Specifies how to perform one or several test cases. Test programs (or "harnesses")(or "benches") and shell scripts may have to be executed as part of a test procedure.
–
Test Evaluations
Capture results of test cases; declares whether or not test case was successful; generates defect or anomaly reports for tracking.
–
Defect or Anomaly Reports
January 9, 2007 (c) Dr. David A. Workman 41
IEEE Std (829) for Software Testing
• • • • • • • •
Test Plan
To prescribe the scope, approach, resources, and schedule of testing activities. To identify items to be tested, the features to be tested, the testing tasks to be performed, the personnel responsible for each task, and the risks associated with the plan.
Test Design Spec Test Case Spec Test Procedure Spec Test Item Transmittal Report Test Log Test Incident Report Test Summary Report
January 9, 2007 (c) Dr. David A. Workman 42