Beruflich Dokumente
Kultur Dokumente
July 03
Chapter 1
July 03
Chapter 1
Most serious corporations control and constrain changes Most software is custom built, and customer never really knows what she/he wants.
July 03 Chapter 1 6
July 03
Chapter 1
July 03
Chapter 1
Software Myths
Myth: Its in the software. So, we can easily change it. Reality: Requirements changes are a major cause of software degradation. Myth: We can solve schedule problems by adding more programmers. Reality: Maybe. It increases coordination efforts and may slow things down. Myth: While we dont have all requirements in writing yet, we know what we want and can start writing code. Reality: Incomplete up-front definition is the major cause of software project failures.
July 03 Chapter 1 9
Software Myths
Myth: Writing code is the major part of creating a software product. Reality: Coding may be as little as 10% of the effort, and 50 - 70% may occur after delivery.
July 03
Chapter 1
10
30%
25%
20%
15%
10%
5%
July 03
Chapter 1
11
Software Myths
Myth: I cant tell you how well we are doing until I get parts of it running. Reality: Formal reviews of various types both can give good information and are critical to success in large projects. Myth: The only deliverable that matters is working code. Reality: Documentation, test history, and program configuration are critical parts of the delivery. Myth: I am a (super) programmer. Let me program it, and I will get it done. Reality: A sign of immaturity. A formula for failure. Software projects are done by teams, not individuals, and success requires much more than just coding.
July 03 Chapter 1 12
35%
31% 30%
25%
25%
20%
15% 13%
10%
8% 6%
5%
July 03
Chapter 1
13
(5k,10k]
Chapter 1
(10k,20k]
(20k,50k]
>50k
14
Software as a Process
Software Engineering -- a definition: [Software engineering is] the establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines. Software Engineering is a layered technology.
August 2003
Chapter 2
A Layered Technology
Tools Editors Design aids Compilers Computer Aided Software Engineering (CASE) Methods Includes standards (formal or informal) May include conventions, e.g., low level such as naming, variable use, language construct use, etc. May involve design methodologies. Chapter 2
August 2003
Development
Software design Coding Testing
August 2003 Chapter 2 3
August 2003
Chapter 2
August 2003
August 2003
Chapter 2
August 2003
Chapter 2
August 2003
August 2003
Chapter 2
10
Waterfall Model
System/Information Engineering Requirements Analysis Design Code
Test
Maintain
August 2003
Chapter 2
11
August 2003
Chapter 2
12
Data Modeling
Process Modeling
RAD Model
Business Modeling What info. Drives the business process? What info. Is generated? Who generates it? Where does the info go? Who processes it? Etc.. Data Modeling Refinement from business model into data objects Characteristics of object identified and relationships between objects are defined.
August 2003 Chapter 2 14
RAD Model
Process Modeling Data objects are transformed to achieve the info. flow Process desc. added for adding, modifying, deleting or retrieving a data object Application Generation Use of 4GL techniques Automated tools use for construction of S/W Testing & Turnover Testing time is less bcoz of reusable components Only new components tested and interfaces
August 2003 Chapter 2 15
Limitations of RAD
More human resources required to created right teams Time crucial-if commitment lack-RAD fails Modular systems implementable not appropriate for high performance systems which require rigorous tuning of interfaces Not appropriate where technical risks are high i.e. applications making heavy use of new tech. or new S/W require high degree of interoperability with existing systems
August 2003
Chapter 2
16
August 2003
Chapter 2
17
August 2003
Chapter 2
18
August 2003
Chapter 2
19
August 2003
Chapter 2
20
Planning
Tasks required to define resources, timelines & other project related info.
Risk Analysis
Tasks required to assess both technical and mgt. Risks
Engineering
Tasks required to build one or more representations of the application
August 2003
Chapter 2
22
August 2003
Chapter 2
23
August 2003
Chapter 2
24
August 2003
Chapter 2
26
August 2003
Chapter 2
27
Other Models
Formal Methods
Rigorous mathematical representation of requirements Provides basis for automatic verification test generation Fourth Generation Techniques Use code generators to produce specific parts of product Process Technology Provides a variety of tools to aid software developers, e.g., workload flow, configuration management, quality assurance management, etc. Chapter 2
August 2003
28
January 2004
Chapter 3 R. S. Pressman
SRIMCA
People
The Players -- It is important to recognize the different categories of people involved in a large software project.
Senior Managers - who define business issues. Project Managers - who plan, motivate, organize and control the practitioners Practitioners - who deliver the technical skill that are necessary to engineer the project Customers - who specify the requirements End users - who interact with the software once it is released. Chapter 3 R. S. Pressman SRIMCA January 2004
4
January 2004
Chapter 3 R. S. Pressman
SRIMCA
How Do We Communicate?
Informally - Good phone/electronic service, a clear definition of group interdependencies and good relationships help encourage communication Meetings - Regular project meetings help alleviate minor misunderstandings Workbook - a formal project workbook must be started from the beginning.
January 2004 Chapter 3 R. S. Pressman SRIMCA 10
January 2004
Chapter 3 R. S. Pressman
SRIMCA
12
The Product
Must first determine project scope. Context - How does this software to be built fit into the larger system? What constraints are imposed as a result of this? Information objectives - What customer-visible objects are produced from the software? What data objects are necessary for input? Function and performance - What functions or actions does the software perform to transform the output? The stability, or lack thereof, of the project requirements is a major factor in project management.
January 2004 Chapter 3 R. S. Pressman SRIMCA 13
The Process
Select a software engineering model. Project framework. Customer communication. Planning -- determine resources, time line & other info. Risk analysis -- assess technical and management risks Engineering -- build one or more representations of the product. Construction and release -- construct, test, install and provide user support. Customer evaluation -- obtain feedback on product Chapter 3 R. S. Pressman SRIMCA January 2004
14
January 2004
Chapter 3 R. S. Pressman
SRIMCA
15
Process Decomposition
Typical activities Review the customer request. Plan and schedule a formal, facilitated meeting with the customer. Conduct research to define proposed solutions. Prepare a working document and meeting agenda. Conduct meeting with customer. Jointly develop mini-specs for the product. Review each mini-spec for correctness, lack of ambiguity. Assemble the mini-specs into a scoping document. Review the scoping document with all concerned. Modify the scoping document as required.
January 2004 Chapter 3 R. S. Pressman SRIMCA 16
Summary
Software project management is an umbrella activity that continues throughout the life cycle of the system. Software management includes people, the problem, and the process. The most critical element in all software system projects is the people. The team can have an number of structures that effect the way work is accomplished. However, complete, consistent problem definition and an effective process are also essential ingredients.
January 2004 Chapter 3 R. S. Pressman SRIMCA 17
System Design
System Level Requirements Hardware Architecture Software Architecture Performance Analysis
Strategic Engineering
Delivery Planning Thread Definition
Specialty Engineering
Quality Assurance Human Factors Quality Engineering
Gateways
Thread Statement of Work A conceptual description of a capability that considers the implementation of the System Level and Product Level Requirements
REDSTONE 9/97
HMF Demo GSE Demo SLWT Demo
THOR 3/98
Fuel Cell Support SLWT Test Stress Test 1 System Capability Demo 1 Consolidated SDS Turnover IVHM SLWT IPT HMF IPT Orbitor Power IPT
ATLAS 9/98
Haz Gas IVHM Stress Test 2 System Capability Demo 2 RPS Haz Gas(req) HMF IPT Orbitor Power IPT GSE Phase 1 IPT
TITAN 3/99
HMF Operational Sail Certification Stress Test 3 Performance Validation LISI/CWLIS SSME HMF IPT Orbitor Power IPT GSE Phase 1 IPT GSE Phase 2 IPT OPF Final CITE Intg Ops Launch Control Performance Modeling System Testing End to End Gateway 2 Gateway Ph 1(req) PCM SSME LDB Interface Ph 3 Uplink Support Ph1 Safing System DDP Ph 1
Launch Control Project Support Gateways GSE Link Support Ph 1 Open System Pathfinder Performance Modeling Regression Testing Pathfinder End to End Gateway 1 GSE Link Support Ph 2 PCM Support Ph 1 LDB Interface Ph 1 Open System Demo Performance Modeling System Testing PCM Support Ph 2 LDB Interface Ph 2 T iming System Safing System Data Handling & Routing (req)
Data Handling
Reliable Message Ph 1
Reliable Message Ph 2 Data Distribution Data Fusion Data Health User Display Monitoring Plotting Pathfinder User Commanding Ph 1
Reliable Message Ph 3 Data Distribution Data Fusion Data Health System Viewers User Commanding Ph 2 Constraint Manager Ph 1 TAS Pathfinder End Item Manager System Integrity Ph 1
HCI Ph 1 User Commanding Ph 3(req) Constraint Manager Ph 2 End Item Manager Redundancy Management Ph 1 Check Point Restart Ph1 System Control Ph 1
HCI Ph 2(req) User Commanding Ph 4(req) OCF-TCS TAS (under review) CCP Ph 1 Master Console Ph 1 Redundancy Management Ph 2 System Security Check Point Restart Ph2 Resource Management Ph 1 System Control Ph 2 ORT External Center Support
BASIS Development Simulation Simulation I/F to RTCN Ph 1 SDC Set Build and Load Ph 1 Test Build, Load, & Act Ph 1 Sys SW Development Development Environment Application Debug Config
Basis Pathfinder Advance Retrieval Basic Real-Time Advisory Desk Top Development Simulation I/F to RTCN Ph 2 SDC Transistion Log Record and Retrieval Ph 1
Basis Transition Support Advance Retrieval Basic Real-Time Advisory Simulation Release
Simulation I/F to RTCN Ph 3 SDC Operational Log Record and Retrieval Ph 2 Set Build and Load Ph 2 Test Build, Load, & Act Ph 2 Log Record and Retrieval Ph 3 Test Build, Load, & Act Ph 3
OR
SLS, SDD
Process is Managed by The Design Panel Chairman Minutes are kept by Design Panel Secretary
Design Panels Provide the System Engineering and Development Community a Method of Communicating. Allow the User Communities to Gain Significant Insight Throughout the Incrementally Help to Meet the Intent of Preliminary Design Reviews and Critical Design Reviews As Discussed in MILSTD-2167, MIL-STD-498
Thread Lead and CSCI/HWCI Leads System Engineering Work Session Thread Concept CI Impacts Assessment Schedule CSCI/HWCI Developer Work sessions Refined Concept Prelim. Product Specifications Prelim. Test Plans CSCI/HWCI Developer Work sessions Refined Product Specifications Refined Data Flows Refined Specs
Business conditions
People
Development environment
Chapter 4 R. S. Pressman
Technology
March 2004
SRIMCA
Measurement
What to measure? errors uncovered before release defects delivered to and reported by end users work products delivered human effort expended calendar time expended schedule conformance At what level of aggregation? By team? Individual? Project?
March 2004 Chapter 4 R. S. Pressman SRIMCA 5
Privacy Issues
Should they be used for personnel evaluation? Some issues? Privacy? Is total assignment being measured? Are the items being measured the same as for other individuals being measured? Are the conditions of measurement the same across individuals? However, they can be useful for individual improvement.
March 2004 Chapter 4 R. S. Pressman SRIMCA
March 2004
Chapter 4 R. S. Pressman
SRIMCA
inadequate inquiries
used outdated information
March 2004
incorrect
Chapter 4 R. S. Pressman
changes
SRIMCA 10
Project Metrics
Software Project Measures Are Tactical used by a project manager and a software team to adapt project work flow and technical activities The Intent of Project Metrics Is Twofold to minimize the development schedule to avoid delays and mitigate potential problems and risks to assess project quality on an ongoing basis and modify the technical approach to improvement quality Production Rates pages of documentation review hours function points delivered source lines errors uncovered during SW engineering tasks
March 2004 Chapter 4 R. S. Pressman SRIMCA 11
Software Metrics
Direct measures Cost and effort applied (in SEing process) Lines of code(LOC) produced Execution speed CPU utilization Memory size Defects reported over certain period of time Indirect Measures Functionality, quality, complexity, efficiency, reliability, maintainability.
March 2004 Chapter 4 R. S. Pressman SRIMCA 12
Software Measurement
Size-Oriented Metrics are derived by normalizing quality and/or productivity measures by considering the size of the software that has been produced. lines of code often as normalization value.
project LOC effort 24 62 43 $(000) 168 440 314 pp.doc 365 1224 1050 errors 134 321 256 defects 29 86 64 people 3 5 6
. . . .
. . .
. . .
. . .
. . .
March 2004
Chapter 4 R. S. Pressman
SRIMCA
13
March 2004
Chapter 4 R. S. Pressman
SRIMCA
14
Software Measurement
Function-Oriented Metrics use functionality to measure derived from function point using an empirical relationship based on countable (direct) measure of SW information domain and assessments of software complexity Use of Function-Oriented Metrics Measuring scale of a project Normalizing other metrics, e.g., $/FP, errors/FP
March 2004
Chapter 4 R. S. Pressman
SRIMCA
15
measurement parameter number of user inputs number of user outputs # of user inquiries number of files # of external interfaces count_total
count * * * * *
March 2004
Chapter 4 R. S. Pressman
SRIMCA
16
no influence
incidental
moderate
average
significant
essential
1. does the system require reliable backup and recovery? 2. are data communications required? 3. are there distributed processing functions? 4. is performance critical? ........ 14. is the application designed to facilitate change and ease of use by the user?
March 2004 Chapter 4 R. S. Pressman SRIMCA 17
Function-Oriented Metrics
FP = count_total * [0.65 + 0.01 * sum of Fi]
Outcome: errors per FP defects per FP $ per FP page of documentation per FP FP per person_month
March 2004
Chapter 4 R. S. Pressman
SRIMCA
18
March 2004
Chapter 4 R. S. Pressman
SRIMCA
19
March 2004
Chapter 4 R. S. Pressman
SRIMCA
20
March 2004
C++ Visualbasic
Chapter 4 R. S. Pressman
64 SRIMCA 32
21
March 2004
Chapter 4 R. S. Pressman
SRIMCA
22
27
Summary View
March 2004
Chapter 4 R. S. Pressman
SRIMCA
28
Summary
Metrics are a tool which can be used to improve the productivity and quality of the software system Process metrics takes a strategic view to the effectiveness of a software process Project metrics are tactical that focus on project work flow and technical approach Size-oriented metrics use the line of code as a normalizing factor Function-oriented metrics use function points Four quality metrics------correctness, integrity, maintainability, and usability were discussed
March 2004 Chapter 4 R. S. Pressman SRIMCA 29
METRICS
CLCS Metrics Philosophy
Phase 1: Provide a mandatory, nearly automated, metrics foundation to track lines of code and errors. Phase 2: Provide additional high-return metrics with recognized value.
Schedule metrics (milestones) Additional S/W Problem metrics (actuals, trends, prediction) Defect correction metrics Run-time analysis metrics (McCabe tools, automated, COTS)
Phase 3: Be driven to additional metrics only by absolute need.
March 2004 Chapter 4 R. S. Pressman SRIMCA 30
METRICS
System Software
Milestones Redston e CIT Complet e Thor CIT Complet e Jul-98 0.0 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Atlas CIT Complet e Aug-98 0.0 0.0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 TOTAL 23 151 155 130 459 19 98 103 86 306
Month/Year Software Size (KSLOC) Actual Size of Executable Code Code Delivered Comments Razor Issue Closure Issues Opened Urgent (this month) Critical Major Minor Total: Issues Closed Urgent (this month) Critical Major Minor Total: Current Issues Open: Urgent Critical Major Minor Total: Error Density: Issues / KSLOC
Sep-97 Oct-97 Nov-97 Dec-97 Jan-98 Feb-98 Mar-98 Apr-98 May-98 Jun-98 377.2 377.2 383.3 388.1 450.2 554.3 214.1 214.1 218.2 221.3 250.6 319.3 0.0 0.0 0.0 0.0 163.1 163.1 165.1 166.8 199.6 242.1 0.0 0.0 0.0 0.0 9 54 60 57 180 6 36 39 27 108 3 18 21 30 72 0.84 3 19 16 17 55 6 26 24 17 73 0 11 13 30 54 1.10 2 8 20 6 36 1 11 12 19 43 1 8 21 17 47 1.24 0 1 5 0 6 1 0 4 5 10 0 9 22 12 43 1.25 4 16 28 13 61 3 13 14 2 32 1 12 36 23 72 1.35 5 53 26 37 121 2 12 10 16 40 4 53 52 44 153 1.44 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
March 2004
Chapter 4 R. S. Pressman
SRIMCA
31
March 2004
March 2004
Scope
What scope means: Functions Literally refers to all functions performed by a system Performance Refers to processing and response time requirements Constraints Limits placed on the software by external hardware, available memory or existing systems Interfaces Reliability
March 2004 Chapter 5 Software Project Planning 3
Scope
Obtaining the information Communication, communication, communication!!! Meet with customer as often as needed. Have free form discussion Try to understand his/her goals/constraints, not just what she/he thinks they want. Government procurement often provides detailed written specifications on what they want. The problem is that those writing them probably didnt fully understand, and they will change. Government is trying for a more enlightened approach.
March 2004 Chapter 5 Software Project Planning 4
Scope Information
Some typical questions Overall Goals Whos request; What benefit; Who else has solution Understanding The Problem What output; What Problem; What Issues; What Constraints Effectiveness of Meeting Are answers official; Are my questions relevant; Other sources of Info.
March 2004
March 2004
Scoping Example
Conveyor Line Motion ID No. ID No. ID No. ID No. Bin 1 Bin 2 Bin 3 Bin 4
Control connection
March 2004 Chapter 5 Software Project Planning 7
Shunt
Bar Code
Sorting Station
Bin 5
Project Decomposition
For our example: Read bar code input Read pulse tachometer Decode part code data Do database lookup Determine bin location Produce control signal for shunt Maintain record of box destinations
March 2004
Resources
March 2004
Resources
For each type of resources, 4 characteristics are examined: Description of resource Availability Time resource needed Duration of time for which the resource is needed
March 2004
Human Resources
Scope and skills required Organizational position and specialty must both be considered As estimate of development effort is essential to determine the number of people required for the project.
March 2004
March 2004
Environmental Resources
Software Engineering Environment Compilers Editors Design tools Configuration management tools Management tracking tools Problem Reporting And Corrective Action (PRACA) tools Documentation tools Hardware resources Network support
March 2004 Chapter 5 Software Project Planning 13
Decomposition Techniques
Software Sizing The degree of the size of product estimated Ability to translate size estimate into human effort, calendar time, dollars The degree to which project plan reflects abilities of s/w team The stability of product reqs. and the environment that supports the se effort Using Direct approach, size can be measured in LOC Using Indirect approach, size is represented as FP
March 2004
Software Sizing
4 approaches to Software Sizing problem Fuzzy Logic Sizing Function Point Sizing Standard Component Sizing Change Sizing These methods can be combined statistically to create a ThreePoint or expected value estimate Done by developing Optimistic(low), most likely, and pessimistic(high) values for size and combining them in equation
March 2004
Problem-Based Estimation
Projects should be grouped by team size, application area, complexity, other parameters. Local domain averages should be computed. When new project is estimated, first allocate it to a domain, and them determine domain average to generate the estimate LOC use decomposition invariably, function wise. FP uses info domain characteristics inputs, outputs, data files, inquiries, external interfaces as well as the 14 complexity adjustment values
March 2004
Estimation Table
Suppose 620 LOC/PM, and $8,000/PM, based upon historical data. Then, Est. Cost = 33,200*$8,000/620 = $431,000 & Est. effort = 54 person months
Chapter 5 Software Project Planning 19
March 2004
Complexity factor = [0.65 0.01 Fi ] = 0.65+0.0152 = 1.17 FP estimate = count-total [0.65 0.01 Fi ] = 318 1.17 = 372 Then, if 6.5 FP/PM, cost = 372 $8,000 6.5 = $457,000 and 58 person months Chapter 5 Software Project Planning March 2004
21
Engineering
Analysis Design
Function UICF 2DGA 3DGA DSM CGDF PCF DAM Total % effort 0.25 1% 0.25 1% 0.25 1% 0.50 0.75 0.50 0.50 0.50 0.25 0.50 3.50 8% 2.50 4.00 4.00 3.00 3.00 2.00 2.00 20.50 45% 0.40 0.60 1.00 1.00 0.75 0.50 0.50 4.75 10% 5.00 2.00 3.00 1.50 1.50 1.50 2.00 16.50 36% n/a n/a n/a n/a n/a n/a n/a
COCOMO II
Object point is computed using count of 1. Screen 2. Report & 3. Components required to build the application Object Type Simple Screen Report 3GL comonent 1 2 Complexity Weight Medium 2 5
Difficult 3 8 10
NOP = (object points) * [(100 - %reuse)/100]; NOP -> new object points Productivity rate = NOP/person-month
March 2004 Chapter 5 Software Project Planning 26
COCOMO II
Developers experience/capability Environment maturity/capability PROD Estimated effort = NOP/PROD Very low Very low 4 Low Low 7 Nominal Nominal 13 High High 25 Very High Very High 50
March 2004
March 2004
March 2004
major changes (.30) contract without changes (.60) with changes (.40) Chapter 5 Software Project Planning
Make/Buy Decision
1. 2. 3. 4. Build system X from scratch Reuse partial-experience components to construct the system Buy an available s/w product and modify to meet local needs Contract the s/w development to an outside vendor The ev for cost computed along any branch is Expected cost = (Path probability)i x (estimated path cost) I where i = decision tree path. For the build path EC(build) = 0.30 ($380K) + 0.70 ($450K) = $429K EC(reuse) = 0.40 ($275K) + 0.60 (0.20 ($310K) + 0.80 ($490K) = $382 K
Chapter 5 Software Project Planning 34
March 2004
Make/Buy Decision
EC(buy) = 0.70 ($210K) + 0.30 ($400K) = $267K EC(contract) = 0.60 ($350K) + 0.40 ($500K) = $410K Based on above figures, the lowest expected option is buy option. Availability, experience of developer/vendor/contractor, conformance to requirements, local politics and likelihood of change are also the criteria that may affect the decision to build, reuse, buy or contract.
March 2004
Summary
Project planner must estimate three things: how long project will take how much effort will be required how many people will be required Must use decomposition and empirical modeling Most empirical techniques need to be calibrated to individual situations. Use multiple techniques to gain confidence in result
March 2004
Risk Management
Introduction Risk Identification Risk Projection Risk Mitigation, Monitoring, and Management Safety Risks and Hazards The RMMM plan SEI Technical Reviews Summary
Chapter 6 Risk Management 1
Introduction
Risk management is a process that is used extensively for various purposes Recall earlier questions raised about safety, costs, etc. According to Websters Seventh New Collegiate Dictionary, risk is defined as a: possibility of loss or injury the chance of loss or the perils to the subject matter of an insurance contract and the degree of probability of such loss.(1)
Introduction
Robert Charette(2) presented the following conceptual definitions of risk: Risk concerns future happenings Risk involves change, such as changes of mind, opinion, action or places Risk involves choice, and the uncertainty that choice itself entails Risk Characteristics : uncertainty: may or may not happen loss: unwanted consequences
Chapter 6 Risk Management 3
Introduction
Management is the act or art of managing and judicious use of means to accomplish an end(1) RISK MANAGEMENT can be defined as: A logical process for identifying and analyzing leading to appropriate methods for handling and monitoring exposures to loss(3) Risk management deals with: Systematic identification of an exposure to the risk of loss, & Making decisions on the best methods for handling these exposures to minimize losses
Chapter 6 Risk Management 4
Introduction
Risk Strategies
Reactive Software team does nothing about risks until something goes wrong fire fighting mode Proactive Begins long before technical work is initiated Identification of potential risks (studies of probability, impact and priorities) Objective: AVOID RISK Responds are in a controlled and effective manner
Our Concern
5
Introduction
Project Risks (budgetary, schedule, personnel, resource, customer) Technical Risks (design, implementation, interfacing, verification) Business Risks (market, strategic, management,budget) Software Risk Charette: (2) Known risks Predictable Unpredictable
Chapter 6 Risk Management 6
Risk Identification
Risk identification is a systematic attempt to specify threats to the project plan
Identify known and predictable risks
Generic
Product-specific
What characteristics of this product may threaten our project plan?
Product size Business impact Customer characteristics Process definition Development environment Technology to be built Staff size and experience
Risk Identification
Product Size Risk : Estimated size of the product in LOC or FP? Percentage deviation in size of product from average for previous products? Number of users/projected changes to the requirements for the product? Amount of reused software? Business Impact risks: Effect of this product on the company revenue? Visibility of this product to senior management? Amount & quality of product documentation to be produced? Governmental constraints on the construction of the product?
Chapter 6 Risk Management 8
Risk Identification
Customer related risks: (needs, personalities, contradictions , associations) Have you worked with the customer in the past? Does the customer have a solid idea of what is required? Will the customer agree to have meetings? Is the customer technically sophisticated in the product area? Does the customer understand the software process? Technology Risks: Is the technology to be built new to your organization? Does the SW interface with new or unproven HW/SW? Do requirements demand creation of new components ? Do requirements impose excessive performance constraints ?
Chapter 6 Risk Management 9
Risk Identification
Process Risks : (4) Does senior management support a written policy statement that emphasizes a standard process for software development ? Is there a written description of the software process to be used? Process Is the software process used for other projects ? Issues: Is configuration management used to maintain consistency among system/software requirements, design, code and test? Is a procedure followed for tracking subcontractor performance? Are facilitated application specification techniques used to aid in communication between the customer and developer ? TechAre specific methods used for software analysis? nical Issues: Do you use specific method for data and architectural design? Are software tools used to support the software analysis and design? Are tools used to create software prototypes? Are quality/productivity metrics collected for all software projects?
Chapter 6 Risk Management 10
Risk Identification
Development Environment Risks: Is a software project/process management tool available? Are tools for analysis and design available?? Are testing tools available and appropriate for the product? Are all SW tools integrated with one another? Have members of the project team received training in each of the tools? Risk Associated with Staff Size and Experience: Are the best people available? Do the people have the right combination of skills? Are staff committed for entire duration of the project? Do staff have the right expectations about the job at hand? Will turnover among staff be low enough to allow continuity?
Chapter 6 Risk Management 11
Risk Identification
Risk Components and Drivers (U.S. Air Force guidelines) Performance risk: the degree of uncertainty that the product will meet its requirements and be fit for its intended use Cost risk: the degree of uncertainty that the project budget will be maintained Support risk:the degree of uncertainty that the software will be easy to correct, adapt, and enhance Schedule risk: the degree of uncertainty that the project schedule will be maintained
Chapter 6 Risk Management
12
Risk Identification
COMPONENTS PERFORMANCE CATEGORY
Failure to meet the requirements would 1 CATASTROPHIC result in mission failure Significant Nonresponsive or degradation to 2 unsupportable nonachievement of technical performance software Failure to meet the requirements would 1 degrade system performance to a point CRITICAL 2 where misssion success is questionable Some reduction in Minor delays in software technical performance modifications Failure to meet the requirements would 1 result in degradation of secondary MARGINAL misssion Minimal to small Responsive 2 reduction in technical performance software support Failure to meet the requirements would 1 create inconv enience or nonoperational NEGLIGIBLE impact No reduction in Easily supportable 2 technical performance software Failure results in increased costs and schedule delays with expected values in exc esss of $500k Significant financial shortages, budget ov errun likely delivery date Failure results in operational delays and/or increased costs with expected values of $100k to $500k Some shortage of Possible slippage in financial resources, possible ov erruns delivery date Cost, impacts, and/or recoverable schedule slips with expected value of $1 to $100K Sufficient financial Realistic, Unachievable
SUPPORT
COST
SCHEDULE
resources achievable schedule Error in minor cost and/or schedule impact with expected value of less than $1k Poss ible budget underrun Early achiev able delivery date
13
Risk Projection
Also called risk estimation, attempts to rate each risk in two ways: Likelihood (probability) Consequences Develop a risk table: A risk table provides a project manager with a simple technique for risk projection For each identified risk, list likelihood, consequence and impact Risk Assessment: Examine the accuracy of the estimates that were made during risk projection. A risk referent level must be defined and the referent point or break point should be established
Chapter 6 Risk Management 14
Risk Projection
Risks
Size estimate may be significantly low Larger number of users than planned Less reuse than planned End users resist system Delivery deadline will be tightened Funding will be lost Customer will change requirements Technology will not meet expectations Lack of training on tools Staff inexperienced Staff turnover will be high
. . .
60% 30% 70% 40% 50% 40% 80% 30% 80% 30% 60%
2 3 2 3 2 1 2 1 2 2 2
15
Risk Matrix
L I k e l I h o o d 5 4 3 2 1 1 2 3 4 Consequences
Chapter 6 Risk Management
5
16
19
20
21
22
23
Summary
Risk analysis is an important part of most software projects. Risk analysis requires a significant amount of project planning effort. Understanding risk helps you know where to commit your resources. If you dont actively attack the risks, they will actively attack you. Major projects should all have a risk management plan..
25
November 9, 1997
NASA
November 9, 1997
NASA - Shuttle-Mir
November 9, 1997
November 9, 1997
November 9, 1997
November 9, 1997
November 9, 1997
November 5, 1997
Chapter 7
Basic Principles
Compartmentalization Identify task interdependencies Allocate time for each task Develop feasible schedule Define responsibilities. Each task should have a single person responsible. Each person should know their responsibilities. Define outcomes Define milestones
November 5, 1997
Chapter 7
Degrees of Rigor
Adaptation criteria -- rate 1 to 5 Size of the project Number of potential users Mission criticality Application longevity Stability of requirements Ease of customer/developer communications Maturity of applicable technology Performance constraints Embedded/nonembedded characteristics Project staffing Reengineering factors
November 5, 1997 Chapter 7 7
Example
November 5, 1997
Chapter 7
November 5, 1997
Chapter 7
10
November 5, 1997
Chapter 7
11
November 5, 1997
Chapter 7
12
Scheduling
Typical tools Program Evaluation and Review Technique (PERT) charts Critical Path Method (CPM) Work Breakdown Structure (WBS) Formal term for task structure Useful information derivable from timeline charts Earliest beginning time for a task Latest time to initiate a task without delaying project Earliest task completion time Latest task completion time Total float
November 5, 1997 Chapter 7 13
November 5, 1997
Chapter 7
14
November 5, 1997
Chapter 7
16
November 5, 1997
Chapter 7
17
SRIMCA
What is SQA?
Software Quality Assurance is an umbrella activity that is applied throughout the software process...
SRIMCA
It encompasses..
A quality management approach Effective software engineering technology Formal technical reviews that are applied throughout the software process A multitiered testing strategy Control of software documentation and changes to it A procedure to assure compliance with software development standards Measurement and reporting techniques
SRIMCA
Quality ???
Quality refers to any measurable characteristics such as correctness, maintainability, portability, testability, usability, reliability, efficiency, integrity, reusability and interoperability. Measures of programs characteristics; as cyclomatic complexity, cohesion, fp, loc etc.
SRIMCA
Quality Concepts
Quality of Design refers to the characteristics that designers specify for an item. Quality of Conformance is the degree to which the design specifications are followed during manufacturing. Quality Control is the series of inspections, reviews and tests used throughout the development cycle to ensure that each work product meets the requirements placed upon it.
SRIMCA
(cont'd)...
Quality policy refers to the basic aims and objectives of an organization regarding quality as stipulated by the management. Quality assurance consists of the auditing and reporting functions of management. Cost of Quality provide a baseline for current cost of quality, identify opportunities for reducing the cost of quality, and provide a normalized basis of comparision.
SRIMCA
(cont'd)...
Quality Costs are divided into costs associated with prevention, appraisal, failure internal & external costs
Prevention
Quality planning, formal technical reviews, test equipment, training Appraisal gain insight into product condition first time through each process; which include
In-process and inter-process inspection Ininter Equipment calibration and maintenance Testing
SRIMCA
(cont'd)...
Failure
External
Complaint
resolution, product return & replacement, help line support, warranty work
SRIMCA
SRIMCA
(cont'd)...
Quality planning is the process of assessing the requirements of the procedure and of the product and the context in which these must be observed. Quality testing is assessment of the extent to which a test object meets given requirements Quality assurance plan is the central aid for planning and checking the quality assurance. Quality assurance system is the organizational structure, responsibilities, procedures, processes and resources for implementing quality management.
SRIMCA
Conformance to explicitly stated functional and performance requirements, explicitly documented development standards, and implicit characteristics that are expected of all professionally developed software.
SRIMCA
1. S/W requirements are the foundation of quality; lack of conformance to requirements is lack of quality. 2. Specified standards define a set of development criteria that guide the teams in which s/w is engineered; if not followed, lack of quality will surely result 3. A set of implicit requirements often goes unmentioned; if not met, s/w quality is suspect.
SRIMCA
SQA
SQA
with:
S/w
Engineers who do technical work SQA group responsible for quality assurance planning, oversight, recordrecordkeeping, analysis and reporting to assist the s/w team in achieving a high quality end product.
SRIMCA
Evaluations to be performed Audits and reviews to be performed Standards that are applicable to the project Procedures for error reporting and tracking Documents to be produced by the SQA group Amount of feedback provided to software project team
SRIMCA
SRIMCA
(cont'd)...
Ensures that deviations in software work and work products are documented and handled according to a document procedure. Records any non-compliance and reports to nonsenior management.
In
addition to these, SQA group may cocoordinate the control and management of change, and helps to collect and analyze s/w metrics.
SRIMCA
Software Reviews
Filter for the software engineering process Purify the software work products that occur as a result of analysis, design, and coding. Achieve technical work of more uniform, greater and more predictable quality. Detect errors and problems at the earliest possible time.
SRIMCA
To uncover errors in function, logic, or implementation for any representation of the software To verify that software meets its requirements To ensure that software representation meets predefined standards To achieve software development in a uniform manner To make projects more manageable
SRIMCA
Defect = Fault (We knew it as error before delivery) Industry studies reveal that almost 50-65 % of all errors 50(defects) are introduced during design activities By detecting and removing them, review process substantially reduces the cost of subsequent steps in the development and support phases. E.g. assume that an error uncovered during design will cost 1 Rs., relative to this, the same error uncovered just before testing commences will be 6.5 Rs., during testing, 15 Rs. And after release 60-100 Rs. 60SRIMCA
SRIMCA
SRIMCA
SRIMCA
SRIMCA
Review Guidelines..
Review the product, not producer Set an agenda and maintain it Limit the debate Enunciate problem areas, not to solve every problem noted Take written notes Allocate resources and time schedule for FTRs
SRIMCA
Limit the number of participants and insist upon advance preparation Develop a checklist for each work product to be reviewed Training for all reviewers Reviewing earlier reviews
Additional Structures
requirement changes must be formally reviewed and approved design changes must be formally reviewed and approved
SRIMCA
Categories of Errors
Incomplete or erroneous specification (IES) Misinterpretation of customer comm (MCC) Intentional deviation from specification (IDS) Violation of programming standards (VPS) Error in data representation (EDR) Inconsistent module interface (IMI) Error in design logic (EDL)
SRIMCA
SRIMCA
Definitions Ei = the total number of errors uncovered during the ith step in the software engineering process Si = the number of serious errors Mi = the number of moderate errors Ti = the number of minor errors PS = size of the product (LOC, design statements, pages of documentation)
SRIMCA
error index
Phase index for each step and then error index is calculated PIi = ws(Si/Ei)+wm(Mi/Ei)+wt(Ti/Ei) Formula:
(iXPI ) / PS
i
( PI 1 2 PI 2 3 PI 3 iPIi ) / PS
SRIMCA
Software Reliability
Defined as the probability of failure free operation of a computer program in a specified environment for a specified time. It can measured, directed and estimated A measure of software reliability is mean time between failures where MTBF = MTTF + MTTR MTTF = mean time to failure MTTR = mean time to repair
SRIMCA
Software Availability
Availability =MTTF/(MTTF + MTTR) * 100% Software availability is the probability that a program is operating according to requirements at a given point in time
SRIMCA
Software Safety
Processes that help reduce the probability that critical failures will occur due to SW Hazard analyses
Identify hazards that could call failure Develop fault tree Identify all possible causes of the hazard
Redundancy Require a written software safety plan Require independent verification & validation
SRIMCA
Formally
...
Power failure
Computer failure
Incorrect input
Computer failure
...
Logic reversed
SRIMCA
Software Safety
Redundancy
Replicated at
Verification
Assuring
that the software specifications are met that the product functions as desired
Validation
Assuring
Independence
SRIMCA
Purpose of Plan References Management Documentation Standards, Practices and Conventions Reviews and Audits Test Problem Reporting and Corrective action SRIMCA
Tools, Techniques and Methodologies Code Control Media Control Supplier control Records Collection, Maintenance and Retention Training Risk Management
ISO 9000 describes quality assurance elements in generic terms that can be applied to any business. It treats an enterprise as a network of interconnected processes. To be ISO-complaint processes should adhere to ISOthe standards described. Elements include organizational structure, procedures, processes and resources. Ensures quality planning, quality control, quality assurance and quality improvement.
SRIMCA
ISO 9001
An international standard which provides broad guidance to software developers on how to Implement, maintain and improve a quality software system capable of ensuring high quality software Consists of 20 requirements... Differs from country to country..
SRIMCA
Management responsibility Quality system Contract review Design Control Document and data control Purchasing
SRIMCA
Control of customer supplied product Product identification and traceability Process control Inspection and testing Control of inspection, measuring and test equipment
Inspection and test status Control of nonnonconfirming product Corrective and preventive action Handling, storage, packaging, preservation and delivery
SRIMCA
Control of quality records Internal quality audits Training Servicing Statistical techniques
SummarySQA must be applied at each step SQA might be complex Software reviews are important SQA activities Statistical SQA helps improve product quality and software process Software Safety is essential for critical systems ISO 9001 standardizes the SQA activities
SRIMCA
Overview
What
is SCM? What are the processes of SCM? How does each process do? Summary
Software Configurations
art of identifying, organizing and controlling modifications to the software being built
matter where you are in the system life cycle, the system will change and the desire to change it will persist throughout the life cycle
Sources of Change
New
business or market conditions new customer needs Organization and/or business downsizing Budgetary or scheduling constraints
Baseline Concept
IEEE
A specification or product that has been formally reviewed and agreed upon, that thereafter serve as the basis for further development, and that can be changed only through formal change control procedures
baseline is a milestone in the development of software that marked the delivery of one or more software configuration items
Common Baselines
System engineering Requirement analysis Software design Coding Testing Release
System specification Software requirement specification Design specification Source code Test plans/Procedures/Data Operational system
Information created as part of SE process SCIs used as target in SCM: System specification Software project plan Software requirements specification Preliminary user manual Design specification Source code listing
SCI (Contd)
Test
specification Operation and installation manuals Executable program Database description As-built user manual As Maintenance documents Standards and procedures for SE
SCM Process
Identification Version control Change control Configuration auditing Status reporting
basic
object: object: unit of text created during analysis, design, coding, or testing. Aggregated objects: a collect of basic objects objects:
Features of objects:
name:
a character string description: a list of data items to identify the SCI type and a project id, version information, etc. resources: entity that are provided, processed, referenced by the object Realization: a pointer to unit of text for a basic unit object or null for an aggregate object
Configuration Objects
Evolution Graph
obj 1.3 obj 1.0 obj 1.1 obj 1.2 obj 2.0 obj 1.1.2 obj 1.4 obj 2.1
obj 1.1.1
Version Control
an executable is built, the versions of its constituents must be consistent. If A depends upon B and B is recompiled, A may also need to be recompiled. What if multiple people need to modify same SCI? Need to know what version different customers have How do you keep track of 100s or 1000s of modules?
Version Control
Evolution graph to represent different versions Uses an object pool representing components, variants and versions, and their relationship RCS (Revision Control System) is common tool.
Use
Change Control
Change request from user Developer evaluates Change report is generated Change control authority makes decision Request is queued, persons are assigned Check out SCI(s) Change request is denied User is informed
Configuration Audit
Two approaches can be used to ensure proper implementation of change: formal technical review software configuration audit CA assesses a configuration object for characteristics that are not generally not considered during review CA generally checks:
Changes incorporated FTR conducted SE standards followed SCM procedures followed all related SCIs properly updated change date and author specified
Status Reporting
Event occurred -- An SCI received updated ID people involved Time happened Effects on others Generated on a regular basis To improve communication among all parties
Summary
SCM identifies, controls, audits and reports modifications An object becomes a baseline once developed and reviewed Version control is the set of procedures and tools for managing the use of these objects
Summary
Change control is a procedure activity necessary to achieve quality and consistency Configuration audit is an SQA activity to help ensure quality is maintained Reporting provides information for better communication
Overview
What
is SCM? What are the processes of SCM? How does each process do? Summary
Assistance - Changheng Du
Software Configurations
art of identifying, organizing and controlling modifications to the software being built
Assistance - Changheng Du
matter where you are in the system life cycle, the system will change and the desire to change it will persist throughout the life cycle
Sources of Change
New
business or market conditions new customer needs Organization and/or business downsizing Budgetary or scheduling constraints
November 16, 1997
Assistance - Changheng Du
Baseline Concept
IEEE
A specification or product that has been formally reviewed and agreed upon, that thereafter serve as the basis for further development, and that can be changed only through formal change control procedures
baseline is a milestone in the development of software that marked the delivery of one or more software configuration items
Assistance - Changheng Du
Common Baselines
System engineering Requirement analysis Software design Coding Testing Release
November 16, 1997
System specification Software requirement specification Design specification Source code Test plans/Procedures/Data Operational system
Assistance - Changheng Du
Information created as part of SE process SCIs used as target in SCM: System specification Software project plan Software requirements specification Preliminary user manual Design specification Source code listing
Assistance - Changheng Du
SCI (Contd)
Test
specification Operation and installation manuals Executable program Database description As-built user manual As Maintenance documents Standards and procedures for SE
Assistance - Changheng Du
Assistance - Changheng Du
SCM Process
Identification Version control Change control Configuration auditing Status reporting
Assistance - Changheng Du
basic
object: object: unit of text created during analysis, design, coding, or testing. Aggregated objects: a collect of basic objects objects:
Assistance - Changheng Du
Features of objects:
name:
a character string description: a list of data items to identify the SCI type and a project id, version information, etc. resources: entity that are provided, processed, referenced by the object Realization: a pointer to unit of text for a basic unit object or null for an aggregate object
November 16, 1997
Assistance - Changheng Du
Configuration Objects
Assistance - Changheng Du
Evolution Graph
obj 1.3 obj 1.0 obj 1.1 obj 1.2 obj 2.0 obj 1.1.2 obj 1.4 obj 2.1
obj 1.1.1
Assistance - Changheng Du
Version Control
an executable is built, the versions of its constituents must be consistent. If A depends upon B and B is recompiled, A may also need to be recompiled. What if multiple people need to modify same SCI? Need to know what version different customers have How do you keep track of 100s or 1000s of modules?
November 16, 1997
Assistance - Changheng Du
Version Control
Evolution graph to represent different versions Uses an object pool representing components, variants and versions, and their relationship RCS (Revision Control System) is common tool.
Use
Change Control
Change request from user Developer evaluates Change report is generated Change control authority makes decision Request is queued, persons are assigned Check out SCI(s)
November 16, 1997
Assistance - Changheng Du
Assistance - Changheng Du
Configuration Audit
Two approaches can be used to ensure proper implementation of change: formal technical review (FTR) software configuration audit CA assesses a configuration object for characteristics that are not generally not considered during review CA generally checks:
Changes incorporated FTR conducted SE standards followed SCM procedures followed all related SCIs properly updated change date and author specified
Assistance - Changheng Du
Status Reporting
Event occurred -- An SCI received updated ID people involved Time happened Effects on others Generated on a regular basis To improve communication among all parties
Assistance - Changheng Du
Summary
SCM identifies, controls, audits and reports modifications An object becomes a baseline once developed and reviewed Version control is the set of procedures and tools for managing the use of these objects
Assistance - Changheng Du
Summary
Change control is a procedure activity necessary to achieve quality and consistency Configuration audit is an SQA activity to help ensure quality is maintained Reporting provides information for better communication
Assistance - Changheng Du
Systems Engineering
System
A set or arrangement of things so related as to form a unity or organic whole. A set of facts, principles, rules, etc., classified and arranged in an orderly form so as to show a logical plan linking the various parts. A method or plan of classification or arrangement. An established way of doing something; method; procedure.
Assistance - Eric Christensen
Computer-Based Systems
Definition: A set or arrangement of elements that are organized to accomplish some pre-defined goal by processing preinformation. Elements
Typical Hierarchy
System Modeling
Define the processes that define the needs of the view under consideration Represent the behavior of the processes and the assumptions on which the behavior is based Explicitly define all inputs and outputs to each component Define the transformation between inputs and outputs of each component Represent all linkages (interfaces)
Critical Factors
It is absolutely essential that the following be spelled out completely and in detail
Information Engineering
A set of component types together with a set of principles and guidelines for their interconnection. Also used to refer to the structure of a system. data architecture applications architecture technology infrastructure
Assistance - Eric Christensen
Information strategy planning(isp) Business area analysis(baa) Business system design(bsd) Construction and integration(C&I)
A Diagrammatic View
Product Engineering
Develop support infrastructure Develop systems view of components Systems analysis
A Diagrammatic View
Organizational structures and functions Decomposes business functions to isolate processes that make function happen Relate objectives, goals, and CSFs to the organization and its functions
focuses on the data objects required to achieve the business functions identifies relationships between customers, products, salespersons, etc.
Culmination - a series of cross reference matrices that establish the relationship between the organization, business objectives and goals, business functions, and data objects.
Assistance - Eric Christensen
data models process flow models process decomposition diagrams crosscross-reference matrices
Assistance - Eric Christensen
Domain View
Data Modeling
Identify data object types (or classes) Determine essential attributes Determine other objects with which the object has relations Determine operations which will need to be performed on the object
Product Engineering
Problem solving activity where desired product data, function, and behavior are analyzed and allocated to individual components Major activities
Support infrastructure Bound function, performance, constraints, and interfaces Develop alternative allocations
Assistance - Eric Christensen
Product Engineering
TradeTrade-off Criteria
Project Considerations Business Considerations Technical Analysis Manufacturing Evaluation Human Issues Environmental Interfaces Legal Considerations
Assistance - Eric Christensen
System Analysis
Identification of Need Feasibility Study Perform economic and technical analyses Allocate functions to hardware, software, people, database Establish cost and schedule constraints Create system definition
Feasibility Study
Economic - cost-benefit analysis cost Technical - development risk, resource availability, technology Legal - definition of infringements or violations from system development Alternatives - evaluation of alternative approaches
Benefit Analysis
Cost Analysis
Architecture Template
CLSS Example
Expanded Example
Building a Hierarchy
One can build models of the systems to be built One can test drive the model before building it
Assistance - Eric Christensen
System Specification
Document that serves as a foundation for hardware engineering, software engineering, data base engineering, and human engineering Describes function and performance of computercomputer-based system as well as constraints An essential element required for systems engineering
Analysis
Concepts and Principle
August 2003
Pressman Chap. 11
Requirement Analysis
Results in specs. of s/w operational characteristics (function, data and behavior) Indicate s/w interface with other system elements Establish constraints that s/w must meet
August 2003
Pressman Chap. 11
Requirement Analysis
RA allows the analyst to refine the s/w allocation and build models of the data, functional and behavioral domains It provides the analyst with a representation of info., function & behavior that can be translated into data, architectural and component level design Means to access quality once s/w is built
Requirements Analysis
Five Activities
August 2003
Pressman Chap. 11
Problem Recognition
Understanding what the customer really wants Getting inside the customers requirements usus-them paradigm rather than we Federal Acquisition Regulations (FARs)
Require customer to prepare specifications Limit discussion between customer and supplier during bidding process.
Pressman Chap. 11
5
August 2003
Meeting (often at neutral site) Establish meeting rules Agenda to cover important points A facilitator -- best if not customer or supplier Definition mechanism Understand goal -- to identify problem, specify a preliminary set of requirements
Pressman Chap. 11
6
August 2003
August 2003
Pressman Chap. 11
Normal Requirements
What will make customer happy Unstated requirements that are so obvious that they need not be stated Enhancements beyond customer requirements
Pressman Chap. 11
8
Expected Requirements
Unexpected Requirements
August 2003
Analysis Principles
First Operational Analysis principle requires examination of the info. Domain and creation of data model Second & Third operational analysis principle require that we build models of function and behavior Fourth Op. analysis principle suggests that the info., functional and behavioral domains of s/w can be partitioned.
Pressman Chap. 11
9
August 2003
Analysis Principles
Basic prinicples
Represent and understand information domain Define functions that must be performed Represent behavior of software (to external events) Partition information, function and behavior models hierarchically Move from essential information to implementation detail
Pressman Chap. 11
10
August 2003
Guiding Principles
Understand problem before analysis Develop prototypes for HCI Record rationale for every requirement Develop multiple views of each requirement
Information Domain
Payroll processing Computing control signals for radar system Timer went off -- time to calculate a control Sensor turned on -- indicates intruder Heart rate monitor exceeded threshold -indicates fibrillation.
Pressman Chap. 11
12
August 2003
Information Domain
Information content Information flow Information structure Functional -- possibly show block diagrams Behavioral -- define states and transitions
Pressman Chap. 11
13
Process Models
August 2003
Partitioning
August 2003
Pressman Chap. 11
14
Prototyping
Highly desirable
Clarify requirements Identify missing requirements Help define user interfaces Throwaway Evolutionary -- a potential problem is that intended throwaways become evolutionary
Pressman Chap. 11
15
Types of prototypes
August 2003
Prototyping
Must commit resources for evaluation Must be capable of making requirements decisions in timely manner
August 2003
Pressman Chap. 11
16
Prototyping
Fourth Generation Techniques -- program application generators Reusable Software Components -- build from existing components Formal Specification and Prototyping Environments
August 2003
Specifications
Separate Function from Implementation Develop Model Define Environment Define how software interacts with environ. Create Cognitive model -- how world sees it Recognize specs as imperfect Flexibility -- be amenable to change
Pressman Chap. 11
18
August 2003
Representation
August 2003
Pressman Chap. 11
19
August 2003
Pressman Chap. 11
20
Specifications Review
Macroscopic Level
View from the top Goals met ? Alternatives explored ? Customer satisfied ? Avoid persuasive, intimidating connectors Ambiguous words Vague language Watch for unstated assumptions
Pressman Chap. 11
21
Specifics
August 2003
Analysis Modeling
products must be maintainable Effective partitioning is essential Graphics should be used whenever possible Distinguish between logical and implementation
August 2003 1
Structured Analysis
Elements of Analysis
Describe what customer requires Establish basis for creating software design Define requirements that can be validated
August 2003 2
August 2003 3
Data Modeling
Data object [types] Attributes Relationships A representation of almost any composite information that must be understood by software.
4
Data objects
August 2003
Data Modeling
Attributes
Attributes define the properties of a data object and take on one of three different characteristics:
Name an instance of the data object Describe the instance Make reference to another instance Referential Descriptive attributes Naming attributes attributes Identifier
Make
Model
ID#
Q12A45.. AB123...
Body type
Sedan Sports
Color Owner
Blue White ABC XYZ
5
Data Modeling
Relationships
Book
sells returns
Bookstore
August 2003 6
Cardinality
How many occurrences of object X are related to how many occurrences of object Y
Modality
August 2003
Example
Customer
is provided with
Repair action
August 2003 8
manufacturer
car
body type
engine
transmission
...
9
Example
August 2003 10
August 2003 11
August 2003 12
Functional Modeling
August 2003 13
A graphical technique that depicts information flow and the transforms applied as data move from input to output Not the same as flow charts. Does not show the logic of the transformations Can be used at any level of abstraction
August 2003 14
August 2003 15
Basic Notation
August 2003 16
V f
1
f2
X f
4
f6 Z z1 f5 z3
z2 f7
W f3 Y X Y
f f
41
x1 y1
f f
43
x2 y2
45
Z
17
42
44
August 2003
Fundamental issue - The time at which results are produced is a part of the correctness of the computation. Hatley/Pirbhai notation
August 2003 18
Ward/Mellor Notation
August 2003 19
Example
August 2003 20
Example
August 2003 21
Use separate data flow diagram (DFD) and control flow diagram (CFD) Data flow diagrams
Used to represent data and the processes that manipulate it Show how events flow among processes and show those external events that cause various processes to be activated
22
August 2003
August 2003 23
Example
August 2003 24
manage copying
status
problem diagnosis
repro fault
25
Behavioral Modeling
e.g., reading commands, computing control, waiting for next time event
States represented as rectangles Arrows represent transitions Value above arrow identifies event causing transition Value below arrow indicates ensuring action
27
August 2003
jammed
invoke perform problem-diagnosis
August 2003
diagnosing problem
Creating an ERD
List entities that customer addresses For each, determine the connections For each connection, create one or more objectobject-relationship pairs For each relationship, determine cardinality and modality Define the attributes of each entity Formalize and review ERD Iterate
29
August 2003
Initial entities
August 2003 30
Security system monitors sensor Security system enables/disables sensor Security system tests sensor Security system programs sensor
August 2003 31
Depict software system as single bubble Show primary inputs and outputs
Identify processes, data objects, and data stores to be expanded at next level Label all arrows with meaningful names Information flow continuity must be maintained Refine only one bubble at a time
August 2003 32
August 2003 33
Refinement
verbs are often processes nouns are often external entities, data or control objects or data stores Control panel is used to program and configure the system Upon a sensor event, the software invokes an alarm
34
Examples
August 2003
August 2003 35
August 2003 36
Strip arrows from DFD Add event and control items. E.g., try
List all sensors read by the software List all interrupt conditions List all operator actuated switches List all data conditions Check noun-verb parse for possible CSPEC I/O nounIdentify states, how each is reached and transitions Focus on possible omissions
37
August 2003
August 2003 38
Control Specification
August 2003 39
August 2003 40
Process Specifications
Narrative text, Program design language description Mathematical equations Tables Diagrams Charts
41
August 2003
Data Dictionary
Data Dictionary
Why a data dictionary? Need an organized way to represent data & control characteristics Usual contents
Name Alias Where and how used Content description (of composite items) Supplementary information, e.g., restrictions, limitations, preset values
43
August 2003
Example
Name: Shuttle position Aliases: Position-orientation vector PositionWhere used: Display of Shuttle on map Content: x, y, z position wrt to Earths Center, roll, pitch, yaw Supplementary Info: Elevation must be above 140 nautical miles
44
August 2003
Data Dictionary
Preventing creation of duplicate names Enforce naming conventions Printing dictionary Determine the range of impact of changes, i.e., which processes are affected Assist configuration management
August 2003 45
Summary
Key elements
Data modeling
Data objects, attributes and relationships Cardinality and modality EntityEntity-relationship diagrams Data and control flow diagrams State transition diagrams
Functional modeling
Behavioral modeling
Data Dictionary
46
August 2003
Software Design -- An iterative process transforming requirements into a blueprint for constructing the software.
Topics
The Design Process Design Principles Design Concepts-Abstraction & Refinement Software Architecture Program Partitioning Coupling and Cohesion
Sep. 2003
S.E. - RSP
Sep. 2003
Architectural Design
Defines relationship among the major structural elements of a program
Architectural Design
Data Design
The Design Model Which is mapped from the Analysis model S.E. - RSP
Sep. 2003
Procedural Design
Transforms structural elements of the architecture into a procedural description of software construction
The Design Model Which is mapped from the Analysis model S.E. - RSP
Sep. 2003
Sep. 2003
Design Guidelines
A design should exhibit a hierarchical organization A design should be modular A design should contain both data and procedural abstractions Modules should exhibit independent functional characteristics Interfaces should reduce complexity A design should be obtained from a repeatable method, driven by analysis
Sep. 2003 7
Design Principles
Design Process:
Iterative steps that enable description of all aspects of the software
Design principles:
The design process should consider various approaches based on requirements The design should be traceable to the requirements analysis model The design should not reinvent the wheel -- Reuse! Design should mimic the structure in the problem domain
Sep. 2003 S.E. - RSP 8
Design Principles
Design should be uniform and exhibit integrity Design should accommodate change Design should minimize coupling between modules Design should be structured to degrade gently
It should terminate gracefully and not bomb suddenly
Design and coding are not interchangeable Design should have quality assessment during creation, not afterwards
This is to reduce development time
Design should be reviewed to minimize on conceptual errors -- Formal design reviews! There is a tendency to focus on the wrong things
All conceptual elements have to be addressed
Sep. 2003 S.E. - RSP 9
Specification Type definitions Subprogram profiles Constants Body Encapsulated data Subprogram definitions
Sep. 2003
10
//
Sep. 2003
Module A specification Module B body s: A.shuttle; x_coord: float; s := A.get; display(s); x_coord := s.x; ...
Sep. 2003
type shuttle is record x: float; -- wrt to coord sys y: float; -- wrt to coord sys z: float: -- wrt to coord sys roll: float; pitch: float; yaw: float; end record; function get return shuttle; Body A
12
Module A specification Module B body s: A.shuttle; x_coord: float; s := A.get; display(s); x_coord := s.x; ...
Sep. 2003
type shuttle is record x: float; -- latitude y: float; -- longitude z: float: -- elevation roll: float; pitch: float; yaw: float; end record; function get return shuttle; Body A
13
Module A specification Module B body s: A.shuttle; x_coord: float; s := A.get; A.display(s); x_coord := A.get_x(s); ...
Sep. 2003
type shuttle is private; function get return shuttle; function get_lat(s) return float; function get_x(s) return float; function get_long(s) return float; procedure display(s:shuttle); private type shuttle is record x,y,z: float; roll, pitch,yaw: float; end record;
14
Design Concepts-Abstraction
Wasserman: Abstraction permits one to concentrate on a problem at some level of abstraction without regard to low level details Data Abstraction
This is a named collection of data that describes a data object
Procedural Abstraction
Instructions are given in a named sequence Each instruction has a limited function Control Abstraction A program control mechanism without specifying internal details, e.g., semaphore.
Sep. 2003 S.E. - RSP 15
Refinement
Refinement is a process where one or several instructions of the program are decomposed into more detailed instructions. Stepwise refinement is a top down strategy
Basic architecture is developed iteratively Step wise hierarchy is developed Forces a designer to develop low level details as the design progresses Design decisions at each stage
Sep. 2003 S.E. - RSP 16
Modularity
In this concept, software is divided into separately named and addressable components called modules Follows divide and conquer concept, a complex problem is broken down into several manageable pieces Let p1 and p2 be two program parts, and E the effort to solve the problem. Then, E(p1+p2) > E(p1)+E(p2), often >> A need to divide software into optimal sized modules
Sep. 2003 S.E. - RSP 17
Module A specification Module B body s: A.shuttle; x_coord: float; s := A.get; A.display(s); x_coord := A.get_x(s); ...
Sep. 2003
type shuttle is private; function get return shuttle; function get_lat(s) return float; function get_x(s) return float; function get_long(s) return float; procedure display(s:shuttle); private type shuttle is record x,y,z: float; roll, pitch,yaw: float; end record;
18
Sep. 2003
19
Modularity
Objectives of modularity in a design method Modular Decomposability
Provide a systematic mechanism to decompose a problem into sub problems
Modular Composability
Enable reuse of existing components
Modular Understandability
Can the module be understood as a stand alone unit? Then it is easier to understand and change.
Sep. 2003 S.E. - RSP 20
Modularity
Modular Continuity
If small changes to the system requirements result in changes to individual modules, rather than system-wide changes, the impact of the side effects is reduced (note implications in previous example)
Modular Protection
If there is an error in the module, then those errors are localized and not spread to other modules
S.E. - RSP
Sep. 2003
21
Software Architecture
Desired properties of an architectural design Structural Properties
This defines the components of a system and the manner in which these interact with one another.
Extra Functional Properties This addresses how the design architecture achieves requirements for performance, reliability and security Families of Related Systems
The ability to reuse architectural building blocks
Sep. 2003 S.E. - RSP 22
Structural Diagrams
Sep. 2003
23
Kinds of Models
Terminology
Structural models
Organized collection of components
Framework models
Abstract to repeatable architectural patterns
Dynamic models
Behavioral (dynamic) aspects of structure
Process models
Business or technical process to be built
Functional models
Functional hierarchy of the system
Sep. 2003 24
Sep. 2003
S.E. - RSP
25
Sep. 2003
S.E. - RSP
26
Information Hiding
Modules are characterized by design decisions that are hidden from others Modules communicate only through well defined interfaces Enforce access constraints to local entities and those visible through interfaces Very important for accommodating change and reducing coupling
Sep. 2003 27
Module A specification Module B body s: A.shuttle; x_coord: float; s := A.get; A.display(s); x_coord := A.get_x(s); ...
Sep. 2003
type shuttle is private; function get return shuttle; function get_lat(s) return float; function get_x(s) return float; function get_long(s) return float; procedure display(s:shuttle); private type shuttle is record x,y,z: float; roll, pitch,yaw: float; end record;
28
Functional Independence
Critical in dividing system into independently implementable parts Measured by two qualitative criteria
Cohesion
Relative functional strength of a module
Coupling
Relative interdependence among modules
Sep. 2003
29
Sep. 2003
30
Logical Cohesion
Modules have a logical cohesion, but no actual connection in data and control
Temporal Cohesion
Modules are bound together because they must be used at approximately the same time
Sep. 2003 S.E. - RSP 31
Sequential Cohesion
Elements in a module are linked together by the necessity to be activated in a particular order
Functional Cohesion
All elements of a module relate to the performance of a single function
Sep. 2003
S.E. - RSP
32
Stamp coupling
Occurs when part of a data structure is passed to another module as a parameter
Sep. 2003
S.E. - RSP
33
Common Coupling
Occurs when multiple modules access common data areas such as Fortran Common or C extern
Content Coupling
Occurs when a module data in another module
Subclass Coupling
The coupling that a class has with its parent class
Sep. 2003 S.E. - RSP 34
Examples of Coupling
Sep. 2003
35
Design Heuristics
Evaluate 1st iteration to reduce coupling & improve cohesion Minimize structures with high fan-out; strive for depth Keep scope of effect of a module within scope of control of that module Evaluate interfaces to reduce complexity and improve consistency
Sep. 2003 36
Design Heuristics
Define modules with predictable function & avoid being overly restrictive
Avoid static memory between calls where possible
Strive for controlled entry -- no jumps into the middle of things Package software based on design constraints and portability requirements
Sep. 2003 37
Program Structure
Sep. 2003
38
Documentation
Sep. 2003
39
Summary
Design is the core of software engineering Design concepts provide the basic criteria for design quality Modularity, abstraction and refinement enable design simplification A design document is an essential part of the process
Sep. 2003
S.E. - RSP
40
Design -- A multistep process in which representations of data structure, program structure, interface characteristics, and procedural detail are synthesized.
S/W Architecture
Structure(s) of the system, which comprise s/w components, the externally visible properties of those components, and the relationships between them
October 2003
SRIMCA
S/W Architecture
Analyze the effectiveness of the design in meeting its stated reqs. Consider architectural alternatives at a stage when making design changes is still relatively easy. Reducing the risks associated with the construction of the s/w.
Enabler for comm. between parties (stakeholders). Highlights early design decisions which affect all s.e. work that follows, resulting into success of the system as operational entity. Constitutes a relatively small, whole model of how the system is structured and how components work together.
SRIMCA 4
October 2003
Data Design
Transform the information domain model created during analysis into data structure required to implement the software Well-designed data lead to better program structure and modularity, reduced procedural complexity
October 2003
SRIMCA
Define data structures identified during the requirements and specification phase.
Identify all program modules that must operate directly upon the data structure
Constrain
decisions
Or, from OO perspective, define all operations performed on the data structure
October 2003 SRIMCA 6
The systematic analysis principles applied to function and behavior should also be applied to data All data structures and the operations to be performed on each should be identified.
October 2003
SRIMCA
A data dictionary should be established and used for both data and program design Low-level data design decisions should be deferred until late in the design process The representation of data structures should be known only to those modules that must make direct use of the data contained within the structure.
Information hiding
SRIMCA
October 2003
A library of useful data structures and the operations that may be applied to them should be developed. Reuse The software design and programming languages should support the specification and realization of abstract data types.
SRIMCA 9
October 2003
Architectural Styles
October 2003
SRIMCA
10
Architectural Styles
Taxonomy of styles
Data-centered architectures Data-flow architectures Call and return architectures
October 2003
SRIMCA
11
Architectural Design
Objective
develop a modular program structure and represent control relationships between modules
Six-step Process
the type of information flow is established flow boundary are indicated data flow diagram is mapped into program structure control hierarchy is defined by factoring resultant structure is refined using design measures heuristics the architectural description is refined and elaborated.
SRIMCA 13
October 2003
Transform Flow
outgoing flows B C
October 2003
SRIMCA
14
Transaction Flow
Transaction T Action paths
Transaction center
October 2003
SRIMCA
15
Transform Mapping
Allow data flow diagram(DFD) with transform flow characteristics to be mapped into a predefined template for program structure
October 2003
SRIMCA
16
October 2003
SRIMCA
17
October 2003
SRIMCA
18
October 2003
SRIMCA
19
Transform Mapping
(cont)
Design steps
Step
1. Review the fundamental system model. Step 2. Review and refine data flow diagrams for the software. Step 3. Determine whether DFD has transform or transaction flow characteristics. in general---transform flow special case---transaction flow
October 2003 SRIMCA 20
October 2003
SRIMCA
21
Transform Mapping
(cont)
step 4. Isolate the transform center by specifying incoming and outgoing flow boundaries
different designers may select slightly differently transform center can contain more than one bubble.
October 2003
SRIMCA
22
October 2003
SRIMCA
23
Transform Mapping
step
(cont)
mapping individual transforms(bubbles) to appropriate modules. factoring accomplished by moving outwards from transform center boundary.
step
7. Refine the first iteration program structure using design heuristics for improved software quality.
October 2003
SRIMCA
24
October 2003
SRIMCA
25
October 2003
SRIMCA
26
October 2003
SRIMCA
27
Transaction Mapping
A single data item triggers one or more information flows
October 2003
SRIMCA
28
Step 1.Review the fundamental system model. Step 2.Review and refine DFD for the software Step 3.Determine whether the DFD has transform or transaction flow characteristics Step 4. Identify the transaction center and flow characteristics along each of the action paths
isolate incoming path and all action paths each action path evaluated for its flow characteristic.
October 2003 SRIMCA 29
branch branch
bubbles along this path map to modules dispatcher module controls all subordinate action modules each action path mapped to corresponding structure
October 2003 SRIMCA 30
Transaction Mapping
October 2003
SRIMCA
31
October 2003
SRIMCA
32
October 2003
SRIMCA
33
October 2003
SRIMCA
34
Design Postprocessing
A processing narrative must be developed for each module An interface description is provided for each module Local and global data structures are defined All design restrictions/limitations are noted A design review is conducted Optimization is considered (if required and justified)
SRIMCA 35
October 2003
Data design translates the data objects defined in the analysis model into data structure that reside with in the software Architectural design use information flow characteristics described in the analysis model to derive program structure DFD is mapped into program structure use two approaches: transform and transaction mapping
SRIMCA 36
October 2003
Interface Design
Interfaces between software modules Interfaces between software and nonhuman producers and consumers
For
October 2003
SRIMCA
37
DFDs show data flow between modules Arrows map into parameters in and out of interface Determine functions & procedures using/producing the data Typically involves both hardware & software Often supplied by vendor, e.g., A/D boards Often complex functionality
October 2003
task, and environment analysis and modeling Interface design Interface construction Interface validation
October 2003
SRIMCA
Stepwise elaboration
Establish goals and intentions for task Map goal to sequence of actions as it will be executed through the interface Specify action sequence Indicate state of the system Define control mechanism and effects on system state Indicate how user interprets system state
October 2003 SRIMCA
DESIGN ISSUES
Length Variability Scope Access methods Representation How return to normal process Structure
SRIMCA
October 2003
frustration Understandable language Constructive advice Negative consequences of error Audible or visible cue Nonjudgmental (dont call user an idiot) Command labeling - hot keys vs. point and click Scope Form Ease of use Customization or abbreviation
October 2003 SRIMCA
DESIGN EVALUATION
Length and complexity of written specification Number of commands, average number of arguments per command, operations per action Number of actions, commands, and system states -- memory load on user Interface style, help facilities, and error handling protocol
DESIGN EVALUATION
October 2003
SRIMCA
45
Be consistent Offer meaningful feedback Ask for verification of any destructive action Permit easy reversal of actions Reduce amount of information to be memorized Seek efficiency in dialog, motion, and thought Forgive mistakes Categorize activities and organize geographically Provide help facilities Use simple action verbs to name commands
SRIMCA
October 2003
Display only information relevant to current context Use format that enables rapid assimilation of information Use consistent labels, abbreviations, and colors Allow user to maintain visual context Produce meaningful error messages Use text formatting to aid understanding Compartmentalize information Use analog displays when appropriate Use screen geography efficiently
SRIMCA
October 2003
Minimize number of input actions Maintain consistency between display and input Allow user to customize input Allow for flexible interaction Deactivate commands not relevant in current context Let user control interactive flow Provide help Eliminate unnecessary input
SRIMCA
October 2003
SUMMARY
THE INTERFACE TRIAD
Be good to your users Do not deceive your users Allow your users to use his/her mind to its greatest potential In other words: Use common sense Do undo your users as you would have others do undo you
PROCEDURAL DESIGN
Basic constructs
Sequence,
Notations
Flow
October 2003
SRIMCA
50
FLOWCHARTS
October 2003
SRIMCA
51
TABULAR NOTATION
October 2003
SRIMCA
52
October 2003
SRIMCA
54
Real-time Systems - Systems in which the correctness of the program depends upon the time are which the results are delivered as well as the values calculated.
1
Outline
The introduction to real-time system
Some key issues that differentiate the real-time systems from other types of computer software
System Considerations
Some differences between real-time software development and other software engineering effort:
The design of a real-time system is resource constrained Real-time systems are compact, yet complex Real-time systems often work without the presence of a human user
December 25, 1997 Assistance - Yaru Liu 4
Performance Issues
Each real-time design concern for software must be applied in the context of system performance
Coordination between the real-time tasks
Synchronization Shared resources, e.g., memory, cpu
Processing of system interrupts I/O handling to ensure that no data are lost Specifying the systems internal and external timing constraints Scheduling of tasks to guarantee meeting deadlines
December 25, 1997 Assistance - Yaru Liu 5
Performance Issues
The performance of a real-time system is determined primarily by the system response time and its data transfer rate
System response time is the time within which a system must detect an internal or external event and respond with an action The data transfer rate indicates how fast serial or parallel data, as well as analog or digital data, must be moved into or out of the system
Fundamental question
Does it meet all deadlines or not?
December 25, 1997 Assistance - Yaru Liu 6
Performance Issues
Key parameters that affect the system response time
Context switching
the time and overhead to switch among tasks
Interrupt latency
the time lag before the switch is actually possible
Interrupt handling
Normal processing flow
Interrupt is posted
RTOS must have a memory locking mechanism Must provide timing control mechanisms
Time resolution should be 1 ms. or less.
December 25, 1997 Assistance - Yaru Liu 11
12
Real-time languages
Some differences between a real-time language and a general-purpose language
Multitasking capability Constructs to directly implement real-time functions
timing management task scheduling
Mailboxes
buffers which store message or message pointer sent from one process to another
Message systems
one process sends a message to another
Advanced concepts
Tasking Rendezvous Monitors
December 25, 1997 Assistance - Yaru Liu
14
2 3
1
P13 = 0.4
18
Queuing Model
19
20
Simplifying Networks
21
Example
23
24
Programming simulations
Simulation control language (SCL)
Real-time design
Incorporate all of the fundamental concepts and principles associated with high-quality software A set of unique problems
Representation of interrupts and context switching Concurrency as manifested by multitasking and multiprocessing Inter-task communication and synchronization
December 25, 1997 Assistance - Yaru Liu 27
Real-time design
A number of modeling principles
Explicit atomicity Interleaving Nonterminating histories and fairness Closed system principle - include environment with computer system in analysis Structuring state by objects Sometimes, physically measure task times
December 25, 1997 Assistance - Yaru Liu 29
Summary
The design of real-time software = all aspects of conventional software design + a new set of design criteria and concerns Real-time software must respond to realworld events in a time frame dictated by those events Clock or event driven Can be very difficult to design and even more difficult to test, verify and validate
December 25, 1997 Assistance - Yaru Liu 30
Introduction
Many aspects to achieving software quality
Formal reviews (of both the software process and the various stages of development), audits, documentation, etc. Unit testing Integration testing Verification
Does the module meet the specifications
Validation
Does the product meet the requirements
2
System Test
Acceptance Test
Integration Environment
Developers
Early Unit Integ User Eval Test
System Integration and Test Group Validation Group Application S/W IPT
Design
Unit Test
Development Environment
Users
Introduction
A Critical element of the Software Quality Assurance Represents a critical review of Specifications, Design and Coding Destructive rather than Constructive (try to break the system) Major objective is to find errors not to show the absence of errors (as distinct from Verification and Validation)
4
Objectives
Testing is a process of executing a program with the intent of finding an error A good test case is one that has a high probability of finding an as-yet undiscovered error A Successful test is one that uncovers an asyet undiscovered error
5
Principles
All tests should be traceable to customer requirements Tests should be planned long before testing begins The Pareto principle applies to Testing
Typically, 80% of the errors come from 20% of the modules
Testing should begin in the small and progress towards in the large Exhaustive Testing is not possible, but,
if time permits, conduct multiple failure mode testing
Testability
The ease with which a computer program can be tested .
While this is very important, it does not obviate the need for integration testing
11
12
13
A Good Test
A good test has a high probability of finding an error A good test is not redundant A good test should be best of breed A good test should be neither too simple nor too complex
15
Types of Testing
White-Box Testing
Knowing the internal workings of a product, tests are conducted to ensure that all gears all mesh
Black-Box Testing
Knowing the specified function that a product has been designed to perform , tests are conducted to demonstrate that each function is fully operational (note: this is still different from validation)
16
18
20
21
3 5
Cyclomatic complexity = 11 - 9 + 2 = 3 + 1 = 4
25
26
Example
27
Example
28
Condition Testing
Exercises all the logical conditions in a module Types of possible errors
Boolean variable error Boolean Parenthesis error Boolean Operator error Arithmetic expression error
29
Domain Testing
for every Boolean expression of n variables , all of 2n possible tests are required this can detect boolean operator, variable, parenthesis errors, if n is small.
30
31
Kinds of Loops
34
Loop Testing
Focus is on the validity of loop constructs Simple loop ( n is the max. no. of allowable passes )
Skip the loop entirely Only one pass through the loop Two passes m passes , where m < n n-1 , n , n+1 passes
Nested loop
Start at innermost loop Conduct simple loop test for this loop holding the outermost loop at their minimum iteration parameter Move outwards one loop at a time Continue until all loops have been tested
35
Unstructured loops
Should be restructured into a combination of simple and nested loops
36
new file
is represented as
Document window
Attributes :
start dimension Background color text color
contains
Document text
39
40
Equivalence Partitioning
Input domain divided into classes of data from which test cases are derived Goal is to design a single test case that uncovers classes of errors , thereby reducing the total number of test cases to be developed Each class represents a set of valid or invalid states for input conditions
41
Comparison Testing
Multiple copies of the software are constructed in case of critical applications
Example: Shuttle Flight Control Software
Each version is independently built from the specs by different teams Test cases derived from other BB Testing techniques are provided as input to each version Outputs are compared and versions validated Not fool proof
45
Other Cases
GUI testing
See text for partial list of things to test
Client Server
Often distributed -- complicates testing Additional emphasis on non-interference among clients
Documentation
Use black box techniques
Real-time
Beyond the scope of this course
46
Summary
Destructive rather than constructive Main goal is to find errors not to prove the absence of errors White Box Testing
control structure testing Condition testing Data flow testing Loop testing Graph based testing Equivalence partitioning Boundary Value testing Comparison testing
47
CLCS Example
Software IRIX (UNIX operating system) Vendor Silicon Graphics Incorporated (SGI) Version 6.2 6.3 5.2 Platform SGI Indigo 2, SGI Indy, SGI Challenge SGI O2 SDS Gateway, CS Gateways Facility SDE, LCC-X SDE, LCC-X SDE, LCC-X
IRIX (UNIX Silicon Graphics operating system) Incorporated (SGI) VxWorks (Gateway VxWorks OS)
CLCS Example
data. Step 1. 2.
Description
Turn on SDE1 network hardware and PCs Turn on the sde1net workstation, wait for it to finish booting (login screen will be displayed), then turn on the sde1boot workstation and wait for it to finish booting. Turn on all remaining HCI workstations and the sde1ddp1 machine.
Expected Results
Blinky lights start blinking on the network devices, PCs execute power on self tests, boots OS POST (Power On Self Test) tests occur, Operating system start procedures initiate, Login screens appear. POST (Power On Self Test) tests occur, Operating system start procedures initiate, Login screens appear.
49
3.
CLCS Example
16.
Initiate data acquisition at the sde1hci7 workstation. In the Dnav master menu, select Global Apps, then select Start receive process, then select GW to HCI JUNO_DDP_8 Start data display. In the Dnav master menu, select Shuttle, then select any of the following: Wind Speed Wind Direction PAD A Wind Direction PAD B Temperature Stop data display at the workstation. Select quit from display menu(s) The System messages window indicates that the Start receive process is executing, no unexpected errors are displayed in the console window. The command is accepted (as shown in the System messages and console windows), the appropriate display(s) are started and are regularly updated.
17.
18.
50
Test Results
Number Title Juno-11 Juno-12 Juno-13 Juno-14 Juno-15 Telnet from sde1hci1 to sde1ddp-r failed Remote delog written into wrong directory Application displays CPU intensive Telnet to SDS Gateway not working Error received when attempting to start receive process Opened During System Test System Integration System Integration System Test System Test Criticality Major Major Minor Minor Major Date Opened 4/14/97 4/15/97 4/15/97 4/22/97 4/22/97 Current Status Open Open Open Open Open
51
Lessons Learned
The configuration management process was not complete, multiple baselines of some software components existed. A CLCS software sustaining process needs to be defined and implemented as soon as possible. Requirements buy-off process needs to be refined. Hardware identification could be improved.
52
CHAPTER 17
TOPICS
A
strategic approach to software testing Unit Testing Integration Testing Validation Testing System Testing The ART of Debugging Summary
2 April 2004 SRIMCA
begins at module level and works outward towards the of integration entire computer based system. Different testing techniques are required at different points in time. Testing is conducted by the s/w developer and ITG ( Independent Test Group ) for large projects. Testing and Debugging are different and Debugging is essential in any testing strategy.
3 April 2004 SRIMCA
Verification
-- Does the product meet its specifications? Validation -- Does the product perform as desired?
April 2004 SRIMCA
= cumulative remaining errors at time t l0 = initial failure rate p = exponential reduction as errors repaired f(t) = (1/p)ln(l0pt + 1)
STRATEGIC APPROACH
Issues
product requirements in a quantifiable manner long before testing commences. State testing objectives explicitly. Understand the users of the software. Develop testing plan that emphasizes rapid cycle testing.
8 April 2004 SRIMCA
STRATEGIC APPROACH
Issues
itself. Use effective formal technical reviews as a filter to testing. Conduct formal technical reviews to assess test strategy and test cases. Develop continuous improvement approach
9 April 2004 SRIMCA
UNIT TESTING
Unit
testing -- focuses on the smallest element of software design viz. the module.
Corresponds
Makes
UNIT TESTING
Unit Test Generation Considerations:
Review Design information - develop unit test cases. interface local data structures boundary conditions independent paths error handling paths Test cases
11 April 2004 SRIMCA
considerations
of input parameters = # arguments? Parameter and argument attributes match? Parameter and argument units match? Order correct (if important)? Number and order of arguments for built-ins? References to parms not associated with entry point? Attempt to modify input-only arguments? Global variable definitions consistent? Constraints passed as arguments?
12 April 2004 SRIMCA
I/O considerations
attributes correct? OPEN/CLOSE correct? Format specification matches I/O statement? Buffer size matches record size? Files opened before use? EOF handled correctly? I/O errors handled? Textual errors in output?
13 April 2004 SRIMCA
structure considerations
Improper
or inconsistent typing? Erroneous initialization or default values? Incorrect variable names? Inconsistent data types? Underflow, overflow and addressing exceptions?
cases must cover all execution paths Common computational errors to be checked:
incorrect
arithmetic mixed mode operations incorrect initialization precision inaccuracy incorrect symbolic representation of expression
Other
tests needed
incompatible
data types in comparisons incorrect logical operators or precedence comparison problems (e.g., == on floats) loop problems
April 2004 SRIMCA
15
handling tests
Exception-handling
is incorrect? Error description is unintelligible, insufficient or incorrect? Error condition causes system interrupt before error handling completed?
INTEGRATION TESTING
A
systematic approach for constructing program structure while conducting tests to uncover errors associated with interfacing. Tendency for Non-Incremental integration.. Big Bang approach . Chaos !! ( usually ). Incremental integration - program is constructed and tested in small segments.
Top-Down
INTEGRATION TESTING
INTEGRATION TESTING
Top-Down Approach Begin construction and testing with main module.
Stubs
Subordinate
stubs are replaced one at a time by actual modules. Tests are conducted as each module is integrated. On completion of each set of tests, another stub is replaced with the real module. Regression testing may be conducted to ensure that new errors have not been introduced.
19 April 2004 SRIMCA
INTEGRATION TESTING
Top-Down Approach :
Advantages:
Verifies
major control or decision points early in the test process. With the use of depth-first integration testing, a complete function of the software can be demonstrated. -- Confidence builder for developer/customer.
Disadvantages:
Since
stubs replace lower level modules, no significant data can flow upwards to the main module.
SRIMCA
21
April 2004
INTEGRATION TESTING
Bottom Up Approach :
This
approach begins construction and testing with modules at the lowest levels in the program structure.
Low-level
modules are combined into clusters. A driver is written to coordinate test case input and output. The cluster is tested. Drivers are removed and clusters are combined moving upward in the program hierarchy.
22 April 2004 SRIMCA
Bottom Up Approach
INTEGRATION TESTING
Bottom Up Approach
Advantages:
Easier
Disadvantages:
The
program as an entity is does not exist until the last module is added.
down strategy for upper levels and Bottom up strategy for subordinate levels.
24 SRIMCA
April 2004
INTEGRATION TESTING
Regression
Testing
of some subset of tests already conducted to ensure that the new changes do not have unintended side effects. The Regression test suite should contain three different classes of test cases : A representative sample of tests that will exercise all software functions Additional tests that focus on functions that are likely to be affected by the change. Tests that focus on software components that have changed. 25
April 2004 SRIMCA
Re-execution
INTEGRATION TESTING
Integration Test Documentation
1
Scope of testing
2
Test plan
3
Test Procedure n
4
Actual Test Results
5
Ref. & Appendix
Environment Test Unit Test Schedule / Resources case test phases data Overhead and Test software builds environment Order of Integration
April 2004 SRIMCA
26
VALIDATION TESTING
It
provides final assurance that software meets all functional, behavioral, and performance requirements.
-- Exclusive use of Black-box testing techniques. After each validation test case either software conforms to specs or a deviation from specs is detected and a deficiency list needs to be worked.
test -- At developers site by customer. Beta test -- At customers site in a live environment. 27
April 2004 SRIMCA
SYSTEM TESTING
A
series of tests to verify that all system elements have been properly integrated.
Testing:
Forces
Recovery
software to fail in a variety of ways and verifies that recovery is properly performed.
Security
Testing:
Attempts
to verify the softwares protection mechanisms. The software designer tries to make penetration cost more than the value of information obtained by breaking in. 28
SRIMCA
April 2004
SYSTEM TESTING
Stress
Testing:
Executes
the system in a manner that demands resources in abnormal quantity, frequency or volume.
Performance
To
Testing:
test the run time performance of a system within the context of an integrated system.
System Test
Acceptance Test
Integration Environment
Developers
Early Unit Integ User Eval Test
System Integration and Test Group Validation Group Application S/W IPT
Design
Unit Test
Development Environment
Users
is a consequence of successful testing -- when a test case uncovers an error, it is the debugging process that results in the removal of the error. Debugging is an ART. The external manifestation of the error and the cause of the error normally do not share an obvious relationships.
31 April 2004 SRIMCA
Additional tests
Identified causes
Approaches
:- Once an error is uncovered, trace
of debugging tools
COMMENTS
Should
have a vested interest in demonstrating that their software is error-free. Developers (psychologically) feel that testing is destructive.
When
You
are never done with testing, the burden shifts from you to the customer.
34
April 2004
SRIMCA
SUMMARY
Software
Testing accounts for the largest percentage of technical effort in the software process. Objective of Software testing -- To uncover errors, maintain software quality. Steps : Unit, Integration, Validation, System. Debugging is often an art and the most valuable resource is often the counsel of other software engineers.
35 April 2004 SRIMCA
Chapter Outline
Software Quality A Framework for Technical Software Metrics Metrics for the Analysis Model Metrics for the Design Model Metrics for Source Code Metrics for Testing Metrics for Maintenance Summary
January 2004 Chapter 18 -- SRIMCA 2
Technical Metrics
Are NOT absolute (hence they are open to debate) Provide us with a systematic way to assess quality Provide insight into product quality on-the-spot rather than after-the-fact
January 2004
Chapter 18 -- SRIMCA
Software Quality
Software requirements are the foundation from which quality is measured. Specified standards define a set of development criteria that guide the manner in which software is engineered. There is a set of implicit requirements that often goes unmentioned. Software quality is a complex mix of factors that will vary across different applications and the customers who request them.
January 2004
Chapter 18 -- SRIMCA
Product Revision
Product Transition
Product Operation
Correctness Reliability Usability Integrity Efficiency
Fq c i mi
January 2004 Chapter 18 -- SRIMCA 5
HPs FURPS
Usability - aesthetics, consistency, documentation Reliability - frequency and severity of failures Performance - processing speed, response time,
resource consumption, throughput, efficiency
Previous slides described qualitative factors for the measurement of software quality Everyday quality measurements
gymnastics, talent contests etc. side by side comparisons quality judged by an expert in the field
Quantitative metrics dont explicitly measure quality, but some manifestation of quality
January 2004
Chapter 18 -- SRIMCA
Each quality measurement takes a different view of what quality is and what attributes in a system lead to complexity. e.g. attractive car - difficult to derive single value for attractiveness. The goal is to develop measures of different program attributes to use as indicators of quality. Unfortunately, a scientific methodology of realizing this goal has not been achieved.
January 2004 Chapter 18 -- SRIMCA 8
Measurement Principles
Simple and computable Empirically and intuitively persuasive Consistent and objective Consistent in units and dimensions Programming language independent Effective mechanism for quality feedback
January 2004
Chapter 18 -- SRIMCA
10
The Function Point (FP) metric can be used as a means for predicting the size of a system (derived from the analysis model).
number of user inputs number of user outputs number of user inquiries number of files number of external interfaces
number of user inputs number of user outputs number of user inquiries number of files number of external interfaces count - total
3 2 2 1 4
x x x x x
3 4 3 7 5
4 5 4 10 7
6 7 6 15 10
=9 =8 =6 =7 = 20 50
Used to predict the application size based on the analysis model. The software engineer first evaluates a set of primitives unsubdividable at the analysis level. With the evaluation of these primitives, software can be defined as either function-strong or datastrong. Once the Bang metric is computed, past history must be used to predict software size and effort.
January 2004 Chapter 18 -- SRIMCA 13
January 2004
Chapter 18 -- SRIMCA
14
nu = number of unique function requirements ni = number of inputs specified ns = number of states specified
January 2004 Chapter 18 -- SRIMCA 15
Structural Complexity
S(i) = f out(i) fout(i) = fan-out of module i
Data Complexity
D(i) = v(i)/[fout(i) +1] v(i) = # of input and output variables to and from module i
System Complexity
Morphology Metrics
size = n + a n = number of modules a = number of arcs (lines of control) arc-to-node ratio, r = a/n depth = longest path from the root to a leaf width = maximum number of nodes at any level
Morphology Metrics
a b f h size depth
January 2004
c g m
d i n
e j p k q l r
width
Chapter 18 -- SRIMCA
= total number of modules S2 = # modules dependent upon correct data source or produces data used, excl. control S3 = # modules dependent upon prior processing S4 = total number of database items S5 = # unique database items S6 = # of database segments S7 = # modules with single entry & exit
January 2004 Chapter 18 -- SRIMCA 19
= 1 if arch design method used, else 0 D2 = 1 - (S2/S1) -- module independence D3 = 1 - (S3/S1) -- independence of prior processing D4 = 1 - (S5/S4) -- database size D5 = 1 - (S6/S4) -- DB compartmentalization D6 = 1 - (S7/S1) -- Module entrance/exit
January 2004 Chapter 18 -- SRIMCA 20
Complexity Metrics
Cyclomatic complexity Experience shows that if this > 10, it is very difficult to test
Cohesion Metrics
Data slice - data values within the module that affect the module location at which a backward trace began. Data
tokens - Variables defined for a module Glue Tokens - The set of tokens lying on multiple
data slices Superglue
tokens - The set of tokens on all slices Stickiness - of a glue token is proportional to number
of data slices that it binds Strong
Functional Cohesion
SFC(i) = SG(i)/tokens(i)
January 2004
Chapter 18 -- SRIMCA
23
Coupling Metrics
di = number of input data parameters ci = number of input control parameters d0 = number of output data parameters c0 = number of output control parameters gd = number of global variables used as data gc = number of global variables used as control w = number of modules called (fan-out) r = number of modules calling the module under consideration (fan-in) Module Coupling: mc = 1/ (di + 2*ci + d0 + 2*c0 + gd + 2*gc + w + r) mc = 1/(1 + 0 + 1 + 0 + 0 + 0 + 1 + 0) = .33 (Low Coupling) mc = 1/(5 + 2*5 + 5 + 2*5 + 10 + 0 + 3 + 4) = .02 (High Coupling)
Global coupling
Environmental coupling
January 2004
Chapter 18 -- SRIMCA
24
absolute and relative position of each layout entity frequency used cost of transition from one entity to another
LA = 100 x [(cost of LA-optimal layout) / (cost of proposed layout)] Final GUI design should be based on user feedback on GUI prototypes
January 2004 Chapter 18 -- SRIMCA 25
Software Science Primitives n1 = the number of distinct operators n2 = the number of distinct operands N1 = the total number of operator occurrences N2 = the total number of operand occurrences Length: N = n1log2n1 + n2log2n2 Volume: V = Nlog2(n1 + n2)
January 2004 Chapter 18 -- SRIMCA 26
OPERATOR COUNT 1 END OF STATEMENT 7 2 ARRAY SUBSCRIPT 6 3 = 5 4 IF( ) 2 5 DO 2 6 , 2 7 END OF PROGRAM 1 8 .LT. 1 9 .GE. 1 10 GO TO 10 1 n1 = 10 N1 = 28 N2 = 22 n2 = 7
January 2004
Chapter 18 -- SRIMCA
27
Analysis, design, and code metrics guide the design and execution of test cases. Metrics for Testing Completeness
Breadth of Testing - total number of requirements that have been tested Depth of Testing - percentage of independent basis paths covered by testing versus total number of basis paths in the program. Fault profiles used to prioritize and categorize errors uncovered.
been changed
Summary
Software metrics provide a quantitative way to asses the quality of product attributes. A software metric needs to be simple, computable, persuasive, consistent, and objective. The function point and bang metrics provide quantitative means for evaluating the analysis model. Metrics for design consider high-level, component level, and interface design issues.
January 2004
Chapter 18 -- SRIMCA
30
Summary
Interface design metrics provide an indication of layout appropriateness for a GUI. Using the number of operators and operands present in the code provides a variety of metrics to assess program quality. Using the metrics as a comparison with known successful or unsuccessful projects is better than treating them as absolute quantities.
January 2004
Chapter 18 -- SRIMCA
31
R. A. Volz
CONTENTS
What
is object-oriented development ? Object-oriented process model Object-oriented concepts Object modeling technique Unified Modeling Language (UML) Concepts and Principles of Object Modeling Object-oriented vs functional approach
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 2
What is OO Development ?
New
way of thinking about problems using models organized around real world concepts. The fundamental construct is the object
Combines both data structure and operations in a single entity called an object.
Leads
to reuse, faster software development and higher quality programs. Easier to maintain
Structure inherently decoupled Fewer side-effects
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 3
R. A. Volz
Object: Data and operations relevant to some real world or significant program entity encapsulated into a monolithic unit accessible only through a well defined interface. For ex. File in the file system together with operations such as open, close, read, & write, Object Model: Describes the structure of the objects in the system
their identity, relationships to other objects, attributes and operations.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 5
Classification
Object Modeling
& Classes
A class describes a group of objects with similar properties (attributes), common behavior (operations), common relationships to other objects, and common semantics.
R. A. Volz
Object Classes
Thus,
a class is an abstraction that describes relevant properties and hides the rest. Represented diagrammatically as below. Class Name Attributes Operations
R. A. Volz
Object Modeling
R. A. Volz
Object Modeling
Attributes:
An attribute is a data value held by the objects in a class. Name, age, and weight are attributes of Person objects.
R. A. Volz
Object Modeling
Operations
and Methods :
Operations : An operation is a function or transformation that may be applied to or by objects in a class. Each operation has a target object as an implicit argument. The behavior of the operation depends on the class of its target. Methods : A method is the implementation of an operation for a class.
Categories: 1) manipulate data, 2) perform computation, and 3) monitor for occurrence of controlling event.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 10
Object Modeling
An
operation may have arguments in addition to its target object. Such arguments parameterize the operation but do not affect the choice of method.
R. A. Volz
R. A. Volz
R. A. Volz
Isolate those aspects that are important and suppress (or hide) those that are unimportant (e.g., representations). Focus on what object is and does before deciding how it should be implemented. Abstraction allows dealing only with application domain concepts, not making design and implementation decision before problem is understood.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 15
(Information Hiding)
Separates the external aspects of an object, which are accessible to other objects, from the internal implementation details of the object, which are hidden from other objects.
Combining
The OO approach combines the data structure and operations in a single entity.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 16
Interfaces
<<Interface>> Class Name Operations
Does
not have an implementation of its own. Other classes provide implementations of it. Client classes are only interested in behavior.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 17
Inheritance
Sharing
R. A. Volz
R. A. Volz
Right Triangle
Vertices Hypotenuse length Border Color Fill Color
R. A. Volz
R. A. Volz
Operations
Polymorphism
The same operation may behave differently on different classes. E.g., the move operation behaves differently on a Window and ChessPiece. Operations may be overloaded when subclasses defined.
The compiler can distinguish based on the type of the operands in method invocations which operation is actually needed.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 23
Polymorphism
Polygon Paint Car Paint
Triangle Paint
February 14, 1999 R. A. Volz
Square Paint
Chapter 19 -- Assistance -- Lamimi V. Kamat 24
Communication
Message:
R. A. Volz
February 14, 1999
Objects (identity) Classification Inheritance Communication Objects (identity) Classification Inheritance Polymorphism
R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 26
Rumbaugh
modeling technique (OMT) extends from analysis thru design to implementation Analysis model contains objects found in the application domain, including properties of object and their operations. These application domain objects form a framework to the design model.
R. A. Volz
same seamless notation is used from analysis to design to implementation. The system is modeled using three related but different view points.
Object Model : Represents the static, structural, data aspects of the system. Dynamic Model : Represents the temporal, behavioral, control aspects of the system. Functional Model : Represents transformational, functional aspects of the system.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 28
Object Modeling
Links
and Associations
Link: A physical or conceptual connection between instances. E.g., Joe Smith Works-for Simplex company. Mathematically, a tuple, i.e., an ordered list of object instances. A link is an instance of an association. Associations : A group of links with common structure and semantics. E.g., a person Worksfor a company. All the links in an association connect objects from the same classes.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 29
R. A. Volz
Object Modeling
Multiplicity:
Specifies how many instances of one class may relate to a single instance of an associated class
Role
Names: attributes
May be defined for associations, e.g., if the association is uses, the link attribute might be one of permission.
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 31
R. A. Volz
Ternary Association
R. A. Volz
Link Associations
R. A. Volz
Aggregation
A
R. A. Volz
OO Software Process
Framework
Identify major classes and connections. Do enough design to ensure they are implementable Extract reusable components and build prototype. Test to uncover errors and get customer feedback. Iterate on design and refine it. Engineer special objects (not in library). Assemble a new prototype. Test and obtain customer feedback. Iterate until satisfactory product obtained.
R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 36
OO Metrics
Because
of reuse, LOC not so useful # of Scenario scripts, each a triplet of the form [initiator, action, participant], where
Initiator = object initiating a request action = result of request (method invocation) participant = server object satisfying request
#
of key [highly independent] classes # of support classes (and ave. per key class) # of subsystems
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 37
scenario scripts and estimate count Determine the number of key classes Categorize key classes Interface type Multiplier No GUI 2.0 Text-based user int. 2.25 GUI 2.5 Complex GUI 3.0
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 38
# of support classes by multiplying # key classes in each category by multiplier Estimate # of person-days per class, e.g., 15-20 Estimate the number of major iterations There should be a contract deliverable for each major iteration
February 14, 1999 R. A. Volz Chapter 19 -- Assistance -- Lamimi V. Kamat 39
OO Progress Tracking
This
needs to be done for each iteration (see text for list of specifics in each category)
OO analysis completed OO design completed OO programming completed OO testing completed
R. A. Volz
to maintain Combines data structure and behavior in a single entity Emphasizes object structure Reuse more readily accomplished
Harder
to maintain May separate data and behavior Emphasizes procedural structure Reuse limited, hence possible delay in software construction
R. A. Volz
cohesion and weak coupling Encapsulation, Inheritance and Polymorphism are strong features of OO software development
Harder
to achieve weak Coupling and strong cohesion Some languages support encapsulation and polymorphism, but rarely inheritance
R. A. Volz
Technical activity performed as part of OO Software Engineering. Involves the answering the following questions when a new Product is developed:
How is the proposed system amenable to OOSE? What are the relevant objects? How do the objects behave in context of the system? How do we specify or model a problem in order to implement an effective design?
Senthil VeluswamyFebruary 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy
Information domain Describe model function Represent model behavior Partition models to expose greater detail
Thus, Early models represent essence of problem while later models provide implementation details.
basic user requirements; problem statement classes, define attributes, methods class hierarchy Object - Object relationships
Identify Specify
Represent Model
Object behavior
Booch Method - Micro & Macro Development. Identify classes and objects:
Propose candidate objects, Conduct behavior analysis, Identify relevant scenarios, Define attributes and operations for each class
OOA Approaches
Identify
Select scenarios and analyze, Assign responsibility Partition responsibilities to balance behavior, Enumerate object roles and responsibilities, Define operations to achieve responsibilities, Look for collaborations among objects.
Chapter 20 -- Assistance -- Senthil K Veluswamy
series of refinements:
Produce appropriate diagrams for representation, Define class hierarchies, Perform clustering based on class commonality
Implement
OOA Approaches
Rumbaugh Method: Object Modeling Technique (OMT) for Analysis, System design and Object-level design. Analysis : creates 3 models
Object model - Representation of classes, objects, hierarchies, and relationships Functional model - A high-level DFD-like information flow representation. Dynamic model - Representation of Object and system behavior
Senthil VeluswamyFebruary 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy
Develop
dynamic model
Prepare scenarios, Define events and trace them, Draw event flow, State diagrams, Review behavior.
Chapter 20 -- Assistance -- Senthil K Veluswamy
Identify inputs and outputs Use data flow diagrams to represent flow, Develop Process Specifications for each function, Specify constraints and optimization criteria.
Domain Analysis
Domain
Analysis
Emphasize creating & using library of reusable classes. Identification, analysis and specification of common requirements from application domain, for reuse on multiple projects within that domain.
Levels
Enterprise - Entire business Business level - Workings of a particular activity Application level - Specific customer requirements.
Senthil VeluswamyFebruary 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy
series of activities that begin with identification of domain to be investigated and end with a specification of the objects and classes that characterize the domain(Domain Analysis model) Domains can range from avionics to banking, to multimedia video games to medical applications.
create software within the domain with a high percentage of reusable components.
Define the domain, then extract objects. Categorize the items extracted in a hierarchy. Collect sample of applications in the domain. Analyze each application in the sample. Develop an analysis model for the objects.
components - Structural in nature, indicate characteristics that hold throughout the operational lifetime of the application.
Static view of Semantic classes Static view of attributes Static view of relationships Static view of behaviors
Dynamic
components: Focus on control and are sensitive to timing and event processing.
Dynamic view of Communication, Dynamic view of Control and Time.
OOA Process
Define
Identified from meeting with the customer. Identify the different roles that interact with the system or product. These are called actors.
Anything that communicates with system and is external to it.
Actors are different from user: user may play part of several actors. e.g.:
programmer, tester, monitor or troubleshooter .
Define Use Cases: unambiguous narrative of interaction between actor and system.
Senthil VeluswamyFebruary 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy
with identifying actors and determining how they interact with the system.
What are the main tasks performed by actors? What system info will actor use or produce? Will actor inform system about external changes? What info will actor delete from system? Is actor informed about unexpected changes?
If not ready, physically close windows & doors so the ready indicator is present.
Owner
Password compared with valid password. If not correct, beep and reset. If correct, await further commands.
Owner
OOA Process
Class-Responsibility-Collaborator
Modeling:
The attributes and operations that are relevant for the class - anything a class knows or does.
Collaborators:
Those classes that are required to provide a class with information needed to complete a responsibility.
Senthil VeluswamyFebruary 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy
CRC
Collaboration Example
Responsibility:
procedure)
Safe home Control Panel must determine if any sensors are open - responsibility determinesensor-status.
Collaborator:
Sensor info is obtained from Sensor Object. For determine-sensor-status to be fulfilled, Control Panel has to work in collaboration with Sensor.
February 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy 26
Associations
Collaborators
suggest associations
Sensor
Determine sensor status
Control Panel
suggest operations
Sensor
Determine sensor status
Control Panel
GetState ()
OOA Process
Guidelines
Information and related behavior should reside in same class Information about one thing should be localized in a single class.
February 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy 29
Look at the states of each object Look at states of system as observed from outside
Identify
an event trace. Build a state-transition diagram. Review the object-behavior model to verify accuracy and consistency.
February 21, 1999 -- R. A. Volz Chapter 20 -- Assistance -- Senthil K Veluswamy 31
If not ready, physically close windows & doors so the ready indicator is present.
Owner
Password compared with valid password. If not correct, beep and reset. If correct, await further commands.
Owner
Event Trace
Summary
OOA
begins with use cases. Create object, functional and dynamic models Object Analysis
model as objects, attributes and operations. Develop relationships among objects.
Common
characteristics
Representation of classes and class hierarchies, Creation of object-relationship models, and Derivation of object-behavior models.
Object-Oriented Design
Outline
From Analysis to Design Design Issues System Design Object Design Design patterns & Conclusion
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 2
Object-Oriented Design
Transforms
OOA model into blueprint for software construction Builds upon four essential design concepts
Abstraction Information hiding Functional independence Modularity
Outline
From Analysis to Design Design Issues System Design Object Design Design patterns & Conclusion
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 5
of module hierarchies Specification of data definitions Specification of procedural logic Indication of end-to-end processing flow Representation of object states and transitions Definition of classes and hierarchies Assignment of operations to classes Detailed definition of operations Specification of message connections Identification of exclusive services
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 6
OOD Methodologies
The
Booch Method The Coad and Yourdon Method The Jacobson Method The Rumbaugh Method The Wirfs-Brock Method
Booch Method
Architectural
planning
Cluster similar objects in separate architectural partitions. Layer objects by level of abstraction. Identify relevant scenarios. Create a design prototype. Validate the design prototype by applying it to usage scenarios.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 9
Booch Method
Tactical
design
Define domain-independent policies. Define domain specific policies. Develop a scenario that describes the semantics of each policy. Create a prototype of each policy. Instrument and refine the prototype. Review each policy.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 10
Booch Method
Release
planning
Organize scenarios developed during OOA by priority. Allocate corresponding architectural releases to the scenarios. Design and construct each release incrementally. Adjust goals and schedule of incremental release as required.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 11
system design Conduct object design Implement Control mechanisms Adjust class structure to strengthen inheritance Design messaging to implement the object relationships Package classes and associations into modules
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 12
Outline
From Analysis to Design Design Issues System Design Object Design Design patterns & Conclusion
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 13
14
System Design
Partition
A subsystem is a package (collection) of classes and associations, events and constraints that are interrelated and have a small interface. Usually identified by the services it provides.
Identify
concurrencies Allocate subsystems to processors and tasks Choose a basic strategy for data management
15
System Design
Identify
global resources and access control mechanisms Design control mechanism for system Determine how to handle boundary conditions. Review & modify if necessary
16
System Design
Partition the Analysis Model
Small
number of subsystems,
interface, services Intra- (use) and inter- (minimize) communication Achieve high Cohesion within a subsystem Communication between subsystems: client/ server (one way) or peer-to-peer (two way)
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 17
Communication Models
18
System Design
Going towards High Cohesion
Cohesion
Coincidental Logical Temporal Communication Sequential Functional Data
19
System Design
Concurrency and subsystem Allocation
Identify
Concurrency Example
DB access DB access Database
21
Concurrency
Ada
-- Use tasks
task type DB_access is end; type dba is access DB_access; a, b: dba; a := new DB_access; b:= new DB_access;
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 22
Concurrency
Java
-- Use threads
class dbAccess extends thread{ public void run () { } new dbAccess.start(); new dbAccess.start(); }
23
Two objects should not be able to write to the same shared object at the same time.
Communication
Allow messages to be sent between objects. When is an object ready to receive a message?
Synchronization
Ensure that two or more objects are at known points at the same time.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 24
Data Management
Generally
refers to shared objects Concurrency controls essential Often refers to data to have a permanence beyond scope of program Issues
Infrastructure for access and storage Management of data
Often
System design
Resource Management
Resources:
object:
Keeper of the resource Controlling access to the resource Moderating conflicts for requests
Language
System design
Human-Computer Interface
Inputs:
Identify Reuse
command hierarchy (menu bars, popups, windows, interactive controls, ...) existing support tools whenever possible
So all that is needed are objects that have appropriate characteristics of problem domain
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 27
Intersubsystem Communication
Create
28
29
Outline
From Analysis to Design Design Issues System Design Object Design Design patterns & Conclusion
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 30
Object Design
31
name (or name of class of objects) Description Services provided or functions How created How invoked Shared resources Communication
With whom? Interfaces
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 32
Object Design
Object Internals
Protocol
description
List each message type the object can receive, e.g., MESS(motion sensor): read RET id, status
Implementation
description
Spec. of objects name and reference to class Spec. of private data encapsulated Procedural description of each operation Specification of control structures
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 33
Object Design
Steps done in object design
Detail
object attributes and operations object-relationship model operations and transitions using
Review
Describe
PDLs.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 36
Outline
From Analysis to Design Design Issues System Design Object Design Design patterns & Conclusion
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 37
Design Patterns
An
Naming
What next ?
From
Design to implementation Success of complex projects relies more on the design architecture rather than the implementation. So SW Eng. stresses OOA and OOD If you have a good and complete design, implementation should be straightforward Nevertheless, language choice does have an influence.
February 1, 1998 R. A. Volz Chapter 21 -- Assistance -- Magy Seif El-Nasr 39
Object-Oriented Testing
Chapter 22
the view of testing Change strategy for unit and integration testing Design test cases to account for the unique characteristics of OO software
Chapter 22
Especially useful since same semantic constructs (classes, etc.) appear in analysis, design and impl.
Can
help avoid
Subclasses added to accommodate unnecessary attributes. Incorrect or extraneous class relationships Improper behavior to accommodate extraneous attributes
February 8, 1998 -- R. A. Volz Chapter 22 3
Chapter 22
Judge by conformance with real world domain Check CRC and object-relationship models for inclusion of all collaborations Ensure that delegated responsibilities are part of collaborators definition Ensure that each collaborator is receiving requests from proper source -- inverted conn.
February 8, 1998 -- R. A. Volz Chapter 22 5
Use inverted connection to determine whether other classes or responsibilities are needed. Determine whether widely requested responsibilities might be combined, e.g., read credit card and get authorization. Iterate on the above.
Chapter 22
OO - Testing Strategies
Unit
Class is the unit of testing But, one must test through the class hierarchy
Integration
Thread-based Use-based (dependent & independent classes) Cluster testing -- find errors in collaborations
Validation
testing in an OO context
test case design is driven by an input-process-output view or by algorithmic detail of individual modules. OO testing focuses on designing appropriate sequences of operations to exercise the states of a class.
Within object, similar to white box testing.
Chapter 22
based testing
Use plausible faults to guide test design Look for range boundaries, e.g., look for mixups of <, <=, etc. Look for common operator errors, e.g., mixing up <, > or OR, AND, XOR, +/-, etc. Use hazard analysis fault trees.
Scenario
based testing.
Chapter 22 10
OO class testing
Randomly generate test sequences of method invocations, e.g., if a banking object has methods, open, deposit, withdraw, balance, summarize, and close, generate random seq. This should test inappropriate and well as appropriate sequences.
Chapter 22
11
each client class, generate random test sequences. For each message, determine collaborators. For each server operation, determine messages it sends. For each message, determine the next level of operators. Compose to form overall test sequence.
February 8, 1998 -- R. A. Volz Chapter 22 12
Chapter 22
13
Chapter 22
14