180
CMRIT Redefining Quality Education 1. INTRODUCTION TO SOFTWARE ENGINEERING What is Software? Computer Software is the product that software professional design and built. It includes • Programs • Content • Documents What is software engineering? Your thoughts here Related to the process: a systematic procedure used for the analysis, design, implementation, test and maintenance of software. Related to the product: the software should be efficient, reliable, usable, modifiable, portable, testable, reusable, maintainable, interoperable, and correct. The definition in IEEE Standard: The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, that is, the application of engineering to software. The study of approaches as in 1993: The Joint IEEE Computer Society and ACM Steering Committee for the establishment of software engineering as a profession. What is important and what are the steps? Software affects nearly every aspect of our lives. (data). You build software like you build any successful product, by applying a process that leads to a high-quality result. You apply a software engineering approach. I – M.Tech. – I – Semester (CSE) Software Design & Engineering 1

SDE Complete Notes

Embed Size (px)

DESCRIPTION

NOTES ON SOFTWARE DEVELOPMENT

Citation preview

Page 1: SDE Complete Notes

CMRIT Redefining Quality Education

1. INTRODUCTION TO SOFTWARE ENGINEERING

What is Software?

Computer Software is the product that software professional design and built. It includes • Programs • Content • Documents

What is software engineering?

Your thoughts here

• Related to the process: a systematic procedure used for the analysis, design, implementation, test and maintenance of software.

• Related to the product: the software should be efficient, reliable, usable, modifiable, portable, testable, reusable, maintainable, interoperable, and correct.

The definition in IEEE Standard:

• The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, that is, the application of engineering to software.

• The study of approaches as in 1993: The Joint IEEE Computer Society and ACM Steering Committee for the establishment of software engineering as a profession.

What is important and what are the steps?

Software affects nearly every aspect of our lives. (data). You build software like you build any successful product, by

applying a process that leads to a high-quality result. You apply a software engineering approach.

What is the work Product? From the point of view of a software engineer, the

work product is the programs, documents, and content. From the user’s viewpoint, the work product is the

resultant information that somehow makes the user’s world better.

The Product

• Is the engine that drives business decision making.

• Software serves as the basis for modern scientific investigation and engineering problem solving.

• It is embedded in systems of all kinds: transportation, medical, telecommunications, military, industrial processes, entertainment, office products…

I – M.Tech. – I – Semester (CSE) Software Design & Engineering 1

Page 2: SDE Complete Notes

CMRIT Redefining Quality Education

1.1 THE EVOLVING ROLE OF SOFTWARE Software’s Dual Role Software is a product

• Delivers computing potential• Produces, manages, acquires, modifies, displays, or transmits information.

Software is a vehicle for delivering a product• Supports or directly provides system functionality• Controls other programs (e.g., an operating system)• Effects communications (e.g., networking software)• Helps build other software (e.g., software tools)

The Law of Continuing Change (1974): E-type systems must be continually adapted else they become progressively less satisfactory.

The Law of Increasing Complexity (1974): As an E-type system evolves its complexity increases unless work is done to maintain or reduce it.

The Law of Self Regulation (1974): The E-type system evolution process is self-regulating with distribution of product and process measures close to normal.

The Law of Conservation of Organizational Stability (1980): The average effective global activity rate in an evolving E-type system is invariant over product lifetime.

The Law of Conservation of Familiarity (1980): As an E-type system evolves all associated with it, developers, sales personnel, users, for example, must maintain mastery of its content and behavior to achieve satisfactory evolution.

The Law of Continuing Growth (1980): The functional content of E-type systems must be continually increased to maintain user satisfaction over their lifetime.

The Law of Declining Quality (1996): The quality of E-type systems will appear to be declining unless they are rigorously maintained and adapted to operational environment changes.

The Feedback System Law (1996): E-type evolution processes constitute multi-level, multi-loop, multi-agent feedback systems and must be treated as such to achieve significant improvement over any reasonable base.

1.2 SOFTWARE CHARACTERISTICS Software is developed or engineered; it is not manufactured in the classical

sense. Software does not wear out.

idealized curve

change

actual curve

Failurerate

Time

increased failurerate due to side effects

Failure curve for software (idealized and actual curves)

I – M.Tech. – I – Semester (CSE) Software Design & Engineering 2

Page 3: SDE Complete Notes

CMRIT Redefining Quality Education

Most software is custom-built, rather than being assembled from existing components.

Software Components

In the hardware world, component reuse is a natural part of the engineering process.

In the software world, it is something that has yet to be achieved on a broad scale.

Reusability is an important characteristic of a high-quality software component.

A software component should be designed and implemented so that it can be reused in many different programs.

In the 1960s, we built scientific subroutine libraries that wear reusable in a broad array of engineering and scientific application.

These subroutine libraries reused well defined algorithms in an effective manner, but had a limited domain of application.

Today, we have extended our view of reuse to encompass not only algorithms, but also data structures.

1.3 THE CHANGING NATURE OF SOFTWARE Software Applications System software: system software is collection of programs written to service other

programs. E.g. Compilers, editors, file management utilities, operating systems, drivers, networking etc.

Application software: Application software consists of standalone programs that solve a specific business need. E.g. Point of sole transaction processing, real time manufacturing control etc.

Engineering/scientific software: Computer-aided design, system simulation, and other interactive applications have begun to take on real-time and even system software characteristics.

Embedded software: Embedded software resides within a product or system and is used to implement and control features and functions for the end-user and for the system itself. Embedded software can perform limited and esoteric functions. e.g. digital functions in an automobile such as fuel control, dashboard displays, braking systems, etc.

Product-line software: Designed to provide a specific capability for use by many different customers product-line software can focus on a limited and esoteric marketplace or address mass consumer markets. e.g. inventory control, word processing, spreadsheets, computer graphics, multimedia etc.

WebApps (Web applications): “WebApps,” span a wide array of applications. In their simplest form, webApps can be little more than a set of linked hypertext files that present information using text and limited graphics.

AI software: Al software makes use of non numerical algorithms to solve complex problems that are not amenable to computation or straight forward analysis. e.g. robotics.

Software—New Categories Ubiquitous computing : wireless networks

I – M.Tech. – I – Semester (CSE) Software Design & Engineering 3

Page 4: SDE Complete Notes

CMRIT Redefining Quality Education

Net sourcing : the Web as a computing engine Open source : ”free” source code open to the computing community (a blessing, but also

a potential curse!) Also …

I – M.Tech. – I – Semester (CSE) Software Design & Engineering 4

Page 5: SDE Complete Notes

CMRIT Redefining Quality Education

• Data mining• Grid computing• Cognitive machines• Software for nanotechnologies

I – M.Tech. – I – Semester (CSE) Software Design & Engineering 5

Page 6: SDE Complete Notes

CMRIT Redefining Quality Education

1.4 SOFTWARE MYTHS

Unlike ancient myths, software myths propagate misinformation and confusion that have caused serious problems for managers, technical people and customers.

Management Myths

Myth: We already have a book that’s full of standards and procedures for building software. Won’t that provide my people with everything they need to know?

Reality: The book of standards may very well exist, but is it used? Is it complete? In many cases, the answer is no.

Myth: If we get behind schedule, we can add more programmers and catch up.

Reality: Software development is not a mechanistic process like manufacturing.

Myth: If we decide to outsource the software project to a third party, I can just relax and let that firm build it.

Reality: If an organization does not understand how to manage and control software projects internally, it will invariably struggle when it out sources software projects.

Customer Myths

Myth: Project requirements continually change, but change can be easily accommodated because software is flexible.

Reality: It is true that software requirements do change, but the impact of change varies with the time at which it is introduced.

Myth: A general statement of objectives is sufficient to begin writing programs we can fill in the details later.

Reality: Although a comprehensive and stable statement of requirements is not always possible, an ambiguous statement of objectives is a recipe for disaster.

Practitioner’s Myths

Myth: Once we write the program and get it to work our job is done.

Reality: “The sooner you begin writing code, the longer it’ll take you to get done.” Industry data indicate that between 60 and 80 percent of all effort expended on software will be expended after it is delivered to the customer for the first time.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

6

Page 7: SDE Complete Notes

CMRIT Redefining Quality Education

Myth: Until I get the program running, I have no way of assessing its quality.

Reality: One of the most effective software quality assurance mechanisms can be applied from the inception of a project-the formal technical review.

Myth: The only deliverable work product for a successful project is the working program.

Reality: A working program is only one part of a software configuration that includes many elements.

Myth: Software engineering will make us creates voluminous and unnecessary documentation and will invariably slow us down.

Reality: Software engineering is not about creating documents. It is about creating quality. Better quality leads to reduced rework.

________

2. A GENERIC VIEW OF PROCESS

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

7

Page 8: SDE Complete Notes

CMRIT Redefining Quality Education

Chapter Overview

What is it? A software process-a series of predictable steps that leads to a timely, high-quality product.

Who does it? Managers, software engineers, and customers.

Why is it important? Provides stability, control, and organization to an otherwise chaotic activity.

What are the Steps? A handful of activities are common to all software process, details vary.

What is the work product? Programs, documents, and data.

Correct process? Assessment, quality deliverable.

2.1 SOFTWARE ENGINEERING - A LAYERED TECHNOLOGY

Focus on quality: must rest on an organizational commitment to quality.

Process model: foundation for SE is the process layers, a frame work, models documents, data, reports etc.

Methods: how to’s, communication, requirement analysis design modeling program connection, testing and support.

Tools: provide automated or semi automated support for the process and methods.

2.2 A PROCESS FRAMEWORK

Process framework Framework activities

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

8

Page 9: SDE Complete Notes

CMRIT Redefining Quality Education

• Work tasks• Work products• Milestones & deliverables• QA checkpoints• Umbrella Activities

Framework Activities Communication: This framework activity involves heavy communication and

collaboration with the customer and encompasses requirements gathering and other related activities.

Planning: It describes the technical tasks to be conducted, the risks that are likely, the resources that will be required, the work products to be produced, and a work schedule.

Modeling: This activity encompasses • Analysis of requirements• Design

Construction: This activity combines • Code generation• Testing

Deployment: The software is delivered to the customer who evaluates the delivered product and provides feedback based on the evaluation.

Umbrella Activities Software project tracking and control: allows the software team to assess progress

against the project plan and take necessary action to maintain schedule. Formal technical reviews: Assesses software reengineering work products in an effort to

uncover and remove errors before they are propagated to the next action or activity. Software quality assurance: Defines and conducts the activities required to ensure

software quality. Software configuration management: manages the effects of change throughout the

software process. Work product preparation and production: encompasses the activities required to create

work products such as models, documents, logs, forms, and lists. Reusability management: defines criteria for work product reuse and establishes

mechanisms to achieve reusable components. Measurement: defines and collects process, project, and product measures that assist the

team in delivering software that meets customers’ needs; can be used in conjunction with all other framework and umbrella activities.

Risk management: assesses risks that may affect the outcome of the project or the quality of the product.

The Process Model: Adaptability

the framework activities will always be applied on every project ... BUT

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

9

Page 10: SDE Complete Notes

CMRIT Redefining Quality Education

the tasks (and degree of rigor) for each activity will vary based on:• the type of project • characteristics of the project• common sense judgment; concurrence of the project team

2.3 THE CAPABILITY MATURITY MODEL INTEGRATION (CMMI)

The CMMI defines each process area in terms of “specific goals” and the “specific practices” required to achieve these goals.

• Specific goals establish the characteristics that must exist if the activities implied by a process area are to be effective.

• Specific practices refine a goal into a set of process-related activities.

The CMMI represents a process meta-model in tow different ways: (1) as continuous model and (2) as a staged model.

Capability levels:

• Level 0: Incomplete. The process area is either not performed or does not achieve all goals and objectives defined by the CMMI for level 1 capacity.

• Level 1: Performed. All of the specific goals of the process area have been satisfied. Work tasks required to produce defined work products are being conducted.

• Level 2: Managed. All level 1 criteria have been satisfied. In addition, all work associated with the process area conforms to an organizationally defined policy; all people doing the work have access to adequate resources to get the job done; stakeholders re actively involved in the process area as require; all work tasks and work products are “monitored, controlled, and reviewed; and are evaluated for adherence to the process description”

• Level 3: Defined. All level 2 criteria have been achieved. In addition, the process is “tailored from the organization’s set of standard processes according to the organization’s tailoring guidelines, and contributes work products, measures, and other process-improvement information to the organizational process assets”

• Level 4: Quantitatively managed. All level 3 criteria have been achieved. In addition, the process area is controlled and improved using measurement and quantitative assessment. “Quantitative objectives for quality and process performance are established and used as criteria in managing the process”

• Level 5: Optimized. All capability level 4 criteria have been achieved. In addition, the process area is adapted and optimized using quantitative means to meet changing customer needs and to continually improve the efficacy of the process area under consideration”.

2.4 PROCESS PATTERNS

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

10

Page 11: SDE Complete Notes

CMRIT Redefining Quality Education

Process patterns define a set of activities, actions, work tasks, work products and/or related behaviors.

A template is used to define a pattern.

Typical examples:• Customer communication (a process activity)• Analysis (an action)• Requirements gathering (a process task)• Reviewing a work product (a process task)• Design model (a work product)

2.5 PROCESS ASSESSMENT

The process should be assessed to ensure that it meets a set of basic process criteria that have been shown to be essential for a successful software engineering.

Software Process

Software Process Assessment

is examined by identifies capabilitiesand risk of

identifiesmodifications to

Software Process Improvement

Capability Determinationleads to leads to

motivates

Many different assessment options are available:

• SCAMPI: provides a five-step process assessment model that incorporates initiating, diagnosing, establishing, acting, and learning.

• CBA IPI: provides diagnostic technique for assessing the relative maturity of a software organization.

• SPICE: standard defines a set of requirements for software process assessment.

• ISO 9001:2000: for software is a generic standard that applies to any organization that want improve the overall quality of the product systems, or services that it provides.

______

3. PROCESS MODELS

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

11

Page 12: SDE Complete Notes

CMRIT Redefining Quality Education

Prescriptive Models Prescriptive process models advocate an orderly approach to software engineering.

That leads to a few questions …

• If prescriptive process models strive for structure and order, are they inappropriate for a software world that thrives on change?

• Yet, if we reject traditional process models (and the order they imply) and replace them with something less structured, do we make it impossible to achieve coordination and coherence in software work?

3.1 The Waterfall Model

The Waterfall model sometimes called the classic life cycle, suggests a systematic, sequential approach to software development.

It is a oldest paradigm for software engineering.

Most widely used though no longer state-of-art.

Each step results in documentation.

May be suited to for well-understood developments using familiar technology.

Not suited to new, different systems because of specification uncertainty.

Difficulty in accommodating change after the process has started.

Can accommodate iteration but indirectly.

Working version not available till late in process.

Often get blocking states.I – M.Tech. – I – Semester (CSE) Software Design & Engineering

12

Page 13: SDE Complete Notes

CMRIT Redefining Quality Education

3.2 THE INCREMENTAL PROCESS MODELS There are many situations in which initial software requirements are

reasonably well defined, but the overall scope of the development effort precludes a purely linear process.

In addition, there may be a compelling need to provide a limited set of software functionality to users quickly and then refine and expand on that functionality in later software releases.

In such cases, a process model that is designed to produce the software in increments is chosen.

The Incremental Model

Applies an iterative philosophy to the waterfall model.

Divide functionality of system into increments and use a liner sequence of development on each increment.

First increment delivered is usually the core product, i.e. only basic functionality.

Reviews of each increment impact on design of later increments.

Manages risk well.

Extreme Programming (XP), and other Agile Methods, are incremental, but they do not implement the waterfall model steps in the standard order.

The Rapid Application Development (RAD) Model

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

13

Page 14: SDE Complete Notes

CMRIT Redefining Quality Education

Similar to waterfall but uses a very short development cycle (60to90 days to completion).

Uses component-based construction and emphasizes reuse and code generation.

Use multiple teams on scaleable projects.

Requires heavy resource.

Requires developers and customers who are heavily committed.

Performance can be a problem.

Difficult to use with new technology

3.3 EVOLUTIONARY MODELS

Evolutionary models are iterative. They are characterized in a manner that enables software engineers to develop increasingly more complete versions of the software.

Prototyping

Ideally mock-up serves as mechanism for identifying requirements.

Users like the method, get a feeling for the actual system.

Less ideally may be the basis for completed.

• Prototypes often ignore quality/performance/maintenance issues.I – M.Tech. – I – Semester (CSE) Software Design & Engineering

14

Page 15: SDE Complete Notes

CMRIT Redefining Quality Education

• May create pressure from users on deliver earlier.

• May use a less-than-ideal platform to deliver e.g Visual Basic – excellent for prototyping, may not be as effective in actual operation.

Specifying requirements is often very difficult.

Users don’t know exactly what they want until they see it.

Prototyping involves building a mock-up of the system and using to obtain for user feedback.

Closely related to what are now called “Agile Methods”

Communication

Quick plan

Construction of prototype

Modeling Quick design

Delivery & Feedback

Deployment

The Spiral Model

Development cycles through multiple(3-6) task regions (6stage version).

• Customer communication• Planning• Risk analysis• Engineering• Construction and release• Customer evaluation

Incremental releases

• Early releases may be paper or prototypes.

• Later releases become more complicated

Models software until it is no longer used

Not a silver bullet, but considered to be one of the best approaches.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

15

Page 16: SDE Complete Notes

CMRIT Redefining Quality Education

Is a realistic approach to the problems of large scales software development?

Can use prototyping during any phase in the evolution of product?

Requires excellent management and risk assessment skills

communication

planning

modeling

constructiondeployment delivery feedback

start

analysis design

code test

estimation scheduling risk analysis

Concurrent Development Model

The concurrent development model, sometimes called concurrent engineering, can be represented schematically as a series of framework activities, software engineering actions and tasks, and their associated states.

The concurrent process model defines a series of events that will trigger transitions from state to state for each of the software engineering activities, action, or tasks.

The concurrent process model is applicable to all types of software development and provides an accurate picture of the current state of a project.

Rather than confining software engineering activities, actions, and tasks to a sequence of events, it defines a network of activities.

Each activity, action, or task on the network exists simultaneously with other activities, actions, or tasks.

Events generated at one point in the process network trigger transitions among the states.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

16

Page 17: SDE Complete Notes

CMRIT Redefining Quality Education

Under review

Baselined

Done

Underrevision

Awaitingchanges

Underdevelopment

none

Modeling activity

represents the stateof a software engineeringactivity or task

3.4 SPECIALIZED PROCESS MODELS

Component based development—the process to apply when reuse is a development objective.

Formal methods—emphasizes the mathematical specification of requirements.

AOSD—provides a process and methodological approach for defining, specifying, designing, and constructing aspects

3.5 THE UNIFIED PROCESS (UP)

Unified Process

a “use-case driven, architecture-centric, iterative and incremental” software process closely aligned with the Unified Modeling Language (UML)

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

17

Page 18: SDE Complete Notes

CMRIT Redefining Quality Education

Unified Process Phases

The inception phases of the up encompass both customer communication and planning activities and emphasize the development and refinement of use-cases as a primary model.

An elaboration phase that encompasses the customer’s communication and modeling activities focusing on the creation of analysis and design models with an emphasis on class definitions and architectural representations.

A construction phase that refines and translates the design model into implemented software components.

A transition phase that transfers the software from the developer to the end-user for beta testing and acceptance.

A production phase in which on-going monitoring and support are conducted.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

18

Page 19: SDE Complete Notes

CMRIT Redefining Quality Education

Inception Elaboration Construction Transition Production

UP Phases

Workflows

Requirements

Analysis

Design

Implementation

Test

Iterations #1 #2 #n-1 #n

Support

UP Work Products

The following figure illustrates the key work products produced as consequences of the four technical up phases.

Inception phase

Elaboration phase

Construction phase

Transition phase

Vision document Init ial use-case model Init ial project glossaryInit ial business case Init ial risk assessment. Project plan, phases and iterations. Business model, if necessary. One or more prototypes Incept io n

Use-case modelSupplementary requirements including non-functional Analysis model Software architecture Description. Executable architectural prototype. Preliminary design model Revised risk listProject plan including iteration plan adapted workflows milestones technical work products Preliminary user manual

Design modelSoftware components Integrated software increment Test plan and procedure Test cases Support documentation user manuals installat ion manuals description of current increment

Delivered software increment Beta test reports General user feedback

_________

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

19

Page 20: SDE Complete Notes

CMRIT Redefining Quality Education

4. SOFTWARE REQUIREMENTS

Contents: Functional and non-functional requirements User requirements System requirements Interface specification The Software Requirements Document

Requirements engineering:

The process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed

The requirements themselves are the descriptions of the system services and constraints that are generated during the requirements engineering process

What is a requirement?

It may range from a high-level abstract statement of a service or of a system constraint to a detailed mathematical functional specification

This is inevitable as requirements may serve a dual function

• May be the basis for a bid for a contract - therefore must be open to interpretation

• May be the basis for the contract itself - therefore must be defined in detail• Both these statements may be called requirements

Requirements abstraction (Davis, 1993)

“If a company wishes to let a contract for a large software development project, it must define its needs in a sufficiently abstract way that a solution is not pre-defined. The requirements must be written so that several contractors can bid for the contract, offering, perhaps, different ways of meeting the client organisation’s needs. Once a contract has been awarded, the contractor must write a system definition for the client in more detail so that the client understands and can validate what the software will do. Both of these documents may be called the requirements document for the system.”

Types of requirement

User requirements• Statements in natural language plus diagrams of the services the system

provides and its operational constraints. Written for customers

System requirements• A structured document setting out detailed - descriptions of the system

services. Written as a contract between client and contractor Software specification

• A detailed software description which can serve as a basis for a design or implementation. Written for developers.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

20

Page 21: SDE Complete Notes

CMRIT Redefining Quality Education

Definitions and specifications

1. The software must provide a means of representing and1. accessing external files created by other tools.

1.1 The user should be provided with facilities to define the type of1.2 external files.1.2 Each external file type may have an associated tool which may be1.2 applied to the file.1.3 Each external file type may be represented as a specific icon on1.2 the user’s display.1.4 Facilities should be provided for the icon representing an1.2 external file type to be defined by the user.1.5 When a user selects an icon representing an external file, the1.2 effect of that selection is to apply the tool associated with the type of1.2 the external file to the file represented by the selected icon.

Requirements definition

Requirements specification

Requirements readers:Client managersSystem end-usersClient engineersContractor managersSystem architects

System end-usersClient engineersSystem architectsSoftware developers

Client engineers (perhaps)System architectsSoftware developers

User requirements

System requirements

Software designspecification

Another classification of requirements

Functional requirements Non-functional requirements Domain requirements

4.1 FUNCTIONAL REQUIREMENTS Describe functionality or system services, how the system should react to particular

inputs and how the system should behave in particular situations.

Depend on the type of software, expected users and the type of system where the software is used

Functional user requirements may be high-level statements of what the system should do but functional system requirements should describe the system services in detail.

Examples:• The user shall be able to search either all of the initial set of databases or select

a subset from it.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

21

Page 22: SDE Complete Notes

CMRIT Redefining Quality Education

• The system shall provide appropriate viewers for the user to read documents in the document store.

• Every order shall be allocated a unique identifier (ORDER_ID) which the user shall be able to copy to the account’s permanent storage area.

Problems arise when requirements are not precisely stated. Ambiguous requirements may be interpreted in different ways by developers and users. Consider the term ‘appropriate viewers’ in the previous example.

User intention - special purpose viewer for each different document type Developer interpretation - Provide a text viewer that shows the contents

of the document

Requirements should be complete and consistent Complete

They should include descriptions of all facilities required Consistent

There should be no conflicts or contradictions in the descriptions of the system facilities

In practice, it is impossible to produce a complete and consistent requirements document

4.2 NON-FUNCTIONAL REQUIREMENTS Define system properties and constraints e.g. reliability, response time and storage

requirements. Constraints are I/O device capability, system representations, etc.

Can be constraints on the process too• Use a particular CASE system, programming language or development method

System maybe unusable if non-functional requirements are not satisfied (Critical)

Non-functional classifications

Product requirements • Requirements which specify that the delivered product must behave in a

particular way e.g. execution speed, reliability, etc. Organisational requirements

• Requirements which are a consequence of organisational policies and procedures e.g. process standards used, implementation requirements, etc.

External requirements • Requirements which arise from factors which are external to the system and its

development process e.g. interoperability requirements, legislative requirements, etc.

Non-functional requirements examples Product requirement

• It shall be possible for all necessary communication between the APSE and the user to be expressed in the standard Ada character set

Organisational requirement • The system development process and deliverable documents shall conform to the

process and deliverables defined in XYZCo-SP-STAN-95

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

22

Page 23: SDE Complete Notes

CMRIT Redefining Quality Education

External requirement • The system shall not disclose any personal information about customers apart

from their name and reference number to the operators of the system Goals and requirements

Non-functional requirements may be very difficult to state precisely and imprecise requirements may be difficult to verify.

Goal• A general intention of the user such as ease of use

Verifiable non-functional requirement• A statement using some measure that can be objectively tested

Goals are helpful to developers as they convey the intentions of the system users

Examples A system goal

• The system should be easy to use by experienced controllers and should be organised in such a way that user errors are minimised.

A verifiable non-functional requirement• Experienced controllers shall be able to use all the system functions after a total

of two hours training. After this training, the average number of errors made by experienced users shall not exceed two per day.

Requirements measures

Maintainability?

Non-functional requirement conflicts Conflicts between different non-functional requirements are common in complex

systems Example: Spacecraft system

• maximum storage required should be 4MB (fit onto ROM)• system should be written in Ada language (suitable of critical real-time software

development)• It might be impossible to write an Ada program with the required functionality in

less than 4MB• >> Trade-off needed.

4.3 DOMAIN REQUIREMENTSI – M.Tech. – I – Semester (CSE) Software Design & Engineering

23

Property MeasureSpeed Processed transactions/second

User/Event response timeScreen refresh time

Size K BytesNumber of RAM chips

Ease of use Training timeNumber of help frames

Reliability Mean time to failureProbability of unavailabilityRate of failure occurrenceAvailability

Robustness Time to restart after failurePercentage of events causing failureProbability of data corruption on failure

Portability Percentage of target dependent statementsNumber of target systems

Page 24: SDE Complete Notes

CMRIT Redefining Quality Education

Derived from the application domain and describe system characteristics and features that reflect the domain

May be new functional requirements, constraints on existing requirements or define specific computations

If domain requirements are not satisfied, the system may be unworkable

Domain requirements (examples)

Library system• There shall be a standard user interface to all databases which shall be based on

the Z39.50 standard.• Because of copyright restrictions, some documents must be deleted immediately

on arrival. Depending on the user’s requirements, these documents will either be printed locally on the system server for manually forwarding to the user or routed to a network printer.

Train Protection system• The deceleration of the train shall be computed as:

Dtrain = Dcontrol + Dgradient Where Dgradient is 9.81ms2 * compensated gradient/alpha and where the values of 9.81ms2 /alpha are known for different types of train

Domain requirements problems

Understand ability • Requirements are expressed in the language of the application domain• This is often not understood by software engineers developing the system

Implicitness • Domain specialists understand the area so well that they do not think of making

the domain requirements explicit.

4.4 USER REQUIREMENTS Should describe functional and non-functional requirements so that they are

understandable by system users who don’t have detailed technical knowledge User requirements are defined using natural language, tables and diagrams.

Problems with natural language Lack of clarity

• Precision is difficult without making the document difficult to read Requirements confusion

• Functional and non-functional requirements tend to be mixed-up Requirements amalgamation

• Several different requirements may be expressed together

Example: editor grid requirement• Grid facilities To assist in the positioning of entities on a

diagram, the user may turn on a grid in either centimetres or inches, via an option on the control panel. Initially, the grid is off. The grid may be turned on

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

24

Page 25: SDE Complete Notes

CMRIT Redefining Quality Education

and off at any time during an editing session and can be toggled between inches and centimetres at any time. A grid option will be provided on the reduce-to-fit view but the number of grid lines shown will be reduced to avoid filling the smaller diagram with grid lines.

Requirement problems Grid requirement mixes three different kinds of requirement

• Conceptual functional requirement (the need for a grid)• Non-functional requirement (grid units)• Non-functional UI requirement (grid switching)

Sometimes requirements include both conceptual and detailed information• the detailed information should be specified in the system requirement

specification

Structured presentation

Grid facilities: The editor shall provide a grid facility where a matrix of horizontal and vertical lines provides a background to the editor window. This grid shall be a passive grid where the alignment of entities is the user's responsibility.

Rationale: A grid helps the user to create a tidy diagram with well-spaced entities. Although an active grid, where entities 'snap-to' grid lines can be useful, the positioning is imprecise. The user is the best person to decide where entities should be positioned.

Guidelines for writing requirements

Invent a standard format and use it for all requirements Use language in a consistent way. Use shall for mandatory requirements, should for

desirable requirements Use text highlighting to identify key parts of the requirement Avoid the use of computer jargon

4.5 SYSTEM REQUIREMENTS More detailed specifications of user requirements Serve as a basis for designing the system May be used as part of the system contract System requirements may be expressed using system models

Requirements and design

In principle, requirements should state WHAT the system should do (and the design should describe how it does this)

In practice, requirements and design are inseparable• A system architecture may be designed to structure the requirements• The system may inter-operate with other systems that generate design

requirements• The use of a specific design may be a domain requirement

Natural Language specification: Problems

Ambiguity

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

25

Page 26: SDE Complete Notes

CMRIT Redefining Quality Education

• The readers and writers of the requirement must interpret the same words in the same way. NL is naturally ambiguous so this is very difficult

• E.g. signs on an escalator: • ‘Shoes must be worn’• ‘Dogs must be carried’

Over-flexibility• The same thing may be said in a number of different ways in the specification

Lack of modularisation• NL structures are inadequate to structure system requirements

Alternatives to NL specification

Structured language specifications

A limited form of natural language may be used to express requirements This removes some of the problems resulting from ambiguity and flexibility and imposes

a degree of uniformity on a specification Often supported using a forms-based approach

Form-based specifications

Definition of the function or entity Description of inputs and where they come from Description of outputs and where they go to Indication of other entities required Pre and post conditions (if appropriate) The side effects (if any)

PDL-based requirements definition

Requirements may be defined operationally using a programming language like notation but with more flexibility of expression

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

26

Page 27: SDE Complete Notes

CMRIT Redefining Quality Education

Most appropriate in two situations• Where an operation is specified as a sequence of actions and the order is

important (when nested conditions and loops are involved)• When hardware and software interfaces have to be specified. Allows interface

objects and types to be specified

PDL disadvantages

PDL may not be sufficiently expressive to express the system functionality in an understandable way

Notation is only understandable to people with programming language knowledge The requirement may be taken as a design specification rather than a model to help

understand the system

4.6 Interface specification

Most systems must operate with other systems and the operating interfaces must be specified as part of the requirements

Three types of interface may have to be defined• Procedural interfaces• Data structures that are exchanged• Data representations

Formal notations are an effective technique for interface specification

PDL interface descriptioninterface PrintServer {

// defines an abstract printer server// requires: interface Printer, interface PrintDoc// provides: initialize, print, displayPrintQueue, cancelPrintJob, switchPrinter

void initialize ( Printer p ) ;void print ( Printer p, PrintDoc d ) ;void displayPrintQueue ( Printer p ) ;void cancelPrintJob (Printer p, PrintDoc d) ;void switchPrinter (Printer p1, Printer p2, PrintDoc d) ;

} //PrintServer

4.7 THE REQUIREMENTS DOCUMENT The requirements document is the official statement of what is required of the system

developers Should include both a definition and a specification of requirements It is NOT a design document. As far as possible, it should set of WHAT the system

should do rather than HOW it should do it

Users of a requirements document

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

27

Page 28: SDE Complete Notes

CMRIT Redefining Quality Education

Use the requirements todevelop validation tests forthe system

Use the requirementsdocument to plan a bid forthe system and to plan thesystem development process

Use the requirements tounderstand what system is tobe developed

System testengineers

Managers

System engineers

Specify the requirements andread them to check that theymeet their needs. Theyspecify changes to therequirements

System customers

Use the requirements to helpunderstand the system andthe relationships between itsparts

Systemmaintenance

engineers

Requirements document requirements!

Specify external system behaviour Specify implementation constraints Easy to change Serve as reference tool for maintenance Record forethought about the life cycle of the system i.e. predict changes Characterise responses to unexpected events

IEEE requirements standard

Introductiono Purpose of the requirement documento Scope of the producto Definitions, acronyms and abbreviationso Referenceso Overview of the remainder of the document

General descriptiono Product perspectiveo Product functionso User characteristicso General constraintso Assumptions and dependencies

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

28

Page 29: SDE Complete Notes

CMRIT Redefining Quality Education

Specific requirementso Cover functional, non-functional and interface requirements.

Appendices

Index

REQUIREMENTS DOCUMENT STRUCTURE

Preface: This should define the expected relationship of the document and describe its version history, including a rationale for the creation of a new version and a summary of the changes made in each version.

Introduction: This should describe the need of the system

Glossary: This should define the technical terms used in the document.

User requirements definition: The Services provided for the user and non-functional system requirements should be described in this section.

System architecture: This chapter should present a high-overview of the anticipated system architecture showing the distribution of functions across system modules.

System requirements specification: This should describe the functional and non-functional requirements in more detail.

System models: This should set out one or more system models showing the relationships between the system components and the system and its environment.

System evolution: This should describe the fundamental assumptions on which the system is based and anticipated changes due to hardware evolution, changing user needs.

Appendices: These should provide detailed, specific information which is related to the application which is being developed.

Index: Several indexes to the document may be included. As well as a normal alphabetic index, there may be an index of diagrams, an index of functions, etc.

_______

5. REQUIREMENTS ENGINEERING PROCESSES

Objectives

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

29

Page 30: SDE Complete Notes

CMRIT Redefining Quality Education

The objective of this chapter is to discuss the activities involved in the requirements engineering process. When you study this chapter, you will:

Understand the principal requirements of engineering activities and their relationships;

Have been introduced to several techniques of requirements elicitation and analysis;

Understand the importance of requirements validation and how requirements reviews are used in this process;

Understand why requirements management is necessary and how it supports other requirements engineering activities.

Contents

Feasibility studies Requirements elicitation and analysis Requirements validation Requirements management

Requirements engineering processes

RE processes vary widely depending on • the application domain• the people involved and • the organisation developing the requirements

However, there are a number of generic activities common to all processes• Feasibility study• Requirements elicitation and analysis• Requirements specification (documenting)• Requirements validation• Requirements management is an additional activity to manage changing

requirements

Feasibilitystudy

Requirementselicitation and

analysisRequirementsspecification

Requirementsvalidation

Feasibilityreport

Systemmodels

User and systemrequirements

Requirementsdocument

5.1 FEASIBILITY STUDY A feasibility study decides whether or not the proposed system is worthwhile

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

30

Page 31: SDE Complete Notes

CMRIT Redefining Quality Education

A short focused study that checks• If the system contributes to organisational objectives• If the system can be engineered using current technology and within budget• If the system can be integrated with other existing systems

Feasibility study implementation

Based on information assessment (what is required), information collection and report writing

Questions for people in the organisation• What if the system wasn’t implemented?• What are current process problems?• How will the proposed system help?• What will be the integration problems?• Is new technology needed? What skills?• What facilities must be supported by the proposed system?

Feasibility study report

The FS report should recommend whether or not the system development should continue.

It may propose changes to the scope, budget, schedule and also suggest requirement changes

5.2 REQUIREMENTS ELICITATION AND ANALYSIS (requirements discovery)

Involves technical staff working with customers to find out about the application domain, the services that the system should provide and the system’s operational constraints

May involve end-users, managers, engineers involved in maintenance, domain experts, trade unions, etc. These are called stakeholders

Problems of requirements analysis

Stakeholders don’t know what they really want

Stakeholders express requirements in their own terms

Different stakeholders may have conflicting requirements

Organisational and political factors may influence the system requirements

The requirements change during the analysis process. New stakeholders may emerge and the business environment change

The requirements analysis process

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

31

Page 32: SDE Complete Notes

CMRIT Redefining Quality Education

Requirementsvalidation

Domainunderstanding Prioritization

Requirementscollection

Conflictresolution

Classification

Requirementsdefinition andspecification

Processentry

The requirements analysis process activities

Domain understanding Requirements collection Classification Conflict resolution Prioritisation Requirements checking

Techniques for requirement elicitation and analysis

viewpoint-oriented elicitation ethnography scenarios structured analysis methods (system models) prototyping There is no universal method for requirement analysis!

System models

Different models may be produced during the requirements analysis activity Will be covered later

Viewpoint-oriented elicitation

Stakeholders represent different ways of looking at a problem or problem viewpoints This multi-perspective analysis is important as there is no single correct way to

analyse system requirements

Scenarios

Descriptions of how a system is used in practice Helpful in requirements elicitation as people can relate to these more easily than an

abstract statement of what they require from a system Useful for adding detail to an outline requirements description

Scenario descriptions

System state at the beginning of the scenario

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

32

Page 33: SDE Complete Notes

CMRIT Redefining Quality Education

Normal flow of events in the scenario What can go wrong and how this is handled Other concurrent activities System state on completion of the scenario

Scenario based techniques

use cases! event scenarios

• Event scenarios may be used to describe how a system responds to the occurrence of some particular event

• Used in the Viewpoint Oriented Requirements Definition (VORD) method.

Ethnography

An analyst spends time observing and analysing how people actually work People do not have to explain their work Social and organisational factors of importance may be observed Identifies implicit system requirements Ethnographic studies have shown that work is usually richer and more complex than

suggested by simple system models

Scope of ethnography

Requirements that are derived from the way that people actually work rather than the way in which process definitions suggest that they ought to work

• e.g. air-traffic controllers switch off flight path conflict alarms

Requirements that are derived from cooperation and awareness of other people’s activities

• e.g. predict no. of aircraft entering their sector by getting information from neighbouring controllers and plan accordingly

Not suitable for using alone, has to be combined with some other technique

5.3 REQUIREMENTS VALIDATION Concerned with showing that the requirements define the system that the customer really

wants Requirements error costs are high so validation is very important

• Fixing a requirements error after delivery may cost up to 100 times the cost of fixing an implementation error

Types of requirements checking

Validity. Does the system provide the functions which best support the customer’s needs?

Consistency. Are there any requirements conflicts? Completeness. Are all functions required by the customer included? Realism. Can the requirements be implemented given available budget and

technology Verifiability. Can the requirements be checked

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

33

Page 34: SDE Complete Notes

CMRIT Redefining Quality Education

Requirements validation techniques

Requirements reviews• Systematic manual analysis of the requirements

Prototyping• Using an executable model of the system to check requirements.

Test-case generation• Developing tests for requirements to check testability

Automated consistency analysis• Checking the consistency of a structured requirements description

Requirements reviews

Regular reviews while the requirements definition is being formulated Both client and contractor staff should be involved in reviews Reviews may be formal (with completed documents) or informal. Good

communications between developers, customers and users can resolve problems at an early stage

Review checks

Verifiability. Is the requirement realistically testable? Comprehensibility. Is the requirement properly understood? Traceability. Is the origin of the requirement clearly stated? Adaptability. Can the requirement be changed without a large impact on other

requirements?

Automated consistency checking

Requirementsdatabase

Requirementsanalyser

Requirementsproblem report

Requirementsprocessor

Requirementsin a formal language

5.4 REQUIREMENTS MANAGEMENT Requirements management is the process of managing changing requirements during the

requirements engineering process and system development Requirements are inevitably incomplete and inconsistent

• New requirements emerge during the process as business needs change and a better understanding of the system is developed

• Different viewpoints have different requirements and these are often contradictory

Why requirements change

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

34

Page 35: SDE Complete Notes

CMRIT Redefining Quality Education

The priority of requirements from different viewpoints changes during the development process

System customers may specify requirements from a business perspective that conflict with end-user requirements

The business and technical environment of the system changes during its development

Requirements evolution

Changedunderstanding

of problem

Initialunderstanding

of problem

Changedrequirements

Initialrequirements

Time Enduring and volatile requirements

Enduring requirements. Stable requirements derived from the core activity of the customer organisation. • May be derived from domain models• E.g. a hospital will always have doctors, nurses, etc.

Volatile requirements. Requirements which change during development or when the system is in use. • E.g. In a hospital, requirements derived from health-care policy

Classification of volatile requirements

Mutable requirements• Requirements that change due to the system’s environment

Emergent requirements• Requirements that emerge as understanding of the system develops

Consequential requirements• Requirements that result from the introduction of the computer system

Compatibility requirements• Requirements that depend on other systems or organisational processes

Requirements management planning

During the requirements engineering process, you have to plan:• Requirements identification

• How requirements are individually identified• A change management process

• The process followed when analysing a requirements change

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

35

Page 36: SDE Complete Notes

CMRIT Redefining Quality Education

• Traceability policies• The amount of information about requirements relationships that is

maintained• CASE tool support

• The tool support required to help manage requirements change

Traceability

Traceability is concerned with the relationships between requirements, their sources and the system design

Source traceability• Links from requirements to stakeholders who proposed these requirements

Requirements traceability• Links between dependent requirements

Design traceability• Links from the requirements to the design

A traceability matrix

Req. id 1.1 1.2 1.3 2.1 2.2 2.3 3.1 3.21.1 D R1.2 D R D1.3 R R2.1 R D D2.2 D2.3 R D3.1 R3.2 R

CASE tool support

Requirements storage• Requirements should be managed in a secure, managed data store• We need requirement databases!

Change management• The process of change management is a workflow process whose stages can be

defined and information flow between these stages partially automated Traceability management

• Automated retrieval of the links between requirements

Requirements change management

Should apply to all proposed changes to the requirements Principal stages

• Problem analysis. Discuss requirements problem and propose change• Change analysis and costing. Assess effects of change on other requirements

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

36

Page 37: SDE Complete Notes

CMRIT Redefining Quality Education

• Change implementation. Modify requirements document and other documents to reflect change

Changeimplementation

Change analysisand costing

Problem analysis andchange specification

Identifiedproblem

Revisedrequirements

________

6. NATURE OF THE DESIGN PROCESS

What is design?

The ideas that it presents are rooted in one of the most distinctive of human characteristics. This characteristic is the making of, and the use of, tools. Tools are

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

37

Page 38: SDE Complete Notes

CMRIT Redefining Quality Education

themselves artifacts, which are then in turn used to create further artifacts, whether the tool in question is a stone axe or a compiler – and producing any form of artifact is an act that implicitly incorporates some element of design activity.

Our perception of the importance of the roles that design may play in producing these different artifacts will vary, although it may not always be correct.

No-one is likely to deny the importance of using well-proven design practices for the design of motorway bridges, aero planes and buildings, not least because of the safety issues concerned with the use of such objects.

Good design may be marred by poor fabrication, usually no amount of constructional skill can disguise poor design.

That good design practices cannot always ensure success in terms of design quality.

So what is design exactly, what sort of activities does it involve, and what can we observe about the products of that process? Perhaps a good starting point is to consider the words of one of the pioneering design methodologists, J. Chirstopher Jones, taken from his classic work, Design methods: seeds of Human futures (Jones, 1970).

‘The fundamental problem is that designers are obliged to use current information to predict a future state that will not come about unless their predictions are correct.

The final outcome of designing has to be assumed before the means of achieving it can be explores: the designers have to work backwards in time from an assumed effect upon the world to the beginning of a chain of events that will bring the effect about.’

The path of science has been concerned with studying things as they are, with observation and experimentation as its key activities. In its ‘classical’ form, the scientific approach to problem – solving typically consists of observing the characteristics of some phenomenon, making measurements of these, building a theory to explain them, and then seeking to verify theses predictions through further observation and measurements.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

38

Page 39: SDE Complete Notes

CMRIT Redefining Quality Education

The path of what we can generally refer to as engineering has been much more concerned with creating new things, with the key activities involves being those of construction and evaluation.

The nature of software may make this design process more complex, not least because design and implementation may be less distinctly separated, but it does not alter its essential nature.

Postulate a solution; Build a model of the solution; Evaluate the model against the original requirement; Elaborate the model to produce a detailed specification of the solution.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

39

Page 40: SDE Complete Notes

CMRIT Redefining Quality Education

In other words, the act of elaborating the original model might reveal its inadequacies or even its total unsuitability, so making the whole process of design essentially unstable.

CASE STUDY 1 MOVING HOUSE

Moving to a new house is widely regarded as one of the major traumas in our lives. However, hidden within this operation lies a very good illustration of what designing can involve, and so for our case study we briefly examine some of the actions that might be involved when planning a move into a new house.

One practice widely recommended to the new owner is to begin by measuring the dimensions of the various rooms in the house, to obtain some squared paper and to use this for drawing up a scale plan showing all the rooms, doors, windows and so on.

The next step is to measure the dimensions of various items of furniture and to cut out cardboard shapes to represent these on the chosen scale. Together these form a representation of the new house and its future contents that can be considered as forming the initial model. Figure 1.4 shows an example of such an outline plan for a small single storey house.

The design process itself then involves trying to identify the 'best' positions for the pieces of card on the plan of the new house. There is really no analytical form that can be used to do this, since it is usually necessary to trade off different factors in making the choices.

However, there are various strategies that can be adopted: for example, determine which rooms will take greatest priority, and then seek to find ways of producing a well-matched set of furniture for those rooms. This strategy may lead to greater mismatches in the remaining rooms than would occur if the owner tried for an overall best match.

Some of the constraints that apply to the various possible solutions will be more significant than others. Most people would not wish to place kitchen equipment in the living-room, for example, but might be prepared to position surplus fireside chair in a bedroom. Other factors that might constrain the choice could be colour matches, style and so on. Equally, it is undesirable to obstruct power outlets - a point that leads on to our next issue.

The representation provided by the model as described above is somewhat incomplete, since it is only two-dimensional. On occasion it will be necessary to consider the vertical dimension too, in order to avoid blocking windows with tall furniture, or to ensure that a power outlet will still be accessible through the legs of an item Of furniiture. Again, it may

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

40

Page 41: SDE Complete Notes

CMRIT Redefining Quality Education

be necessary to make some trade-offs between what is desirable and what is practicable. Figure 1.5 shows how the model used in Figure 1.4 can be extended to describe these factors.

The decisions that result from this process can then be regarded as providing a plan for use by the removal team on the removal day. Indeed, not only will it determine just where in the house the various items are to be placed when the removal van arrives, but it may also affect the way that the removal process is to be organized, since the removers might choose to pack their van in a particular way in order to make the unloading process easier.

From this relatively simple case study, we should be able to see some of the ways in which the process of design differs from that of scientific method. Rather than being able to identify a 'right' coordinate system that allows us to separate the variables and solve for each separately, we have to build a relatively complex model, and then make adjustments to this in order to produce a solution. There may be many possible 'solutions', and we may well have no very strong criteria that can be used to help us in choosing from a number of the better ones.

However, in some senses the problem that is presented in this case study provides a much simpler environment than is often available to the software designer. The form of the initial model used to describe the problem is directly related to that of the final plan used to describe the solution, in that both are scale drawings of the building. So there is no need to 'transform' between the representation used to describe the problem and that used to describe the solution, as is generally the case for software design. Similarly, the 'designer' is able to manipulate well-defined 'objects', in that each item of furniture already exists and its relevant properties (that is, its dimensions) are fixed, and can easily be measured. The equivalent properties for software objects will generally not be so easily quantifiable or even identifiable.

Before going any further, it may be useful to take a brief look at another example of a design problem. Again, it is taken from a more traditional field than that of software development, but this problem possesses a set of constraints that some readers will probably be more familiar with. In particular, it introduces the concept of reuse.

CASE STUDY 2 THE GARDEN SHED

The Lots logs timber company is chiefly concerned with operating sawmills and with producing various standard sizes of timber. As a sideline, they are developing a new production unit that will use the timber to construct a small range of garden sheds. These sheds will all need to be constructed by using a set of prefabricated panels, so that they can be assembled at the customer's home with relative ease.

The manager of the shed production unit therefore needs to produce a set of designs for a number of different sheds. Much of the prqcess for doing this is relatively direct, but this time there are some constraints upon the form of the end result that are rather different from those of the previous problem. These do not constrain the form of the design process directly, but they influence it indirectly in terms of their effect upon the design product.

Apart from the cost of the timber, the main cost to consider in developing a new shed is the cost of fabricating the parts. Since sawing timber is very time-consuming,

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

41

Page 42: SDE Complete Notes

CMRIT Redefining Quality Education

the amount of sawing needs to be kept to a minimum. Consideration of this factor has therefore led to the following set of design constraints.

A shed should be assembled from a set of prefabricated panels for the sides and roof.

Assuming that the boarding on the sides runs horizontally, each panel should be of a height that allows it to be constructed from a whole number of boards.

Where possible, the panels used in one shed should be of a size that allows them to be used in another: for example, the side panel for a small shed could also be used as the back panel for a larger model.

Windows and doors should be of standard dimensions, and again the height of each should correspond to a whole number of boards, in order to reduce the time needed for cutting out special shapes.

These effectively form constraints upon the design process too, and the designer will also need to consider a number of practical issues about size and shape of the range of products.

As we observed for the previous case study on moving house, there is no evident prescription that can be used to produce a set of designs for garden sheds that will automatically meet all of the criteria, as well as being visually pleasing and practical to use. Given the nature of the problem, the process will certainly be more direct than for the previous case study, but it will still involve some feedback ana iteration of ideas.

Given the original requirements that were identified by the company, and the constraints created by the nature of the material and the need for reuse of components, the outcome of the process will be a set of drawings showing the dimensions of each panel, the way that it should be assembled from the basic units of timber, and the ways that the panels can be assembled to create different sheds, as shown in Figure 1.6.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

42

Page 43: SDE Complete Notes

CMRIT Redefining Quality Education

1.2 THE ROLE OF THE DESIGN ACTIVITY

It is unlikely that any of the major creations of ancient time, such as the pyramids, could have been achieved without a significant degree of ‘design planning’, and so it seems reasonable to identify architecture in its broadest sense and the most probable domain where this separation form the craft-level entwining of design and construction is likely to have begun.

Two of these are worth noting here, not least because of their longer-term implications for software design.

1. The first of these was the knowledge gained from scientific research. As the properties of materials became better understood, and the means of predicting their behavior became more refined and dependable, so the designer could employ this knowledge in helping to create new structures. A good example is that of bridge building in the nineteenth century, when engineers such as I K Brunel were able to create structures that were radically different fro their predecessors, while also proving to be remarkable durable.

2. The second was the concept of reuse. One consequence of the industrial revolution was the idea of ‘standardizing’ components. The existence of such components extends a designer’s repertoire – one the one hand offering speedier development of an idea with potentially lower costs, but also introducing new constraints and trade-offs into the design process.

It might well be argues that while the first of these has had its most important impact in ‘engineering design’, the second has affected all domains – and has some important consequences for software design too.

Returning briefly to the two case studies that were introduced above, we can see that the objectives from theses are some what different in form. They can be described as aiming to produce respectively.

A plan that informs the removal men where each major item of furniture is to be positioned;

A set of plans that inform the joiner about the dimensions of the panels and how the panels are to be jointed and so on.

The plans produced by the designer may need to indicate some information about the sequencing of operations in the eventual construction process.

Communication with those responsible for fabricating the eventual solution is likely to be an important part of the designer’s role, especially for larger-scale developments.

Software designer may need to acquire some degree of ‘domain knowledge’ as a routine part of the input needed for undertaking any particular design task.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

43

Page 44: SDE Complete Notes

CMRIT Redefining Quality Education

The form and extent of the plans will be determined by the design practices and means of implementation chosen as well as by the size of the system being developed.

Typically, such plans will be concerned with describing:

The static structure of the system, including any subprograms to be used and their hierarchy;

Any data objects to be used tin the system;’ The algorithms to be used; The packaging of the system, in terms of how components are grouped in

compilation units; Interactions between components, including the form these should take, and the

nature of any causal links.

As in many more ‘classical’ forms of engineering, software designers produce plans that specify how the final product is to be assembled in terms of the items listed above.

Designing software consists of designing a process; and so it becomes necessary to model and describe its behaviour as well as its structure, and also the functions that it will perform. So the designer’s model will ideally include descriptions that also encompass these aspects of the eventual system.

To meet these needs, the designer will usually make use of a number of different forms of design representation to help with constructing the model, each representation providing a different viewpoint on the form of a design, as shown in Figure 1.8.

1.3 DESIGN AS A PROBLEM – SOLVING PROCESS

The purpose of design is simply to produce a solution to a problem. The problem will typically be summarized by means of some form of requirements specification, and it is the designer’s task to provide a description of how that requirement is to met. Design is therefore essentially a problem-solving task.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

44

Page 45: SDE Complete Notes

CMRIT Redefining Quality Education

1.4 DESIGN AS A ‘WICKED’ PROBLEM

A 'wicked' problem demonstrates some interesting properties. It can be characterized as a problem whose form is such that a solution for one of its aspects simply changes the problem. 'The term was coined by Rittel and Webber (1984), and atose from their analysis of the nature of social planning problems and of the design issues that were involved.

The following properties, taken from their list, are particularly relevant.

There is no definitive formulation of a wicked problem.

Wicked problems have no stopping rule.

Solutions to wicked problems are not true or false, but good or bad.

There is no immediate and no ultimate test of a solution to a wicked problem.

Every solution to a wicked problem is a ‘one-shot operation’, because there is no opportunity to learn by trial–and–error, every attempt counts significantly.

Wicked problems do not have an enumerable (or an exhaustively describable) set of potential solutions.

Every wicked problem is essentially unique. Of course, there are similarities between software systems, and in later chapters we look at ideas about reuse and about mechanisms such as design patterns which assist with exploiting similarities to aid reuse of design experience.

Every wicked problem can be considered to bed a symptom of another problem.

2.1 BUILDING MODELS

The following properties of software as major factors affecting its development.

Complexity: This is seen as being an essential property of software, in which no two parts are alike and a system may possess very many states during execution. This complexity is also arbitrary, being dependent upon the designer rather than the problem.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

45

Page 46: SDE Complete Notes

CMRIT Redefining Quality Education

Conformity: Software, being 'pliable', is expected to conform to the standards imposed by other components, such as hardware, or by external bodies, or by existing software.

Changeability: Software suffers constant need for change, partly because of the apparent ease of making changes (and relatively poor techniques for costing them).

Invisibility: Because software is 'invisible', any forms of representation that are used to describe it will lack any form of visual link that can provide an easily grasped relationship between the representation and the system - unlike, for example, a building plan which can be easily linked to the visible features of the building. This not only constrains our ability to conceptualize the characteristics of software, it also hinders communication among those involved with its development.

Idea of using some form of 'model' to help with exploring design ideas is hardly new. The seventeenth-century shipbuilders constructed magnificent scale models of sailing ships, both as an aid to their own planning and also (equally important) as a means of conveying those plans to the shipyard workers who were to be tasked with constructing the vessel. So what exactly is a model? A typical dictionary definition reads something like the following:

'A three-dimensional representation, usually in miniature, of a thing to be constructed.'

This is a rather physical view, and models may well be more abstract and may be concerned with more than just construction. Models of this type can also be used to predict the behaviour of a system within a given context or scenario, a role which corresponds much more closely to the needs of the software designer.

In developing software, we need models that are often less precise than the mathematician's models, while also being more abstract than those used by the ship-builder, and that are certainly not three-dimensional in the physical sense! However, their role is still to provide some form of representation of the designer's intentions.

In practice, and especially when developing larger systems, the process of design is apt to be divided into two distinct phases, as illustrated in Figure 2.2.

1. In the first phase, the designer develops a highly abstract model of a solution (the 'architectural' or 'logical' design) in which only the external properties of the model

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

46

Page 47: SDE Complete Notes

CMRIT Redefining Quality Education

elements are included. This initial black-box partitioning of the problem is therefore largely concerned with the nature and form of the problem itself, and less strongly influenced by the eventual form that will be adopted for its solution.

2. In the second phase, the abstract 'chunks' of the problem that were identified in the first phase are mapped on to technologically-based units (the 'detailed' or 'physical' design), hence turning the black box into a white box. Where design and implementation are separate responsibilities, it is the output from this phase that provides the specifications for the programmers.

The initial 'architectural model' that is used to describe the intended form that a

stem will take is generally highly abstract in its nature. The way that this is developed during the process of designing was examined in an interesting study of the ways that software designers work, made by Adelson and Soloway. The experiments were based upon situations where a designer was posed:

a familiar problem; a problem that was unfamiliar in detail, but taken from a familiar domain; and a problem that was unfamiliar in all senses.

Some key observations that were produced from this research included:

The use of abstract 'mental models' by the designer to simulate the dynamic behaviour of the eventual system that will be derived from the design.

Expanding the detail of a model in a systematic manner by keeping all elements of the design at the same level of detail as they are developed. This then aids the task of simulation.

The need to make any constraints affecting the design as explicit as possible when handling an unfamiliar problem.

Reuse of previous design plans. This arises when part of a problem can be solved by using a previously developed design object or structure. Where this occurs, designers may use a 'label' to identify the plan, rather than describing it in detail at that point.

Making notes about future (detailed) intentions, as an aid to systematic expansion of a design.

There have been relatively few empirical studies of software designers conducted within a controlled experimental environment that have examined the activities involved in

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

47

Page 48: SDE Complete Notes

CMRIT Redefining Quality Education

software design from the viewpoint of the actions of the designer. Some of the observed techniques are also used for the more detailed design tasks that they undertake when 'programming in the small'. For instance, many programmers probably perform simulations by executing mental models for sections of their programs when coding conditional loop structures: modeling the entry/exit conditions that occur when the loop is first executed, and checking to ensure that the loop will terminate in the intended manner. In that sense, the idea of simulation is a fairly familiar one, and it is clearly rather important at all levels of abstraction.

Examine different software design methods that many of these provide quite extensive orms of support for a designer in building initial abstract models in order to explore ideas. The forms used for the models may be graphical, as in the case of 'systematic' methods, or mathematically-based, in the case of the more 'formal' methods. In each case, the use of an abstract model generally allows the designer to predict the likely behaviour of a system for different scenarios. In addition, the models can be used to aid a systematic expansion of the initial ideas of the designer towards the production of a detailed design description.

2.2 TRANSFERRING DESIGN KNOWLEDGE

The act of designing is not based upon an analytic strategy, aimed at identifying the one true solution to a problem; as determined by physical laws. Instead, it is a highly creative process, and certainly very unlikely to lead to the identification of a single solution to any given problem.

The exceptional designers were observed to possess three significant characteristics.

1. Familiarity with the application domain, enabling them to map between problem structures and solution structures with ease. (A domain in this sense may be one such as data processing, real-time, telecommunication systems, and so on.)

2. Skill in communicating technical vision to other project members.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

48

Page 49: SDE Complete Notes

CMRIT Redefining Quality Education

3. Identification with project performance, to the extent that they could be found taking on significant management responsibilities for ensuring technical progress.

When we look at how successful designers work, there are other factors to consider. Visser and Hoc (1990) have used the term 'opportunistic' to describe observations of software design activity. Even where designers aim to follow a strategy such as 'top-down' (systematically refining the description of the solution into ever smaller actions), they may deviate from this plan, either:

to postpone a decision, if the information required is not yet available at this design level; or

to process information that is readily to hand, and which can be used for defining modules in anticipation of further developments in the design.

Such opportunistic design activity is not unstructured; instead, it is more likely to reflect the designer's experience and domain knowledge. One important consequence is that the developers of software design support tools should not give them an interface form that impedes this behaviour on the part of the designer.

Domain knowledge can be acquired partly through experience, and also, to some degree, through learning a set of design practices that may be related to a particular domain. One way of learning such practices is through the use of design methods. We can, therefore, regard the purpose of a software design method as being to provide the framework that will enable a designer to develop and elaborate a design in a systematic manner.

Design methods are not the only means of formalizing the transfer of domain knowledge, and more recently the idea of the design pattern is one that has offered a less 'procedural' mechanism for this (Gamma et al., 1995).

A software design method can be considered as providing a supportive framework that

consists of two major components (shown schematically in Figure 2.4).

The representation part provides a set of descriptive forms that the designer can use for building both black box and white box models of the problem and their ideas for its solution, and for describing the structural features of the solution to the eventual implementers.

The process part is concerned with describing how the necessary transformations between the representation forms are to be organized, as well as with any elaborration of their detail that might be required.

A further component is provided in most design methods:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

49

Page 50: SDE Complete Notes

CMRIT Redefining Quality Education

A set of heuristics that can be used to provide guidelines on the ways in which the activities defined in the process part can be organized for specific classes of problem. These are generally based upon experience of past use of the method within a particular domain or for a particular form of structure.

However, we can still identify some of the expectations that we have from the process part of a design method, which will include providing some degree of guidance for the following tasks:

identification of the design actions to be performed; use of the representation forms; procedures for making transformations between representations; quality measures to aid in making choices; identification of particular constraints to be considered; Verification / validation operations.

Most design methods provide strategic guidance for the designer, rather than detailed solutions to issues.

1. The recognition steop, sometimes termed the ‘Aha!’ response.2. The problem restructuring step in which a change of viewpoint that is used to describe or

model a problem leads to a major breakthrough in solving it.3. The development of procedural knowledge about how such problems are best solved,

allowing the designed to perform many creative acts within a domain.

A major component of the process part of a design method is the structuring of the design transformations. The sequence that is expressed in the 'process diagram' used in Figure 2.2 is, of course, still a fairly abstract one, and omits any detail about the iterations that will normally occur as a designer explores and evaluates the design options.

• an input model that may be described by using a suitable 'representation';

• an output model that, again, can have any of these forms;

• design inputs through which the designer adds information to the model. In addition, we can identify two principal forms of design transformation, respectively

involve:

• the refinement (or elaboration) of structures, in which the input and output forms of the model are the same, but extra detail is added;

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

50

Page 51: SDE Complete Notes

CMRIT Redefining Quality Education

• the transformation of viewpoint, which may involve a change of representation form or introduce a different interpretation of the representation form.

In general, the transformations that involve refinement are apt to preserve the repressentation form while adding more detail; while those that involve a change of viewpoint add both decisions and a change of the structure of the design model.

The view of design as being a series of transformations is one that has been explored and used in a number of ways. As a general model it provides useful sumary of design method structuring, and it will be used for this purpose in the chapters that describe specific design methods.

The concept of software architecture (Shaw and Garlan, 1996) can be considered as taking a more structural and less procedural approach to thinkking about how a design can be developed. Similarly, the idea of the design pattern that was mentioned earlier (Gamma et al., 1995) has focused upon categorizing solution structures that can be reused for different problems.

2.3 CONSTRAINTS UPON THE DESIGN PROCESS AND PRODUCT

In practice, there are very few opportunities to design a system with a totally free hand, since each design task takes place within a particular context, and this will provide particular constraints upon the form of the design itself and possibly on the way that it is produced.

Software design, we can readily identify many of the constraints imposed upon the form of the product. Some may be determined by the eventual run-time environment, while others may relate to the need to conform to the conventions required by a chosen architectural style.

Eventual system will be constructed by reusing existing software components, this may lead to further constraints upon the 'acceptable' architectural styles that the components may possess (Garlanetal., 1995) as well as upon the task of allocating functionality between components.

One of the most important constraints on the design task and the form of the design itself is that of the eventual form of implementation. For many years the approach used by most software development projects has been to purchase the hardware and select the major software facilities before even beginning on the design task itself. While enlightenment may be dawning, the choice of the programming language is still more likely to be determined by external factors such as programmer skills and knowledge than by the features of the problem itself.

The use of imperative forms is not essential to the design process, and the principles of design studied here are certainly not restricted to the imperative paradigm alone.

Constraints on the process of design are more difficult to identify. They may be concerned with designer skills and knowledge or with a need to conform to a particular 'architectural style' of design, in order to aid future maintenance.

Whatever form they take, constraints can be considered as forming a set of bounds upon the 'solution space'. Even if the process of design will not necessarily converge upon one solution for a given problem, the effects of the constraints may be to limit the amount of possible divergence that will be acceptable in particular circumstances.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

51

Page 52: SDE Complete Notes

CMRIT Redefining Quality Education

Many constraints will be identified in the initial specification documents, although this will not necessarily be true for those that are related to any expectations of reuse. While problem-specific constraints cannot readily be incorporated into any formal design process, their influence does need to be considered at every step. One way to identify and track constraints is through the use of regular design reviews, which can be given the role of ensuring that an audit trail is maintained.

2.5 RECORDING DESIGN DECISIONS

The need to record the decisions of the designer is important, from the viewpoint of the design task itself, and even more so from the viewpoint of the maintenance team who may later need to extent and modify the design. Unfortunately, while designers may diligently record the actual decisions, it is much rarer to record the rationale that forms the basis for the final choice.

Beginning with the original task of design, the recording of rationale is likely to be encouraged if the design process includes any form of design audit.

There is an even stronger need on the part of the system maintenance task.

In order to modify or extent a design, the maintenance designers need to be able to recapture the original models that were used by the designers of a system.

So a major motivation for recording the reasoning behind any design decisions is one of quality control, both at the design stage and also much later, during maintenance. Only if we have a completer picture can we hope to fully understand a design, and this is an essential factor in producing a good, reliable design.

Unfortunately, while software design methods generally provide good forms of support for recording decisions about product issues, usually through diagrams or other notation, they are generally weaker on process matters, such as recording the reasons for the decision.

The way in which design decisions are recorded is obviously somewhat dependent upon the design process adopted. Some work has been performed to look at ways of modeling this process of design deliberation - the 'Potts and Bruns model' (Potts and Bruns, 1988; Lee, 1991) - and it has been demonstrated for the JSD method.

An important issue in terms of recording decisions about a design has been raised by Parnas and Clements (1986). They have observed that, even if the design process actually used to produce a design is not a rational one, the documentation that is finally produced should still make it appear as though it were.

The principal benefits of such an approach are that new members of a design team should be able to absorb knowledge about the project much more easily, and also that the eventual task of maintaining the system will also be made easier! Parnas and Clements observe that even for a scientific document such as a mathematical proof, the form published is rarely the form of the initial derivation, since, as understanding grows, simplifications can usually be found.

2.6 DESIGNING WITH OTHERS

While the development of a sound design is important for software development tasks of any scale, it is essential for any form of programming in the large, where a project is likely to involve a design team rather than a single designer. Given the nature of the design process, it

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

52

Page 53: SDE Complete Notes

CMRIT Redefining Quality Education

is hardly surprising that designing as a team adds further complications, many of them in the form of added constraints upon the process, and hene upon the form of the product.

Many of the very successful and 'exciting' software systems have been the work of one or a few 'great designers'.

In the absence of any great designers, designing a system through the use of a team brings two major additional issues that need to be handled within the chosen design strategy. These are:

how to split the design task among the' team, and to determine the interfaces between the parts;

How to integrate the individual contributions to the design, which may well involve a process of negotiation between the members of the team.

Bringing the elements of a design together, along with the accompanying negotiations, is again a mix of technical and managerial issues.

Some of the original research studying how programming (and hence designing) is performed by teams was described in Gerald Weinberg's classic book The Psychology of Computer Programming. Observed the effects of different forms of group organization, ranging from groups that worked as an 'egoless' set of peers. To those that had a highly hierarchical form.

The more hierarchical approach was at one time advocated by the exponents of the 'chief programmer' school (Baker, 1972; Brooks, 1975). Highly centralized role, with the other members of the team performing functions that are solely intended to support his or her activity.

In practice, few design teams seem to act along such lines, perhaps because there are few great designers who can take on the very exacting central role it demands.

Researchers have also sought to understand and model the psychological factors that influence team behaviour in designing (Curtis et al., urtis and Walz, 1990). The factors discussed in these references include:

the size of a team (there seem to be pointers that a size of 10-12 members is probably an upper limit for productive working);

the large impact that may be exerted by a small subset of the members of the team who possess superior application domain knowledge;

the influence of organizational issues within a company.

This last point raises an important issue in that:

Designers needed operational scenarios of system use to understand the appliication's behaviour and its environment. Unfortunately, these scenarios were too seldom passed from the customer to the developer. Customers often generated many such scenarios in determining their requirements, but did not record them and abstracted them out of the requirements document.' (Curtis et al., 1988)

This point is an interesting one, for it is relevant not only to the use of design teams, but addresses a much wider organizational issue in itself.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

53

Page 54: SDE Complete Notes

CMRIT Redefining Quality Education

The key issues of design team operation seem to lie more in the domain of group psychology than in that of design technology. To quote from Curtis and Walz (1990):

'Programming in the large is, in part, a learning, negotiation, and communication process.'

Unfortunately, to date far more effort has gone into technical research than into investigating team and organizational factors.

DESIGN IN THE SOFTWARE DEVELOPMENT PROCESS

3.1 A context for design

Task of design is not something that takes place in isolation, and in this chapter we examine some of the other factors that can influence the design process, by virtue of its context within the overall task of software development.

The concept of the software life-cycle which emerged as a description of how the necessary development activities were usually organized has been widely recognized to be very valuable - provided we accept that it encompasses many forms and variations (Royce, 1970; Boehm 1988; Davis et al., 1988).

It is also important to recognize that one of the risks involved in employing such a useful concept is that its very usefulness might result in it becoming institutionalized, and then used to constrain creativity rather than to support it. (McCracken and Jackson, 1982; Gladden, 1982).

Ideas about how the software development process might be best organized have undergone a process of evolution that is similar to the way in which ideas about design have evolved.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

54

Page 55: SDE Complete Notes

CMRIT Redefining Quality Education

Royce's formulation of the waterfall model (Royce, 1970), a version of which is shown in Figure 3.1, was a particularly influential refinement of earlier thinking that explicitly recognized the presence of 'feedback loops' between the various stages of development.

Boehm (1988) has pointed out that a software process model of this form a dresses the following software project questions.

1. What should we do next?2. How long should we continue to do it?

Most development processes tend to be couched in terms of the phases identified in the original waterfall structure.

As with processes, so it is with tasks. While the terminology used in different sources may differ a little, the following are a practical set for our purposes:

Feasibility study: The role of such a study is essentially to explore whether a solution is attainable within the given set of constraints. So such a study will at least give some preliminary thought to design issues, even if only at the architectural level.

Requirements elicitation: Here the objective is to identify what 'end-user' needs the intended system is required to meet. It is sometimes suggested that an ideal approach to this task is for it to be completely independent of any considerations of eventual design and implementation.

Analysis: Traditionally this is usually seen as a more formal modeling of the problem. Obviously this forms a major input to the design process, and can very easily drift into making solution-based assumptions.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

55

Page 56: SDE Complete Notes

CMRIT Redefining Quality Education

Architectural design: Concerned with the overall form of solution to be adopted.

Detailed design: Developing descriptions of the elements identified in the previous phase, and obviously involving interaction with this. There are also clear feedback loops to earlier phases if the designers are to ensure that the behaviour of their solution is to meet the requirements.

Coding: This may involve devising data and communication structures and writing large amounts of code or, increasingly, involve writing 'glue' code to join existing components together. Effectively, though, it involves 'translating' the abstract design plans into some form of realized system and therefore takes its inputs from the design phase.

Unit and integration testing: Essentially these phases involve validating the implemented system against the original requirements, the specification produced from the Analysis phase, and the design itself.

Operation and maintenance: Operation can sometimes resemble an extended testing phase, providing feedback from users in many ways. Maintenance is a rather different issue - it may involve repeating all the tasks of the preceding phases and, indeed, preserving the integrity of the system could well be an important constraint upon the task of maintenance. The timescale for these last two phases can also be very long.

The proportion of effort allocated to these tasks is one that depends upon many factors. However, a study of the practices of software developers that drew upon a global set of data suggests that the variations are not as great as might be expected.

As might be expected, regardless of how these tasks are organized, the design task is strongly linked to the tasks that precede it in the above list.

Requirements elicitation will be concerned with identifying the needs of the library staff and users, in terms of the purposes of the library. An example of such a need might be the facility for identifying those books that have particularly long reservation lists, so that the library staff can consider whether to order additional copies. Such an analysis will usually also consider the interactions and organizational relationships that may exist between the various needs of the users of the system.

Analysis will create a model of how the library works and hence produce a list of functions that the system will need to provide, and the behaviour it should exhibit when performing these functions under given conditions.

The specification for this system may also need to describe the way in which the users' interactions with the final system are to be organized (the 'look and feel' aspects). The design of human-computer interfaces is still a relatively specialized and difficult art, with a strong multi-disciplinary flavor.

So the output from requirements elicitation is user-oriented, while that from analysis is solution-oriented.

3.4 Economic FactorsI – M.Tech. – I – Semester (CSE) Software Design & Engineering

56

Page 57: SDE Complete Notes

CMRIT Redefining Quality Education

When the nature of the design process was examined. A key point that emerged was that it is not analytic in any sense, and that it involves navigating through a 'solution space' that may be very - indeed, extremely - large. This is partly because of the abstract nature of software, which makes it difficult to identify and specify all needs, and also because the medium makes it possible to identify many solutions to a given problem.

A consequence of this is that, with so large and ill-defined a solution space, the design process can easily lead to a design that contains 'errors'. These might be of many kinds, but some particularly significant ones are:

the design is not self-consistent, so that it cannot be successfully or efficiently implemented as it stands;

the design and the specification are not consistent; the design and the requirements are not consisten1

Inconsistency in the form of the design itself may be revealed at various stages in its development. It may appear:

When the design is being refined, perhaps arising from structural inconsistencies that emerge when comparing information that is obtained from different viewpoints - a widely used technique for seeking out such errors is that of the design review (Yourdon, 1979; Parnas and Weiss, 1987);

While the design is being implemented (transformed into programming structures);

While the implementation of the system is being tested, since this may reveal logical inconsistencies in its behaviour;

The degree to which the design will need to be changed depends solely on the particular form and type of error.

Inconsistency between the design and the specification is more likely to be detected during testing.

The term 'verification' is usually used for this task of checking design against the specification for the system.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

57

Page 58: SDE Complete Notes

CMRIT Redefining Quality Education

Inconsistency between the design and the actual needs of the user is a much more difficult issue, although again it may be assisted by the use prototypes. The procedure of checking for such inconsistencies is normally termed 'validation’.

Boehm has provided a very useful way to distinguish clearly between the action of verification and validation:

o Verification: are we building the product right?o Validation: are we building the right product?

Any inconsistencies in a design, whatever their form, need to be detected and identified at as early a stage as possible, so that a decision can be made about what to do. The later in development they are detected, the larger a task it will be to put them right. An error in the design costs ten times as much to fix if it is detected during the testing phase as it would if it were detected during the implementation phase.

Unfortunately, since the main error-detecting tasks are performed later on in life-cycle, errors in specification and design can prove costly to fix when compared with errors in coding.

Prototyping offers one such approach, although there are some possible side-effects to this approach that can reduce its cost-effectiveness

Another economic issue that needs to be considered is the cost of making changes to a system. Most software-based systems evolve with time, undergoing enhancements and changes as the needs of the users alter, the environment alters, and faults in performance are identified. Lientz and Swanson (1980) studied the types of software maintenance activity that occur in practice, and identified three main forms.

1. Perfective maintenance is concerned with extending and improving a system once it is operational, typically by providing new forms of functionality requested by users.

2. Adaptive maintenance is performed in order to meet needs for change that are imposed from outside (examples of these might be changes in legislation affecting a financial package, change of operating systems, or any similar type of change that arises from external factors).

3. Corrective maintenance is performed to fix any 'bugs' that may be detected in the operational system.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

58

Page 59: SDE Complete Notes

CMRIT Redefining Quality Education

DESIGN QUALITIES

4.1 Assessing design quality

When you can measure what you are speaking about, and express it in numbers, you know something about it, but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind.' (Lord Kelvin.)

Figure 4.1 shows an initial set of mappings that can be constructed to link these ideas. The key terms used in the figure can be interpreted as follows.

Quality concepts are the abstract ideas that we have about what constitutes 'good' and 'bad' properties of a system, and which will need to be assessed by the designer when making decisions about design choices.

Design attributes provide a set of measurable characteristics of the design entities and so provide mappings between the abstract idea of a property and the countable features of an actual design.

Counts are concerned with realizing the design attributes, and so involve identifying the lexical features of a representation that will need to be counted in order to obtain some form of values for the metrics.

The mapping from a measurable characteristic to a set of good and unambiguous counting rules to be used with a particular implementation language is essentially one of transformation. The mapping from a quality concept to a set of measurable characteristics is much more a case of making an interpretation.

McCabe's metric is also a good illustration of the point made above that a numerical value does not necessarily imply a ratio scale. We need a fuller model to help identify the mappings required.

An expanded form of the framework provided ill Figure 4.1 is shown in Figure 4.2: here the idea of a quality concept has been expanded into three further levels in which:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

59

Page 60: SDE Complete Notes

CMRIT Redefining Quality Education

Use identifies the purpose of making measurements;

Quality factors determine the quality concepts that are associated with the purpose;

Quality criteria relate the requirements-oriented properties of the intended system to the solution-oriented properties of the design itself, and these are then mapped onto a chosen set of metrics.

The 'ilities': The 'ilities' form a group of quality factors that need to be considered when making any attempt to assess design quality.

reliability efficiency maintainability usability

4.3 Quality attributes of the design product

A number of ideas about design quality concepts have been examined, it is clear that die two principal problems that they present for measurement are:

To identify a set of design attributes that are related to these properties;

To find ways of extracting information about these attributes from the available forms of design document.

Simplicity: While simplicity cannot easily be assessed, one can at least seek measures for its converse characteristic of complexity.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

60

Page 61: SDE Complete Notes

CMRIT Redefining Quality Education

Complexity of control flow (McCabe, 1976), concerned with the number of possible paths of control during execution of a program unit;

Complexity of structure in terms of information flow around the system (Henry and Kafura, 1984; Kitchenham et al., 1990; Shepperd and Ince, 1993);

Complexity of comprehension, as measured by the number of different identifiers and operators (Halstead, 1977);

Complexity of structure in terms of relationships between system elements (primarily object-oriented forms), with the measures proposed in Chidamber and Kemerer (1994) being particularly widely cited, although by no means the only candidates (Briand et al., 2000).

Modularity: To a make good use of a modular structure, one needs to adopt a design practice based on a separation of concerns. Simply defining interfaces is not enough: a designer needs to group functions within modules in such a way that their interdependence is minimized. Such a grouping results in a-less complex interface to the module: in the case of hardware, it may simply be that fewer interconnections are required; for software, we need to find other criteria in order to measure this factor.

Viewed generally, and also from a software perspective, finding a suitable scheme of modularity to apply in solving a given problem provides at least the following benefits:

Modules are easy to replace;

Each module captures one feature of a problem, so aiding comprehension, as well as providing a framework for designing as a team;

A well-structured module can easily be reused for another problem.

Two useful quality measures that have long been used for the purpose of assessing the extent of modular structuring in software are 'coupling' and 'cohesion'.

Coupling is a measure of inter module connectivity, and is concerned with identifying the forms of connection that exist between modules and the 'strength' of these connections.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

61

Page 62: SDE Complete Notes

CMRIT Redefining Quality Education

'Cohesion, in its turn, provides a measure of the extent to which the components of a module can be considered to be 'functionally related'. The ideal module is one in which all the components can be considered as being solely present for one purpose.

Information-hiding: This concept is related to that of modularity, but it also incorporates additional notions about managing information in a system. The basic concept encourages the designer to keep information about the detailed forms of such objects as data structures and device interfaces local to a module, or unit, and to ensure that such information should not be made 'visible' outside that unit (Parnas, 1972).

It also makes it possible to change the detailed form of implementation without requiring changes in any of the units that make use of this stack.

The detailed forms in which these attributes manifest themselves in software systems are somewhat elusive, although the concepts involved are generally quite tractable.

Identifying attributes that are the direct inverses of those described above is a significant problem. However, the following undesirable characteristics of a design can be considered to stem from the presence of the inverse properties.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

62

Page 63: SDE Complete Notes

CMRIT Redefining Quality Education

Having many copies of 'state' information spread around the system. This complicates the updating of information, and may lead to inconsistencies in system behaviour.

Using interfaces that are too complex. In programming terms these are usually characterized by procedures that have too many parameters, some of which may not even be necessary. In design terms, they are more likely to be identified by the degree of information flow associated with them.

The use of excessively complex control structures. This may indicate design modules where the-designer has chosen unsuitable interfaces and data structures.

Needless replication of information. This can also be reflected in module interfaces: for example, procedures may pass a complete record as a parameter, when only one field of the record is relevant to their operation.

Using modules that lack 'functional strength'. Program units of this type are not well focused in terms of their purpose, and may well be parametrized for use on different tasks.

4.3.2 Assessing design quality

A technique that has proved itself useful in assessing design structure and likely behaviour is the review, or walkthrough. The use of reviews for this purpose is quite well established, and a set of basic rules has been assembled from experience (Yourdon, 1979; Weinberg and Freedman, 1984; Parnas and Weiss, 1987).

While a design review cannot provide any well-quantified measures of 'quality', it can help to identify weaknesses in a design, or potential weaknesses that might arise as details are elaborated.

The eight requirements that they identify for a good design are that it should be:

Well structured: consistent with chosen properties such as information-hiding; Simple: to the extent of being 'as simple as possible, but no simpler'; Efficient: providing functions that can be computed using the available resources; Adequate: meeting the stated requirements; Flexible: able to accommodate likely changes in the requirements, however these might

arise; Practical: module interfaces should provide the required facilities, neither more nor less; Implementable: using current and available software and hardware technology; Standardized: using well-defined and familiar notation for any documentation.

4.4. Assessing the design process

Ensure some particular degree of quality in the product, the quality of the design process is obviously an important factor that needs to be considered when seeking to understand design quality issues.

Watts Humphrey has drawn together a valuable survey of quality issues applied to software development processes. In particular, within his 'Software Process Maturity Model', he identifies five levels of maturity that occur in the processes that an organization uses for producing software systems.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

63

Page 64: SDE Complete Notes

CMRIT Redefining Quality Education

Initial: The software process is characterized as ad hoc, and occasionally even chaotic. Few processes are defined, and success in a project depends upon individual effort.

Repeatable: Basic project management processes are established and used to track cost, schedule and functionality. The necessary process discipline is in place to repeat earlier successes on projects with similar applications.

Defined: The software process for both management and engineering activities is documented, standardized and integrated into an organization-wide software process. All projects use a documented and approved version of the organization's process for developing and maintaining software.

Managed: Detailed measures of the software process and product quality are collected. Both the software process and the products are quantitatively understood and controlled using detailed measures.

Optimizing: Continuous process improvement is enabled by quantitative feedback from the process and from testing innovative ideas and technologies.

To improve the quality of the design process it is particularly necessary to find ways of including input to design activities that can provide:

Domain knowledge about the type of problem involved, and about important aspects of any implementation features;

Method knowledge that helps with understanding any design techniques being used; Experience from similar projects, wherever available.

There are three widely adopted ways of providing these inputs to the design process.

1. Technical reviews were outlined in the previous section; their use allows the design team to gain knowledge from the experiences of others, and particularly from any domain and method knowledge that they might possess. While this form of input is largely aimed at improving the design product, it can also have a significant impact upon the design process by identifying useful techniques or notations that might be applicable to a particular problem.

2. Management reviews are primarily concerned with developing and refining estimates of effort and deadlines for the project as a whole, and with gathering any data that might be needed for such estimates. The task of estimation is one that draws heavily upon both domain knowledge and experience, since it requires the use of these to make the projections needed.

3. Prototyping provides the means of gaining both domain knowledge and some forms of experience about a particular problem. By constructing suitable prototypes, it may therefore be possible to supplement the knowledge and experience available to both management and the design team.

The quality of design documentation (and in larger projects the quality o any configuration and control procedures used for organizing this documentation plays an important role in establishing a high-quality process by reusing experience.)

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

64

Page 65: SDE Complete Notes

CMRIT Redefining Quality Education

While the use of standard notations for design, and of specific forms of design practice, cannot ensure quality in either the design product or the design process, it should be clear by now that their use is likely to be highly influential.

DESCRIBING A DESIGN SOLUTION

5.1 Representing abstract ideas

A representation is used to provide a particular abstraction of the characteristics of a system, and is typically needed for such purposes as:

capturing the designer's ideas for a solution; explaining the designer's ideas to others (such as customers, fellow designers,

implementers, managers); checking for consistency and completeness in a solution.

A representation, whatever its form, can help the designer to concentrate his or her attention upon the; issue that is most important to them at any particular stage of the design process. In particular, it aids the designer by providing a mechanism for reducing the problem of 'information overload’.

Representations can also be employed across a wide range of levels of abstraction.

Software designers similarly use a range of levels of abstraction, although the invisible nature of software provides a particular problem in terms of how to describe the properties involved. Software design techniques tend to make extensive use of various forms of box and line notations to provide visual descriptions that are intended to represent the various properties of software.

The objective of design is to solve problems, not to be 'politically correct' in its use of a form.

Because representations provide particular abstractions of a system, they are closely linked to the concept of a viewpoint.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

65

Page 66: SDE Complete Notes

CMRIT Redefining Quality Education

A representation is the means that we use to capture certain properties of a design, and it should not be regarded as being the design itself. This concept of viewpoint as a projection of a design model is illustrated in Figure 5.3

The use of the term ‘viewpoint’ in this book does differ somewhat from the way that it is apt to be used in requirements engineering, where the term is used to describe ‘stakeholder’ views of the model (Finkelstein et al., 1992).

5.2 Design viewpoints for software In order to describe system-oriented properties, the designer usually needs forms that

describe the dynamic behavior of the system. For more detailed solution-oriented design needs, which are often concerned with describing ‘constructional’ issues such as packaging, procedure hierarchy, and date organization, the chosen forms will generally focus on static design attributes.

The nature of software and the many paradigms that exist for developing software systems, based on different structuring criteria, has led to the use of large number of design representations (Webster, 1988; Harel, 1992; Wieringa, 1998). These can be broadly classified as follows:

Constructional forms, in which the viewpoint is concerned with essentially static

aspects of the system;

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

66

Page 67: SDE Complete Notes

CMRIT Redefining Quality Education

Behavioral forms, a set of viewpoints that seek to describe the causal links between events and system responses during execution;

Functional forms, viewpoints that seek to describe what the system does in terms of its tasks;

Data-modeling forms, concerned with the data objects used within the system, and the relationships between these.

These representations can all be classified as 'direct' viewpoints, in that they are created directly by the designer. A further class of viewpoints can be described as 'derived' viewpoints (Budgen and Friel, 1992), shown in Figure 5.7

5.2.1 Constructional forms

These are primarily concerned with describing how the various software-structuring forms provided in programming languages, mark-up languages, etc. are to be used in the final system. Some of the constructional forms described by this viewpoint include:

Data specification, which may include files of data, files containing information about the organization of a program (such as a .h header file), and data in the form of mark-up languages such as HTML and XML;

Threads of execution, usually in the form of sub-program organization, but also including constructs for handling parallel threads of execution;

Packaging constructs, such as the Java class or the Ada package, where such constructs may be used to construct some form of ‘scope wall’ around sections of the system, or to create inheritance hierarchies.

An important part of the description involves specifying the relationships and dependencies that will exist between the elements of the system. Typically, these are such forms as:

Data flow, concerning the sources and forms of data; Invocation, describing how the 'flow of control' is managed between program elements; Uses hierarchy, describing the dependencies that exist between classes (Parnas, 1979).

Generally, this viewpoint is concerned with modeling static structures rather than with any form of run-time behaviour.

While this viewpoint is largely used to describe the outcomes of the design process, it can also be used at a more abstract level when considering major units that might be used in some overall design plan.

5.2.2 Behavioral forms

These are essentially concerned with causal issues, connecting an 'event' to a 'response' via any necessary conditions.

Most of these forms can be considered as examples of finite-state machines, being concerned with the transitions that occur between different states of a system (waiting, processing, output and so on), and the conditions that are required to make them occur.

Sequencing aspects can be described fairly well;

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

67

Page 68: SDE Complete Notes

CMRIT Redefining Quality Education

Fixed-interval descriptions are also fairly tractable, although their use is mainly restricted to particular features of real-time systems;

Constraint effects are very difficult to capture and describe using existing forms of description.

5.2.3 Functional forms

One of the hardest tasks for the designer is to describe exactly what it is that a system does.

At the detailed design level such forms are generally needed to describe the runtime behaviour of program elements such as subprograms.

5 2.4 Data-modeling forms

Description of data structures need not be a very significant issue in architectural design terms; it is often a critical aspect of a detailed design. Include such dependencies as: type (both in compounding types to create new ones, and in such mechanisms as inheritance, used to create new ‘classes’); sequence; and form.

Modeling of data structures, which themselves may well be imposed by external factors, is often seen as being more a task for analysis than design. Whatever the role, the data-modeling notations do tend to be used primarily in white box roles, due to the relatively detailed nature of the information involved.

TRANSFERRING DESIGN KNOWLEDGE

6.1 The architecture concept

6.2.1 What is architecture?

The term architecture has been used for many years within the software development world in a very informal manner.

The role of the architect has long been one that is associated with a quite specific domain of design, namely buildings. The architect may choose to do so, but in general, it is not expected of him or her.

We also have the concept of the 'computer architect' who designs the top-level structures of a computer, usually referred to as its 'architecture’. Beginning with the IBM 360/370 range, the idea of a 'family' of computers with a generally consistent form (typically described using such terms as RISC, pipeline, etc.) became the norm. By providing a consistent platform for executing software elements, this opened up great opportunities, both in terms of the marketplace, and also by making it possible for software to evolve and migrate, rather than needing to be rewritten for each new generation of computers.

Perhaps a little inconsistently though, an architect does not design an architecture, but rather a solution to address a particular need. The role of architectural style is to provide a framework for that design task, by identifying a general set of characteristics (the style) that relate to the problem and which have been employed successfully on similar problems.

In practice, most authors seem to consider this to be an abstract top level description of a design, expressed in terms of its major elements and their general form. The way we express

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

68

Page 69: SDE Complete Notes

CMRIT Redefining Quality Education

this is also apt to provide a description of its style and, for our purposes, the term architectural style is often the most useful one to employ.

The notion of an architectural style can perhaps best be viewed as something that provides a very abstract description of a particular set of general characteristics of a solution.

So what roles can the idea of architectural style provide when applied to software systems?

Firstly, the role of providing a very abstract description of the overall form is still an appropriate one, although this is more likely to be expressed in terms of constructional forms than epoch.

Secondly, as mentioned above, the concept may assist with identifying where there is potential for some degree of ‘mismatch’ to occur between the forms of the elements used to construct a software-based system.

Thirdly, it tells us something about the type of constructional notations that are likely to be useful for describing a particular solution.

The concept of architecture can have an impact upon at least the following five aspects of software development.

Understanding. This stems from the way that architectural concepts provide an abstract vocabulary that aids understanding of a system's high-level design.

Reuse. This partly relates to the idea of the component.

Evolution. Garlan and Perry argue that ‘software architecture can expose the dimensions along which a system is expected to evolve'. As such, therefore, it provides a guide to the ideas and aims of the originators, for use by those entrusted with its later maintenance and change.

Analysis. Here an architectural style offers a framework that can provide the basis for checking various features of a design.

Management. The arguments here are largely concerned with the role of architecture as an aid to planning and, in particular, of planning for change.

6.2.2 Classifying architectural styles

In Perry & Wolf (1992), the authors proposed an initial classification scheme in the form of:

through which an architecture (and hence a style) could be considered as being defined by a set of (design) elements that have a particular form. The particular elements that they identified were:

processing elements data elements connecting elements

Where the connecting elements could also be processing or data elements. Examples of connecting elements include such mechanisms as procedure calls, messages, shared data repositories, etc.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

69

Page 70: SDE Complete Notes

CMRIT Redefining Quality Education

The rationale was intended to capture the motivation for particular choices.

In contrast though, the scheme adopted in Shaw and Clements (1997) is somewhat more elaborate. Here the authors categorize architectural styles in terms of the following major features:

the kinds of components and connectors that are used in the style;

the ways in which control (of execution) is shared, allocated and transferred among the components;

how data is communicated through the system;

how data and control interact;

the type of (design) reasoning that is compatible with the style.

6.2.3 Examples of some software architectural styles

To illustrate the concepts involved, we will look at three examples of widely encountered architectural style.

Pipe and filter

This style is essentially one based upon the transformations that are centered around the dataflow that occurs within some form of network.

In a pipe and filter architectural style, the components are typically processes that transform an input data stream into an output stream (the ‘filters’), connected together by some form of dataflow mechanism, which may occur in a synchronous or asynchronous manner.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

70

Page 71: SDE Complete Notes

CMRIT Redefining Quality Education

Call and return

The concept of an ordered and hierarchical transfer of control from one processing element to another underpins this style. Unlike the more data-driven 'pipe-and-filter' style, which is essentially non-hierarchical, the call-and-return style places much greater emphasis upon control aspects rather than upon data transfer issues. A call-and-return style is therefore closely linked to the traditional program structuring form of 'main program' and 'subprograms’.

Data-Centered Repository

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

71

Page 72: SDE Complete Notes

CMRIT Redefining Quality Education

This style describes systems in which the key element is some central mechanism used for the persistent storage of information which can then be manipulated independently by some arbitrary number of processing units. Shaw and Clements (1997) also argue that client-server forms come into this general category, on the basis that the server acts as a repository and, indeed, often incorporates a database. Figure 6.4 provides an illustration of the general form of a client-server system.

In the case of a database system, the central mechanism is generally concerned with providing some form of indexed access to a (potentially) large volume of data. Blackboard systems can be regarded as rather more 'freestyle' variants on this, with the data now being representative of some form of 'knowledge' and with the control and sequencing of any updates being much less tightly controlled. Table 6.4 provides a summary of this architectural style.

There are obviously many other styles, of which good examples include object-oriented and event-driven architectural forms, and some of these will be discussed in later chapters on design practices. However, the above three offer good examples that illustrate the basic concepts.

6.2.4 The role of the architectural concept in knowledge transfer

At this stage, the obvious question is: 'what role do these ideas perform in terms of the task of designing software?' A number of answers to this question were suggested by Garlan and Perry (1995) and were reviewed in Section 6.2.1. Taking a slightly narrower focus, in terms of the issues that, we can identify the following key rules.

Providing a framework and vocabulary for top-level design ideas: An important element in designing is to determine what the overall form (architecture) of a system is to be. Is the best choice to use a set of processes connected as a pipeline; a network of distributed processing elements; or a centralized database? Sometimes this choice is more or less pre-determined by context, but this is not always the case. These ideas therefore provide both a framework for deciding on the overall form of a solution, and a vocabulary for describing it to others and hence for discussion.

Determining the choice of design strategy: One of the consequences of choosing an architectural form for a solution is that we then need to find some way of achieving that

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

72

Page 73: SDE Complete Notes

CMRIT Redefining Quality Education

solution, whether it is by using the forms described in the rest of this chapter, or by less 'formal' means. Choice of a style affects both the strategy and the choice of notations used to support it and describe the eventual solution. For example, choosing a call-and-return style would suggest that we might begin by considering the functionality of the overall system, or choosing to use a transaction centred form may suggest that we should begin by thinking about the data forms involved.

Assisting with later changes: An important element in successfully updating an existing system is to understand the ideas and intentions of the original designer(s) (what Perry and Garlan refer to as 'evolution'). Changes that preserve the overall architectural integrity are likely both to be more successful and to leave scope for further changes in the future. Since many design tasks occur within a larger operational context, these concepts provide a valuable aid to identifying such constraints and hence to preserving the structure of a system.

This section has introduced some important ideas that will be employed in the later chapters. Like so many of the elements that make up the software design context, the major value of the concept of architectural style lies in this ability to describe the broad picture, and placing too much emphasis on detailed classification may risk being counter-productive. Most of our use of this concept will therefore be for describing high-level characteristics of different design forms, although occasionally we may need to be specific about some of the more detailed characteristics that were described in the previous subsections.

6.3 Design methods

A design method can be regarded as providing a procedural description of how to set about the task of producing a design solution for a given problem.

While the idea of design methods is not one that is confined to software, as demonstrated in Jones (1970), software design methods are generally much more detailed and prescriptive than those which arise in other domains, which takes a quite different and much less prescriptive approach to teaching about the design process than is commonly adopted with software. The rapid development of the computing industry since the 1960s has led to a drastically

escalating need for design and development skills over the past 30 years. Traditional master/pupil mechanisms for transferring knowledge could not have coped with this, and the design method has provided one of the ways in which design knowledge could be conveyed to large numbers of people with design responsibilities.

Rapid developments in software technology have also meant that some means of providing peer-to-peer knowledge transfer has also been needed if practitioners are to be kept informed, and again this role has been partly filled by the use of design methods.

The invisibility of software (Brooks, 1987) has made it necessary to create artificial frameworks for its description (including design notations) and the design method has become an integral part of that framework, providing both an explanation of how these abstract forms can be developed and deployed and also a vocabulary for doing so.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

73

Page 74: SDE Complete Notes

CMRIT Redefining Quality Education

Through its procedures and notations, a design method implicitly produces a design solution that embodies a particular architectural style. This leads to one other observation about the rather unique role that design methods play in the software domain.

Studies of experienced designers have tended to suggest that they are only likely to follow design method practices where they do not feel confident about their 'domain knowledge. In other words, an expert in designing compilers might feel less confident when asked to design (say) a transaction processing system for a bank and hence might employ a design method for this, when they would certainly not do so in developing a new compiler. Studies of method use also suggest that few designers follow a given method completely, and that they tend to use experience to adapt the procedures in varying degrees (Hardy et al., 1995).

One other question is why the development of new design methods enjoyed greater popularity and importance during the 1970s and 1980s, whereas, since the early 1990s, they have played a less prominent role, at least in the software engineering literature. Again, this is partly a matter for conjecture, but one possible reason is the increasing complexity of software structures.

Design patterns are not procedural; they share some of the role of methods in that they are concerned with the processes of producing a design solution, but also retain a strong element of product modeling.

6.4 Design patterns

The concept of the design pattern is very much associated with the object-oriented architectural style, although in principle there are no reasons why patterns could not be employed with other styles.

The concept of the design pattern is rooted in the work of the architect Christopher Alexander (Alexander et al., 1977), who describes it in the following words:

'Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.'

This concept has been taken up for software (or, more specifically, for object-oriented software) by the 'pattern community’.

Essentially, a pattern is a generic solution to a problem, which itself is likely (almost certain) to be a part of a bigger problem.

In some ways, the idea of the pattern comes much closer to embodying the traditional master/apprentice model for transferring knowledge and expertise than design methods can possibly achieve.

The pattern idea also matches some of the observed practices of designers. One of the characteristics of expert design behaviour that was observed in Adelson and Soloway (1985) was the employment of 'labels for plans', where a designer would recognize and 'label' a sub-problem that they knew how to solve, leaving them free to concentrate on the less familiar aspects of a problem.

Patterns are of course no more of a panacea than any other approach that we might choose to adopt for organizing the transfer of design knowledge. Very few design problems

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

74

Page 75: SDE Complete Notes

CMRIT Redefining Quality Education

present features that are entirely new and original and so, as such, the pattern concept does recognize and embody’ a useful level of reuse of design knowledge.

As with design methods, one question that we need to ask is whether the use of patterns will lead to 'good' solutions.

The design pattern concept is not restricted 'to use in 'detailed design' activities.

DESIGN REPRESENTATIONS

Table 7.01 The selection of black design representations

Representation form Viewpoints Design CharacteristicsData-Flow Diagram Functional Information flow, dependency of

operations on other operation, relation with data stores

Entity-Relationship Diagram

Data modeling Static relationships between design entities

State Transition Diagram Behavioural State-machine model of an entity

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

75

Page 76: SDE Complete Notes

CMRIT Redefining Quality Education

State chart Behavioural System-wide state model, including parallelism (orthogonality), hierarchy and abstraction

Structure Diagram (Jackson)

Functional, data modeling, behavioural

Form of sequencing adopted (operations, data, actions)

UML: Class Diagram Constructional Interactions between classes and objects

UML: use Case Diagram Behavioural and functional Interactions between a system and other ‘actors’

UML: Activity Diagram Behavioural and functional Synchronization and coordination of system activities

Table 7.2 The selection of white box design representations

Representation form Viewpoints Design CharacteristicsStructure Chart Functional and

constructionalInvocation hierarchy between subprograms, decomposition into subprogram units

Class and Object Diagrams Constructional Uses relationships between elements, interfaces and dependencies

Sequence Diagrams Behavioural Message-passing sequences, interaction protocols

Pseudo code Functional Algorithm form

THE RATIONALE FOR METHOD

8.1 What is a software design method?

The concept of the software design method is one that has played an important role in software development since the late 1960s.

One of the major roles of a design method is therefore to assist the designer by providing some guidance as to how the choices should be made, and how to assess the likely consequences of a particular decision in terms of the constraints it may impose on subsequent structures and choices.

A typical dictionary definition of the word ‘method’ is couched in such terms as the following: 'a way of doing things, especially a regular. Orderly procedure. The correct meaning of 'methodology’ is 'the science of method or orderly arrangement'.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

76

Page 77: SDE Complete Notes

CMRIT Redefining Quality Education

The idea of a method as a structured and 'procedural' way of doing things is one that should be familiar enough. 'Methods' are used to structure the way that we perform many routine tasks, such as making a cup of tea:

Boil the kettle; warm the pot; add the tea; pour on water; wait a number of minutes; pour the tea into the cup.

We can devise methods for organizing many other activities, from driving a car to constructing kitchen units, model aircraft and so on. However, such methods are rarely creative in quite the same sense that we consider the act of design to be creative.

A design method is generally much less prescriptive than the kind of method that we might use for making tea, or for assembling a new garden shed. Indeed, in some ways a software design method can almost be considered as a 'meta-method', in that it is used to develop new processes, which in turn are ways of doing things - where the 'doing' that is involved will be the task of the computer.

So we can reasonably expect that a design method should identify a general strategy to be used by the designer, and provide some rather general guidelines on its use, based upon experience.

Vessey and Conger (1994) have suggested that the knowledge involved in successfully employing a design method can be categorized into two forms:

Declarative knowledge, describing what tasks need to be performed at each step ir I the design process; and

Procedural knowledge, consisting of knowledge about how to employ a given method in a particular situation.

In terms of our example of making tea, the declarative knowledge would include the tasks to be performed, and the order in which they should be, while the procedural knowledge would address such issues as how much tea to add and how much water to use when making tea for four people.

Declarative knowledge is therefore fairly readily conveyed through the use of a 'do this, then do that' form of description, whereas procedural knowledge is more likely to be acquired through experience. This experience may itself be acquired directly or through exposure to case studies. Since we often express the declarative knowledge in what we term a procedural form, by specifying a sequence of actions that should be performed, this terminology can be a little confusing, although both uses of 'procedural' are quite reasonable ones!

The following three main components of a software design method were identified, and their relationships are shown in Figure 8.1:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

77

Page 78: SDE Complete Notes

CMRIT Redefining Quality Education

The representation part consists of one or more forms of notation that can be used to describe (or model) both the structure of the initial problem and that of the intended solution, using one or more viewpoints and differing levels of abstraction.

The process part describes the procedures to follow in developing the solution and the strategies to adopt in making choices. This generally involves the designer in making a series of transformations on the different forms that comprise the representation part.

A set of heuristics or clinches provide guidelines on the ways in which the activities defined in the process part can be organized for specific classes of problem. These are generally based on experience of past use of the method with a particular problem domain, or for a particular form of structure.

In terms of the classification of knowledge discussed above, the process part can be considered as embodying the declarative knowledge, while heuristics are more concerned with procedural knowledge.

Software design methods fall into two very broad and general categories. These are essentially distinguished by the forms of representation that are used, although in turn the representation forms have some influence upon the forms of process that can be used within them This division is illustrated in Figure 8.2.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

78

Page 79: SDE Complete Notes

CMRIT Redefining Quality Education

Formal methods largely depend on the use of mathematical notations for the representation parts. These notations permit a degree of consistency checking between the descriptions used in the different stages of design, as well as more rigorous design transformations.

Systematic methods are generally less mathematically rigorous in form, both in terms of the representation part - which normally consists of one or more forms of diagram - and also of the process part.

The third component of a design method, the heuristics usually consist of a set of techniques that are recommended for use in handling particular situations that may be encountered across a wide variety of problems.

8.2 THIS SUPPORT THAT DESIGN METHODS PROVIDE

One of the implicit features of design methods is that the use of any method will lead to designs that employ the architectural style associated with that method.

There are therefore two aspects of the software development process that can be expected to benefit from using a method to provide a structured and systematic approach to the development process. These are:

Technical Issues

Management Issues

'Technical issues consist of the problem-related aspects of design. There are a number of these to consider, with the relative importance of each one being somewhat dependent upon a range of external factors such as the structure of the development organization.

The 'knowledge transfer' mechanism discussed earlier suggest that experienced designers may often work in an opportunistic manner, but that this practice may be less well-formed and reliable when the designer is less familiar with a problem or its domain.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

79

Page 80: SDE Complete Notes

CMRIT Redefining Quality Education

The use of a design method should help the designer to produce a system that is structured in a consistent way, which may be particularly important if the design is being produced by a team of designers who will need to ensure that their contributions fit together correctly.

The use of a method should lead to the production of records and representations in standard form that can be used by a maintenance team to capture and understand the intentions of the original designer(s).

The use of a method should aid with managing the 'cognitive load' involved in designing a system. This should reduce the likelihood of errors in the logical structuring of the system, and should ensure that all of the factors involved in a problem are properly weighed and considered by the designer(s).

Each design method provides a particular form of 'Design Virtual Machine' (DVM), which in turn supplies the framework needed by the designer to develop his or her model of a solution.

The concept of a virtual machine is not a new one, although it is not usually applied to design methods. In computing terms, a virtual machine provides a layer of abstraction above that of the physical machine. An operating system provides a number of virtual machines, to allow programmers to access the resources of a computer at different levels of abstraction.

The user of such a virtual machine structures his or her ideas around the behavioral model that it provides.

Each programming language therefore provides a virtual machine, "'whose architecture and form are determined by the features and semantics of the programming language.

The DVM that is embodied in a particular design method is characterized by such factors as:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

80

Page 81: SDE Complete Notes

CMRIT Redefining Quality Education

the architectural style implied by the forms of design element used;

the viewpoints used in the various phases of the modeling process;

the relationships between these that are established by the form of the design process;

the basic strategy of the method itself, since this determines how the design models will be elaborated.

Together these create a set of assumptions about the general form of the solution that in turn form an essential part of the framework used by the designer.

The management benefits of using design methods are linked to many of the same issues as the technical benefits. In particular, the documentation of a system is important both for the development of the system and for its maintenance.

So from a management viewpoint, using a recognized design method will provide:

a framework for recording decisions and reasons in a systematic manner;

a set of procedures that should ensure consistency in the structure of a design, and in the structure of the interfaces between design components, so making it easier to use a team of designers on a large project;

a framework that helps with identifying important progress milestones.!

In particular, the use of a design method helps with structuring the design process as well as the design product.

All of the above issues become even more important when we consider the extent to which designers spend their time modifying existing systems, rather than developing new ones.

The need to design for change was strikingly demonstrated when the British government changed the rate of Value-Added Tax (VAT) in 1991. The billing software used by one major utility to issue its bills could not cope with a split rate of VAT - one rate applying until a given date, and a new rate after that.

8.3 WHY METHODS DON'T WORK MIRACLES

A design method provides the designer with a framework within which to organize the development of a design. It provides a set of recommended representation forms that can be used to give insight into the issues that are significant for that DVM.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

81

Page 82: SDE Complete Notes

CMRIT Redefining Quality Education

It provides guidance on the steps that the design process should follow, and advice on the criteria that should be considered when making design choices. However, none of this guidance can be problem-specific, and hence the emphasis must very much be on the notion of providing guidance.

For an actual design task, the designer's choices and decisions will need to be resolved solely on the basis of the needs of the particular problem that requires to be solved.

One analogy that it may be helpful to repeat here concerns the use of a recipe for cooking. A recipe is a process that determines how a particular dish will be produced - much as a computer program is a process that determines how a graph will be drawn, or how tax rebates will be calculated.

Designing software is therefore rather like designing a recipe - it requires the designer to possess insight into the problem domain, to be aware of the potential that is present in the basic materials, and to know the bounds upon the capabilities of the system that will execute the process.

A design method intended for producing recipes might be able to provide some guidance as to how a recipe should be organized, presented and described, and would be able to provide advice on:

o how to layout the instructions to the cook;

o the best use of photographs, tables and so on;

o making suggestions about possible variants.

Because a software design method provides a form of 'process' that is used to design another process, it is all too easy for the inexperienced to fall into the trap of believing that a design process is itself a recipe - but that is not so at all, as the above example demonstrates. Instead, a recipe is something that is output from the design process, rather than being the model for the design process itself.

One way in which it is possible to increase the amount of guidance from a method slightly is to focus it upon a particular domain of problems.

To make their forms as prescriptive as possible, design methods are based on de ning a set of carefully itemized sequences of actions that should be performed by a designer.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

82

Page 83: SDE Complete Notes

CMRIT Redefining Quality Education

However, observed design practices suggest that experienced software designers may work on several different threads of action in parallel, and that these may also be a different levels of abstraction.

A design method that is described purely in terms of sequential actions can provide only a very inadequate approximation to expert behaviour, although this might be partly offset by the iterations that are necessary in design activity.

8.4 PROBLEM DOMAIN AND THEIR INFLUENCE

All software design methods expect the designer to begin the design process by building some form of model of the real world problem i.e. to be solved.

The basis for model-building can vary quite considerably, but usually involves mapping the characteristics of the original problem into one or more of the following viewpoints:

Function

Information flow

Data Structure

Actions data objects

time ordering of actions.

Any attempt to classify problem domains in other than a very general way will usually lead to difficulties, because real problems are rarely easily categorized in a simple manner. However, some rather general domains can be identified, and there are three in particular that are useful.

In batch systems the main feature is that all the operating characteristics of the system are essentially determined when it begins processing one or more data stream. Any changes in these characteristics arise because of the contents of the streams, when considered as sequential flows of data. Such a system should therefore perform operations that are deterministic and repeatable. An example of a batch system is a compiler, all the actions of which are determined by the nature of the input source program. It goes without saying that compilation should be deterministic!

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

83

Page 84: SDE Complete Notes

CMRIT Redefining Quality Education

The principal characteristic of reactive systems is that they are event-driven. For such systems, the events are almost always asynchronous and non-deterministic. An obvious example of such a system is a screen editor, for which the operations of the process depend upon the events that are generated externally, by the user. A commonly encountered subsidiary characteristic of such systems is that the specifications of the required responses to events will often include explicit requirements about timing.

Concurrent systems are characterized by the use of multiple threads of execution within the problem, so that a solution might utilize one or more processors. For such systems, the process of design may need to consider such issues as the overheads of process scheduling, as well as the need for mutual exclusion and synchronization between processes.

These classifications should not be considered as mutually exclusive: while a system is unlikely to have both batch and reactive aspects, either of these forms could well have concurrent features.

Different approach to classifying problem domains is to consider how lh se influence the designer's goals. To illustrate this, consider the distinction between the following two classes of design problem.

Problems where the form and content of the data guide the designer's actions. Examples occur in such applications as transaction-processing systems, in which the key criterion is to process the data correctly, and there is no time constraint beyond that of processing the necessary volume of transactions within a particular time interval.

Problems where the existence and content of data will guide the designer's actions. This is more typical of the domain of real-time systems, where the occurrence of the event will be highly significant together with the need to process the data within a time interval determined by the nature of the data itself and before it is replaced by new data.

The first case a design method is required that allows the designer to check thoroughly for correct behaviour, and to verify this in some way.

The second case also has these needs, but adds the requirement that correct performance of the eventual system must be guaranteed. Each of these domains will require design practices that help to focus attention on the aspects that are most critical, as illustrated in Figure 8.5. The next chapter begins to examine what forms these might take.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

84

Page 85: SDE Complete Notes

CMRIT Redefining Quality Education

_________

DESIGN PROCESSES AND DESIGN STRATEGIES

9.1 The role of strategy in methods

The process part of a method is closely entwined with the representation part, since it provides 'procedural' guidelines on how the models should be developed.

Figure 9.1 shows this procedural model of the software design process in a symbolic fashion. The basic symbols it uses to describe a design method are:

an oblong to denote a representation form; I – M.Tech. – I – Semester (CSE) Software Design & Engineering

85

Page 86: SDE Complete Notes

CMRIT Redefining Quality Education

an oval to denote a procedural step; an arc to denote the sequence of steps.

These can be seen more fully in Figure 9.2, which shows a slightly expanded form of Figure 9.1.

Typical process part of design methods, we made the distinction between a ‘transformation' step and one concerned with elaboration’. Now that we need to consider design processes an strategies in rather more detail, it is useful to examine this categorization more closely. This is because each of the procedural steps of any design method, regardless of the strategy employed, can usually be classified as being one of those two forms.

These two forms have quite distinctive roles and characteristics, which can be described as below.

A transformation step is one where the designer modifies the structuring for their model of the 'system' in some way. Typically this consists of reinterpreting it using a different viewpoint. Such a step will require the designer to make some fairly major design decisions and is clearly a strongly creative one.

An elaboration step is one which does not usually involve any change of viewpoint, but is more concerned with restructuring or reorganizing the design model within the current viewpoint. The purpose of an elaboration step is usually either to add further information to the model, or to obtain greater insight into the current state of the design plan through restructuring, and as such it may be an essential preliminary to a successful transformation step.

It is important to recognize- that both types of step involve creative actions, although the forms that the creativity takes are somewhat different.

Process model, that developed by Potts and Bruns does provide the means of performing a more detailed analysis of the factors involved in making individual design decisions, and an example of this is shown in Figure 9.4.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

86

Page 87: SDE Complete Notes

CMRIT Redefining Quality Education

Their model is based on the use of five entity types (the boxes) and eight binary relationships (the arcs). The relationships operate as follows (Potts, 1989).

Steps modify artifacts. In 'derivation', a new artifact is created. In 'revision', a new version of an existing artifact is created.

Steps raise issues. This may occur automatically, but the issue may not have to be addressed immediately.

Issues review artifacts. An issue may be raised to review the property of an artifact. Positions respond to issues.

Arguments support positions.

Arguments object to positions. Arguments are often paired, with one supporting a position and the other opposed to it.

Arguments cite artifacts. The artifact provides evidence for the argument.

Positions contribute to steps. A step is performed because a set of commitments has been made.

The design transformation and elaboration steps in a method can be considered as embodying local tactical decisions, which are in turn guided by the strategy that is adopted by a particular method. Strategic issues, for their part, are generally concerned with large-

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

87

Page 88: SDE Complete Notes

CMRIT Redefining Quality Education

scale factors such as the domain of a particular problem, specific constructional and behavioural characteristics and likely forms of implementation.

There is also a historical perspective to this issue of how the design process is performed. David J. Koepke (1990) has recorded his research into the evolution of software design ideas and has described how thinking about software design has developed and evolved.

A major factor in the development of thinking about software design has been the way that the concept of a module has been 'interpreted and defined.

Software design methods are not influenced by technical issues alone, of course. There are environmental, cultural, organizational and national influences, as well as the continually increasing scale of user expectations and need as systems have become ever larger and more complex (Curtis et aI., 1988).

Many factors have influenced the development of design methods, and for that reason they are difficult to classify in any very systematic manner. For the purposes of the rest of this chapter, though, we will use the following broad groupings in order to discuss how strategy is incorporated into a design method: decompositional methods, which generally take a 'top-down' view of the design process,

developing the design model through a process of sub-division;

compositional methods, whereby the basic design model is built up from the identification of 'entities' of some form;

organizational methods, for which the structure of the design process is strongly influenced by the requirement that it should conform to non-technical requirements that are based on the form of the organization;

template-based methods, where a specific problem domain provides a class of problems that can be tackled using a fairly standard strategy.

Design strategies tend to encourage the designer to focus on structuring core activities of the eventual system in building up a model of a problem.

As a result, such issues as the organization of human-computer interactions (HCI), and the handling of error conditions, are generally deferred until a later stage in the design process, when the design model is being refined and elaborated.

This is generally a reasonable practice to adopt, particularly for such issues as exception-handling, since any attempt to include these in the initial model may lead to it becoming excessively complex. The designer is then faced with the following alternatives when determining how to incorporate these issues:

to incorporate them into the later stages of design refinement, by which time architectural decisions may have been made that are inconsistent with their needs;

to repeat the design process from a much earlier stage, using the experience gained from producing a design for the basic problem to help with the greater complexity of the fuller problem.

9.2 DESCRIBING THE DESIGN PROCESS – THE D-MATRIX

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

88

Page 89: SDE Complete Notes

CMRIT Redefining Quality Education

D-Matrix ('Design Matrix') notation, which is intended to provide an abstract description of the state of the 'design model' at any point in its evolution (Budgen, 1995). The D-Matrix is totally independent of any specific methods.

9.2.1 THE D-MATRIX FORMALISM

The basic assumption for this notation is that any design specification can be composed from the specifications for a set of 'design elements', where each element can itself be described in terms of a set of attributes that describe the properties associated with the four major viewpoints. The actual form of the elements, the set of attributes, and their description, will of course be dependent upon the design approach adopted and the architectural style that this employs.

At any given point in the design process, the current state of the 'design model' is therefore represented by a matrix. This has a column for each of the, and four rows that represent the attributes of each element within one of the viewpoints. Rather than ordering the rows, the superscripts b, f, d and c denote the viewpoints (the last of these was denoted by sin Budgen (1995). Similarly, numerical subscripts are used to identify individual design elements.

So, an example of such a matrix, describing n design elements, with full descriptions available for each element, will have a form such as:

Where the column

Dbi

Dfi

Ddi

Dci

represents the attributes that describe the properties of the ith design element.

Specific design representations (for example, a set of STDs) can then be regarded as being projections from the set of attributes that are described along a single row, as in the set:

{Ds1, Ds

2, ... , Dsn}

At the beginning of the design process itself, the requirements specification will usually describe the black box properties of the system as though it were a single element. So this can be described as a matrix with one column (and hence no subscripts), as in:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

89

Page 90: SDE Complete Notes

CMRIT Redefining Quality Education

Here the empty set symbols Ød and Øc are used to indicate that there are no data modeling or constructional attributes present in the.

To conclude this introduction to the basics of the notation, we need to consider how it can be adapted to cope with the abstractions that are created when we employ a hierarchical representation such as the DFD or State chart form. With one constraint, this can be achieved by only a slight extension, which involves replacing the column in the matrix that is currently representing the ith design element

Dbi

Dfi

Ddi

Dci

by a set of columns that represent the properties of the sub-elements. These are in turn distinguished by using a second index value in the subscript, so that if the ith element were to be replaced by three sub-elements (say), we would now have the columns

The only constraint that this imposes is that a given abstraction needs to be described in terms of the same set of sub-elements in each of the different viewpoints. In practice this does not create any real problems when describing the practices of design methods, although it does limit our ability to describe some opportunistic design sequences.

9.2.2 DESCRIBING DESIGN TRANSFORMATIONS

The process parts of procedural design methods generally consist of a sequence of ela1oration and transformation steps, and these will be denoted by the transformation symbols Ei and Ti, where the superscript indicates that this is the ith step of the process.

To conclude our introduction to the D-Matrix concepts, we therefore examine two very simple examples of elaboration and transformation steps.

In our first example, the designer expands the DFD shown in Figure 9.5(a) into that shown in Figure 9.5(b), by restructuring one of the bubbles into three bubbles. Since we are using our notation to show how such a step is represented in this particular case, we will not be too concerned about the reuse of the index value 3 for a different element, although obviously this would be significant in practice! Assuming that this is the designer's third design 'step', then the step of elaborating Figure 9.5(a) into Figure 9.5(b) will be described in our notation as:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

90

Page 91: SDE Complete Notes

CMRIT Redefining Quality Education

For our second example, the designer takes the DFD created above and, as their fourth design step, restructures this into a Structure chart, with each DFD 'bubble' becoming a sub-program unit. This is shown in Figure 9.6, and the transformation step is demonstrated below. Note that the new design model is considered to consist of both the DFD and the Structure Chart.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

91

Page 92: SDE Complete Notes

CMRIT Redefining Quality Education

While obviously the D-Matrix is rather cumbersome when used with larger and very specific examples, we will mainly be using it to illustrate-fairly simple or general design steps such as the two above.

9.3 DESIGN BY TOP-DOWN DECOMPOSITION

In its most basic form, the success of top-down approach of finding a good solution will be highly dependent on the way in which the original problem is described, since this forms the model that is the basis for the designer's initial choice of subtasks. Figure 9.7 provides just such an example of how we can easily find two ways to decompose a given problem. It may be that these two structures will converge following further decomposition, but this cannot be guaranteed by the use of the strategy alone.

The top-down strategy also illustrates one of the characteristic features of the design process itself. When discussing Rittel's definition of a 'wicked problem', we identified one of the characteristics of such a problem as being the lack of a 'stopping rule' that the designer can use to determine that the design process is complete.

One other consequence of using this strategy that should also be mentioned is the problem of duplication. Because the strategy consists of a sequence of refinements, there is potential for full or partial duplication of functionality when the low-level operations are defined.

Because of its long history and the relative ease with which it can be applied, the top-down strategy has played quite an important role in the development of design methods, and ways of avoiding some of its more undesirable features have been developed and used in the methods that are based upon it. Indeed, even where other design strategies are to be used for developing a system, it is not uncommon for the initial design steps to consist of a functional

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

92

Page 93: SDE Complete Notes

CMRIT Redefining Quality Education

decomposition, using a top-down strategy to identify the major functional modules of the system, with the design of these then being elaborated using a quite different strategy.

The SSA/SD (Structured Systems Analysis and Structured Design) method, evolved by Yourdon and coworkers (Page-Jones, 1988; Gane and Sarsen, 1979) is an example of a widely used method based on an enlarged version of this strategy.

9.4 DESIGN BY COMPOSITION

In a top-down strategy for design, the emphasis is heavily focused on identifying the operations that need to be performed by the system. So the model of the problem that results is based almost entirely on consideration of the functional viewpoint, although the refinement of the model may make use of other viewpoints.

The reverse of this approach is to use a compositional strategy for building the designer's model. In this, a model of the problem is constructed by developing descriptions of a set of particular entities or objects that can be recognized in the problem itself, together with a description of the relationships that link these entities.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

93

Page 94: SDE Complete Notes

CMRIT Redefining Quality Education

In a method that uses a compositional strategy, such as JSD, and the 'object-oriented' approaches, the relevant entities are normally identified by analyzing an initial description of the problem A complete and detailed model of the solution is then developed by elaborating the descriptions of the entities and the interactions occurring between them.

We can again model these processes using the D-Matrix, but now the process is more likely to be one of grouping columns of the matrix to create new abstractions, as well as elaborating more complex combinations of viewpoints. Methods that employ such models" the philosophy behind this strategy tends to result in design processes that are largely sequences of elaboration steps, with any transformations being essentially 'spread out' across a number of steps, rather than forming explicit steps in the process.

It is reasonable to consider the process of using a compositional strategy as rather less directly intuitive than the top-down strategy (Vessey and Conger, 1994). However, it can also be argued that this 'intuition' is partly a matter of familiarity, since programmers are generally more experienced with function-oriented (imperative) programming languages, and therefore have acquired greater experience with a function-oriented view of systems. We can therefore expect that this bias can be offset by training in a compositional method, and this view seems to be borne out by experience (Fichman and Kemerer, 1997).

If compositional methods are more complex and less directly intuitive than those methods that are based on a top-down approach, and so perhaps require more discipline in their use, it can be argued that they are also:

more stable, in that their use will tend to lead to similar solutions for a problem, regardless of the user, since the design strategy relates the structure of the solution to the structure of the problem (Detienne, 2002);

more even in terms of the transformation steps involved, with a more gradual progression of design development than is common for top-down methods;

better able to provide a good verification process between the design and the original specification, since there is usually an explicit 'audit trail' between solution objects and problem objects.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

94

Page 95: SDE Complete Notes

CMRIT Redefining Quality Education

A particular benefit of the compositional strategy is that it gives more opportunity for using multiple viewpoints to exploit the use of such important design concepts as modularity and information-hiding (Parnas, 1972) in the structuring of a designer's solution. This arises from the emphasis on 'grouping' that occurs in the elaboration of a design model, with scope to group elements by considering different relations between them, including shared data structures, shared data objects, function, and so on. This is a process that is difficult to achieve (if not impossible) through the use of a top-down strategy.

9.5 ORGANIZATIONAL INFLUENCES UPON DESIGN

An organizational design method can be considered as one in which the form of the process part of the method is strongly influenced by a set of non-technical factors, arising from the nature and structure of the organization using the method.

International agencies, as well as central and local government bodies, are major customers for software-based systems. These range from specialized defence real-time systems to applications for stock control or taxation. Many of these systems are very large; they are difficult to specify; the requirements may change with technology, legislation or internal reorganization; and they may be produced by in-house teams or by outside contracting agencies.

A significant feature of such organizations is that they are highly likely to provide their staff with career structures that are geared to overall organizational needs, and hence are not directly related to project needs.

The British Civil Service is an example of just such an organization, and it is mirrored by similar bodies in Britain as well as in other countries. During a civil servant's career, he or she may expect to progress through a series of grades, and may well be required to occupy a number of positions for fixed intervals of (say) two or three years. Each transition between grades or posts will therefore, occur at an externally determined time, regardless of the state of any software-based project that they might be involved in. While this view is perhaps a little simplified, it does embody the main principles and practices that are used by such organizations.

To help with control of the increasing number of large software-based projects needed in such organizations, there was in the 1980s, continued into the 1990s, a corresponding growth in emphasis upon the use of 'standard' methods for analysis and design. The use of a standard method or strategy within an organization has a number of benefits:

there is minimum disruption of a project when staff changes occur;

a change of project manager should not lead to a change of technical direction;

standardization of documentation allows for better management of maintenance;

there is scope for better planning, costing and control of projects, based on the use of past experience, which can be related directly to current practices.

There are, of course, some negative features of such methods to offset these positive ones. Perhaps the major negative aspect is that they tend to be overly bureaucratic, with the attendant risk that creative options may not be adequately explored, and also that the overall technical direction can be lost.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

95

Page 96: SDE Complete Notes

CMRIT Redefining Quality Education

There are a number of methods that can be classified as having an organizational element. These include:

SSADM (Structured Systems Analysis and Design Method), which has been produced for use with data-processing projects by central and local government agencies in the UK (Longworth, 1992);

MERISE, which is a French equivalent to SSADM;

HOOD (Hierarchical Object-Oriented Design), which has been developed on behalf of the European Space Agency for use in designing Ada-based systems;

MASCOT (Modular Approach to Software Construction, Operation and Test) is intended for use in real-time systems, and originated in the UK defence sector.

These are all examples from Europe, as the development and use of such methods does not seem to have been common practice in the USA, nor elsewhere, as far as can be ascertained.

At a technical level, in terms of the strategies involved in-their use, these methods quite considerably, according to their domain of application. In that sense, therefore, we can regard the 'organizational' category as being essentially independent of strategy, so that a method can be both top-down and organizational, or compositional organizational.

________

10. PERFORMING USER INTERFACE DESIGN User Interface design create an effective communication medium between a human and a

computer. Following a set of interface design principles, design identifies interface objects and actions and then creates a screen layout that forms the basis for a user interface prototype.

Interface Design

Easy to learn?Easy to use?

Easy to understand?

Typical Design Errors lack of consistencytoo much memorization

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

96

Page 97: SDE Complete Notes

CMRIT Redefining Quality Education

no guidance / helpno context sensitivitypoor responseArcane/unfriendly

10.1 GOLDEN RULES• Place the user in control• Reduce the user’s memory load• Make the interface consistent

Place the User in Control• Define interaction modes in a way that does not force a user into unnecessary or

undesired actions. • Provide for flexible interaction. • Allow user interaction to be interruptible and undoable. • Streamline interaction as skill levels advance and allow the interaction to be

customized. • Hide technical internals from the casual user. • Design for direct interaction with objects that appear on the screen.

Reduce the User’s Memory Load• Reduce demand on short-term memory. • Establish meaningful defaults. • Define shortcuts that are intuitive. • The visual layout of the interface should be based on a real world

metaphor. • Disclose information in a progressive fashion.

Make the Interface Consistent• Allow the user to put the current task into a

meaningful context. • Maintain consistency across a family of

applications. • If past interactive models have created user

expectations, do not make changes unless there is a compelling reason to do so. 10.2 USER INTERFACE ANALYSIS AND DESIGN

The overall process for analyzing and designing a user interface begins with the creation of different models of system function.

Interface Analysis and Design Models

User model — a profile of all end users of the system

Design model — a design realization of the user model

Mental model (system perception) — the user’s mental image of what the interface is Implementation model — the interface “look and feel” coupled with supporting

information that describe interface syntax and semantics.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

97

Page 98: SDE Complete Notes

CMRIT Redefining Quality Education

User Interface Design Process

The analysis and design process for user interfaces is iterative and can be represented using a spiral model.

The user interface analysis and design process encompasses four distinct framework activities.

User, task and environment analysis and modeling. Interface design. Interface construction (implementation). Interface validation.

The analysis of the user environment focuses on the physical work environment. Among the questions to be asked are

Where will the interface be located physically? Will the user be sitting, standing or performing other tasks unrelated to the

interface? Does the interface hardware accommodate space, light or noise constraints? Are there special human factors consideration driven by environmental factors?

The information gathered as part of the analysis activity is used to create an analysis model for the interface.

The goal of interface design is to define a set of interface objects and actions (and their screen representations) that enable a user to perform all defined tasks in a manner that meets every usability goal defined for the system.

Validation focuses on

(1) the ability of the interface to implement every user task correctly, to accommodate all task variations, and to achieve all general user requirements.

(2) the degree to which the interfaced is easy to use and easy to learn(3) the users acceptance of the interface as a useful tool in their work.

10.3 INTERFACE ANALYSIS

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

98

Page 99: SDE Complete Notes

CMRIT Redefining Quality Education

Interface analysis means understanding • the people (end-users) who will interact with the system through the interface;• the tasks that end-users must perform to do their work, • the content that is presented as part of the interface• the environment in which these tasks will be conducted.

User Analysis• Are users trained professionals, technician, clerical, or manufacturing workers?• What level of formal education does the average user have?• Are the users capable of learning from written materials or have they expressed a

desire for classroom training?• Are users expert typists or keyboard phobic?• What is the age range of the user community?• Will the users be represented predominately by one gender?• How are users compensated for the work they perform? • Do users work normal office hours or do they work until the job is done?• Is the software to be an integral part of the work users do or will it be used only

occasionally?• What is the primary spoken language among users?• What are the consequences if a user makes a mistake using the system?• Are users experts in the subject matter that is addressed by the system?• Do users want to know about the technology the sits behind the interface?

Task Analysis and Modeling Answers the following questions …

• What work will the user perform in specific circumstances?• What tasks and subtasks will be performed as the user does the work?• What specific problem domain objects will the user manipulate as work is

performed?• What is the sequence of work tasks—the workflow?• What is the hierarchy of tasks?

Use-cases define basic interaction Task elaboration refines interactive tasks Object elaboration identifies interface objects (classes) Workflow analysis defines how a work process is completed when several people (and

roles) are involved

Swimlane Diagram

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

99

Page 100: SDE Complete Notes

CMRIT Redefining Quality Education

patient pharmacist physician

requests that a prescript ion be re f illed

no refills remaining

checks patient records

dete rmines status o f prescript ion

refills remaining

refill not allowed

approves refill

evaluates alternative medication

none

rece ives request to contact physician

alternative available

checks inventory f o r ref ill or alternative

out of stockrece ives out o f stock notif icat ion

rece ives t ime/ date to p ick up

in stock

picks up prescript ion

f ills prescription

Figure 12.2 Swimlane diagram for prescription refill function

Analysis of Display Content

Are different types of data assigned to consistent geographic locations on the screen (e.g., photos always appear in the upper right hand corner)?

Can the user customize the screen location for content? Is proper on-screen identification assigned to all content? If a large report is to be presented, how should it be partitioned for ease of

understanding? Will mechanisms be available for moving directly to summary information for large

collections of data.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

100

Page 101: SDE Complete Notes

CMRIT Redefining Quality Education

Will graphical output be scaled to fit within the bounds of the display device that is used?

How will color to be used to enhance understanding? How will error messages and warning be presented to the user?

10.4 INTERFACE DESIGN STEPS

Using information developed during interface analysis; define interface objects and actions (operations).

Define events (user actions) that will cause the state of the user interface to change. Model this behavior.

Depict each interface state as it will actually look to the end-user. Indicate how the user interprets the state of the system from information provided

through the interface.

Interface Design Patterns

The Design pattern is an abstraction that prescribes a design solution to a specific, well bounded design problem

Patterns are available for

• The complete UI• Page layout• Forms and input• Tables• Direct data manipulation• Navigation• Searching• Page elements• e-Commerce

Design Issues

Response time Help facilities Error handling Menu and command labeling Application accessibility Internationalization

10.5 DESIGN EVALUATION Design evaluation determines whether it meets the needs of the user.

Evaluation can span a formality spectrum that ranges from an informal “test drive,” in which a user provide impromptu feedback to a formally designed study that uses statistical methods for the evaluation of questionnaires completed by a population of end-users.

After the design model has been completed, a first level prototype is created.

The design model of the interface has been created, a number of evaluation criteria can be applied during early design reviews.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

101

Page 102: SDE Complete Notes

CMRIT Redefining Quality Education

• The length and complexity of the written specification of the system and its interface provide an indication of the amount of learning required by users of the system.

• The number of user tasks specified and the average number of actions per task provide an indication of interaction time and the overall efficiency of the system.

• The number of actions, tasks and system states indicated by the design model imply the memory load on users of the system

• Interface style, help facilities and error handling protocol provide indication of the complexity of the interface and the degree to which it will be accepted by the user.

To collect qualitative data, questionnaires can be distributed to users of the prototype. Questions can be

(1) simple yes/no response, (2) numeric response, (3) scaled (subjective) response, (4) likert scales (e.g., strongly agree, somewhat agree), (5) percentage (subjective) response or (6) open-ended.

If quantitative data are desired, a form of time study analysis can be conducted.preliminary

design

buildprototype #1

interface

evaluationis studied by

designer

designmodifications

are made

buildprototype # n

interface

userevaluate'sinterface

Interface designis complete

11. TESTING STRATEGIES

Software Testing

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

102

Page 103: SDE Complete Notes

CMRIT Redefining Quality Education

Testing is the process of exercising a program with the specific intent of finding errors prior to delivery to the end user.

What Testing Shows

Who Tests the Software?

11.1 A STRATEGIC APPROACH TO SOFTWARE TESTING A number of software testing strategies have proposed in the literature. All provide the

software developer with a template for testing and all have the following generic characteristics:

• To perform effective testing, a software team should conduct effective formal technical reviews. By doing this, many errors will be eliminated before testing commences.

• Testing begins at the component level and works “outward” toward the integration of the entire computer-based system.

• Different testing techniques are appropriate at different points in time. • Testing is conducted by the developer of the software and (for large projects) an

independent test group.• Testing and debugging are different activities, but debugging must be

accommodated in any testing strategy. Verification and Validation

Verification refers to the set of activities that ensure that software correctly implements a specific function. Validation refers to a different set of activities that ensure that the software that has been built is traceable to customer requirements.

• Verification: Are we building the product right?

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

103

Page 104: SDE Complete Notes

CMRIT Redefining Quality Education

• Validation: Are we building the right product?

Verification and validation encompasses a ;wide array of SQA activities that include formal technical reviews, quality and configuration audits, performance monitoring, simulation, feasibility study, documentation review, database review, algorithm analysis, development testing, usability testing, qualification testing, and installation testing.

Organizing for software testing

The people who have built the software are now asked to test the software. Unfortunately, developers have a vested interest in demonstrating that the

program is error free, that it works according to customer requirements, and that it will be completed on schedule and within budget.

There are often a number of misconceptions (1) that the developer of software should do no testing at all, (2) that the software should be “tossed over the wall” to strangers who will test it

mercilessly, (3) that testers get involved with the project only when the testing steps are about

to begin. In many cases, the developer also conducts integration testing-a testing step that

leads to the construction of the complete software architecture. Only after the software architecture is complete does an independent test group become involved.

The role of an independent test group (ITG) is to remove the inherent problems associated with letting the builder test the thing that has been built.

The developer and the ITG work closely throughout a software project to ensure that thorough tests will be conducted. While testing is conducted, the developer must be available to correct errors that are uncovered.

A software Testing Strategy for conventional software• The module (component) is our initial focus• Integration of modules follows

A software Testing Strategy for Object Oriented software• our focus when “testing in the small” changes from an individual module (the

conventional view) to an OO class that encompasses attributes and operations and implies communication and collaboration

Criteria for completion of testing• Question arises every time software testing is discussed: when are we done

testing-how do we know that we’ve tested enough?• One response to the question is: You’re never done testing; the burden simply

shifts from you to your customer. Every time the customer/user executes a computer program, the program is being tested.

• You’re done testing when you run out of time or you run out of money.• By collecting metrics during software testing and making use of existing software

reliability models, it is possible to develop meaningful guidelines for answering the question: when are we done testing?

STRATEGIC ISSUES

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

104

Page 105: SDE Complete Notes

CMRIT Redefining Quality Education

State testing objectives explicitly. Understand the users of the software and develop a profile for each user category. Develop a testing plan that emphasizes “rapid cycle testing.” Build “robust” software that is designed to test itself Use effective formal technical reviews as a filter prior to testing Conduct formal technical reviews to assess the test strategy and test cases themselves. Develop a continuous improvement approach for the testing process.

11.2. TEST STRATEGIES FOR CONVENTIONAL SOFTWARE There are many strategies that can be used to test software:

• A software team could wait until the system is fully constructed and then conduct tests on the overall system in hopes of finding errors. This approach, although appealing, simply does not work. It will result in buggy software that disappoints the customer and end-user.

• A software engineer could conduct tests on a daily basis, whenever any part of the system is constructed. This approach, although less appealing to many, can be very effective.

Unit Testing

Unit testing focuses verification effort on the smallest unit of software design- the software component or module.

Unit Test Environment

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

105

Page 106: SDE Complete Notes

CMRIT Redefining Quality Education

Integration Testing

Integration testing is a systematic technique for constructing the software architecture while at the same time conducting tests to uncover errors associated with interfacing.Options:• the “big bang” approach• an incremental construction strategy

Top Down Integration

Top-down integration testing is an incremental approach to construction of the software architecture.

Modules are integrated by moving downward through the control hierarchy, beginning with the main control module.

The integration process is performed in a series of five steps.• The main control module is used as a test driver, and stubs are substituted for

all components directly subordinate to the main control module.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

106

Page 107: SDE Complete Notes

CMRIT Redefining Quality Education

• Depending on the integration approach selected (i.e., depth or breadth first), subordinate stubs are replaced one at a time with actual components.

• Tests are conducted as each component is integrated.• On completion of each set of tests, another stub is replaced with the real

component.• Regressing testing may be conducted to ensure that new errors have not been

introduced.

Bottom-Up Integration

Bottom-up integration testing as its name implies, begins construction and testing with atomic modules.

A bottom-up integration strategy may be implemented with the following four steps:

• Low-level components are combined into clusters that perform a specific software subfunction.

• 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 structure.

Regression testing

Regression testing may be conducted manually, by re-executing a subset of all test cases or using automated capture/playback tools.

The regression test suite contains three different classes of test cases.• A representative sample of tests that will exercise all software functions.• Additional tests that focus on software functions that are likely to be affected by

the change.• Tests that focus on the software components that have been changed.

Smoke Testing A common approach for creating “daily builds” for product software. Smoke testing steps:

• Software components that have been translated into code are integrated into a “build.”

• A build includes all data files, libraries, reusable modules, and engineered components that are required to implement one or more product functions.

• A series of tests is designed to expose errors that will keep the build from properly performing its function.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

107

Page 108: SDE Complete Notes

CMRIT Redefining Quality Education

• The intent should be to uncover “show stopper” errors that have the highest likelihood of throwing the software project behind schedule.

• The build is integrated with other builds and the entire product (in its current form) is smoke tested daily.

• The integration approach may be top down or bottom up.

11.3 BLACK-BOX TESTING Black-Box Testing alludes to tests that are conducted at the software interface. A black-

box test examines some fundamental aspect of a system with little regard for the internal logical structure of the software.

• How is functional validity tested?• How is system behavior and performance tested?• What classes of input will make good test cases?• Is the system particularly sensitive to certain input values?• How are the boundaries of a data class isolated?• What data rates and data volume can the system tolerate?• What effect will specific combinations of data have on system operation?

11.4 WHITE-BOX TESTING OR GLASS-BOX TESTING

White-Box Testing of software is predicated on close examination of procedural detail. Logical paths through the software and collaborations between components are tested by providing test cases that exercise specific sets of conditions and/or loops.

Why Cover?

Logic errors and incorrect assumptions are inversely proportional to a path’s execution probability

We often believe that a path is not likely to be executed; in fact, reality is often counter intuitive.

Typographical errors are random; it’s likely that untested paths will contain some.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

108

Page 109: SDE Complete Notes

CMRIT Redefining Quality Education

11.5 VALIDATION TESTING Focus is on software requirements

Validation Test Criteria Configuration review Alpha/Beta testing

Focus is on customer usage

11.6 SYSTEM TESTING

Focus is on system integration Recovery testing

• forces the software to fail in a variety of ways and verifies that recovery is properly performed

Security testing• verifies that protection mechanisms built into a system will, in

fact, protect it from improper penetration Stress testing

• executes a system in a manner that demands resources in abnormal quantity, frequency, or volume

Performance Testing• test the run-time performance of software within the context of an

integrated system.

11.7 THE ART OF DEBUGGING Debugging occurs as a consequence of successful testing. That is, when a test

case uncovers an error, debugging is an action that results in the removal of the error.

The Debugging Process:

Debugging will always have one of two outcomes:• The cause will be found and corrected• The cause will not be found. In the latter case, the person

performing debugging may suspect a cause, design one or more test cases to help validate that suspicion, and work toward error correction in an iterative fashion.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

109

Page 110: SDE Complete Notes

CMRIT Redefining Quality Education

Why is debugging so difficult? In all likelihood, human psychology has more to do with an answer than software technology. However, a few characteristics of bugs provide some clues:

• The symptom and the cause may be geographically remote. That is, the symptom may appear in one part of a program, while the cause may actually be located at a site that is far removed. Highly coupled components exacerbate this situation.

• The symptom may disappear when another error is corrected.• The symptom may actually be caused by non errors.• The symptom may be caused by human error that is not easily

traced.• The symptom may be a result of timing problems, rather than

procession problems.• It may be difficult to accurately reproduce input conditions.• The symptom may be intermittent. This is particularly common in

embedded systems that couple hardware and software inextricably. • The symptom may be due to causes that are distributed across a

number of tasks running on different processors.

During debugging, we encounter errors that range from mildly annoying to catastrophic.

Psychological Considerations Debugging is one of the more frustrating parts of programming. It has elements

of problem solving or brain teasers, coupled with the annoying recognition that you have made a mistake. Heightened anxiety and the unwillingness to accept the possibility of error increases the task difficulty. Fortunately, there is a great sigh of relief and a lessening of tension when the bug is ultimately corrected.

Debugging Strategies

Regardless of the approach that is taken, debugging has one overriding objective: to find and correct the cause of a software error. The objective is realized by a combination of systematic evaluation, intuition and luck.

In general, three debugging strategies have been proposed• Brute force• Backtracking• Cause elimination.

Debugging tactics:• The brute force category of debugging is probably the most common and

least efficient method of isolating the cause of a software error.I – M.Tech. – I – Semester (CSE) Software Design & Engineering

110

Page 111: SDE Complete Notes

CMRIT Redefining Quality Education

• Backtracking is a fairly common debugging approach that can be used successfully in small programs.

• Cause elimination is manifested by induction or deduction and introduces the concept of binary partitioning.

Automated debugging

• Each of these debugging approaches can be supplemented with debugging tools that provide semi-automated support for the software engineer as debugging strategies are attempted.

The people factor

• A fresh viewpoint, unclouded by hours of frustration, can do wonders. A final maxim for debugging might be: when all else fails, get help.

Correcting the error

Once a bug has been found, it must be corrected. But, as we have already noted, the correction of a bug can introduce other errors and therefore do more harm than good. Van Vleck suggests three simple questions that every software engineer should ask before making the “correction” that removes the cause of a bug:

• Is the cause of the bug reproduced in another part of the program?• What “next bug” might be introduced by the fix that I’m about to make?• What could we have done to prevent this bug in the first place?

_______

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

111

Page 112: SDE Complete Notes

CMRIT Redefining Quality Education

12. PRODUCT METRICS

12.1 SOFTWARE QUALITY Software quality is conformance to explicitly stated functional and performance

requirements, explicitly documented development standards, and implicit characteristics that are expected of all professionally developed software.

The definition serves to emphasize three important points:

• Software requirements are the foundation from which quality is measured. Lack of conformance to requirements is lack of quality.

• Specified standards define a set of development criteria that guide the manner in which software is engineered. If the criteria are not followed, lack of quality will almost surely result.

• There is asset of implicit requirements that often goes unmentioned. If software conforms to its explicit requirements but fails to meet implicit requirements, software quality is suspect.

Software quality is a complex mix of factors that will vary across different applications and the customers who request them.

McCall’s Quality Factors

The factors that affect software quality can be categorized in two broad groups:

• Factors that can be directly measured.• Factors that can be measuring only indirectly. In each case measurement should

occur. We must compare the software to some datum and arrive at an indication of quality.

McCall, Richards and Walters propose a useful categorization of factors that affect software quality. These software quality factors, shown in figure, focus on three important aspects of a software product: Its operational characteristics, its ability to undergo change, and its adaptability to new environments.

Referring to the factors noted in figure, McCall and his colleagues provide the following descriptions:

• Correctness: The extent to which a program satisfies its specification and fulfills the customer’s mission objectives.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

112

Page 113: SDE Complete Notes

CMRIT Redefining Quality Education

• Reliability: The extent to which a program can be expected to perform its intended function with required precision.

• Efficiency: The amount of computing resources and code required by a program to perform its function.

• Integrity: The extent to which access to software or data by unauthorized persons can be controlled.

• Usability: The effort required to learn, operate, prepare input for, and interpret output of a program.

• Maintainability: The effort required to locate and fix and error in a program.

• Flexibility: The effort required to modify an operational program.

• Testability: The effort required to test a program to ensure that it performs its intended function.

• Portability: the effort required to transfer the program from one hardware and/or software system environment to another.

• Reusability: the extent to which a program can be reused in other applications-related to the packaging and scope of the functions that the program performs.

• Interoperability: The effort required to couple one system to another.

A Comment McCall’s quality factors were proposed in the early 1970s. They are as valid today as

they were in that time. It’s likely that software built to conform to these factors will exhibit high quality well into the 21st century, even if there are dramatic changes in technology.

ISO 9126 Quality Factors:

The ISO 9126 standard was developed in an attempt to identify quality attributes for computer software. The standard identifies six key quality attributes:

• Functionality: The degree to which the software satisfies stated needs as indicated by the following sub-attributes: suitability, accuracy, interoperability, compliance and security.

• Reliability: The amount of time that the software is available for use as indicated by the following sub-attributes: maturity, fault tolerance, recoverability.

• Usability: the degree to which the software is easy to use as indicated by the following sub-attributes: understandability, learnability, operability.

• Efficiency: The degree to which the software makes optimal use of system resources as indicated by the following sub-attributes: time, behavior, resource behavior.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

113

Page 114: SDE Complete Notes

CMRIT Redefining Quality Education

• Maintainability: The ease with which repair may be made to the software as indicated by the following sub-attributes: analyzability, changeability, stability, testability.

• Portability: The ease with which the software can be transposed from one environment to another as indicated by the following sub-attributes: adaptability, installability, conformance, replaceabilty.

The Transition to a Quantitative View

We examine a set of software metrics that can be applied to the quantitative assessment of software quality. In all cases, the metrics represent indirect measures; that is, we never really measure quality but rather some manifestation of quality. The complicating factor is the precise relationship between the variable that is measuring and the quality of software.

12.2 METRICS FOR THE ANALYSIS MODEL Function-based metrics: use the function point as a normalizing factor or as a measure of

the “size” of the specification Specification metrics: used as an indication of quality by measuring number of

requirements by type

Function-Based Metrics

The function point metric (FP), first proposed by Albrecht, can be used effectively as a means for measuring the functionality delivered by a system.

Function points are derived using an empirical relationship based on countable (direct) measures of software's information domain and assessments of software complexity

Information domain values are defined in the following manner:• Number of external inputs (EIs)• Number of external outputs (EOs)• Number of external inquiries (EQs)• Number of internal logical files (ILFs)• Number of external interface files (EIFs)

Function Points• To compute function points (FP), the following relationship is

used: FP = count total X [0.65 + 0.01 X ∑ (Fi)] (1)

Where count total is the sum of all FP entries obtained from figure.Information

Domain Value Count simple average complexWeighting factor

External Inputs (EIs)External Outputs (EOs)

External Inquiries (EQs)Internal Logical Files (ILFs)

External Interface Files (EIFs)

3 4 6

4 5 7

3 4 6

7 10 155 7 10

===

==

Count total

33333

The Fi (i= 1 to 14) are value adjustment factors based on responses to the following questions:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

114

X

XX

X

X

Page 115: SDE Complete Notes

CMRIT Redefining Quality Education

1. Does the system require reliable backup and recovery?2. Are specialized data communications required to transfer information to or form the

application?3. Are there distributed processing functions?4. Is performance critical?5. Will the system run in an existing, heavily utilized operational environment?6. Does the system require on-line data entry?7. Does the on-line data entry require the input transaction to be built over multiple screens or

operations?8. Are the ILFs updated on-line?9. Are the inputs, outputs, files or inquiries complex?10. Is the internal processing complex?11. Is the code designed to be reusable?12. Are conversion and installation included in the design?13. Is the system designed for multiple installations in different organizations?14. Is the application designed to facilitate change and for ease of use by the user?

Each of these questions is answered using a scale that ranges from 0 to 5. The constant values in equation-1 and the weighting factors that are applied to information domain counts are determined empirically.

12.3 METRICS FOR THE DESIGN MODEL Design metrics for computer software, like all other software metrics, are not perfect.

Debate continues over their efficacy and the manner in which they should be applied.

Architectural Design Metrics

Architectural design metrics focus on characteristics of the program architecture with an emphasis on the architectural structure and the effectiveness of modules or components within the architecture.

Architectural design metrics• Structural complexity = g(fan-out)• Data complexity = f(input & output variables, fan-out)• System complexity = h(structural & data complexity)

HK metric: architectural complexity as a function of fan-in and fan-out Morphology metrics: a function of the number of modules and the number of interfaces

between modules

For hierarchical architectures structural complexity of a module I is defined in the following manner:

• S(i) = f2out(i)Where fout(i) is the fan-out of module i.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

115

Page 116: SDE Complete Notes

CMRIT Redefining Quality Education

• Data complexity provides an indication of the complexity in the internal interface for a module I and is defined as D(i) = v(i) / [fout(i) + 1]

Where v(i) is the number of input and output variables that are passed to and from module i.

Finally, system complexity is defined as the sum of structural and data complexity specified as

C(i) = S(i) + D(i)

As each of these complexity values increases, the overall architectural complexity or the system also increases. This leads to a greater likelihood that integration and testing effort will also increase.

Fenton suggests a number of simple morphology metrics that enable different program architectures to be compared using a set of straight forward dimensions. Referring to the call-and-return architecture in figure. The following metric can be defined:

size = n + a where n is the number of nodes and a is the number of arcs.

The U.S. Air Force Systems command has developed a number of software quality indicators that are based on measurable design characteristics of a computer program. The Air Force uses information obtained form data and architectural design to derive a design structure quality index that ranges from 0 to 1. The following values must be ascertained to compute the DSQI.S1 = the total number of modules defined in the program architectureS2 = the number of modules whose correct function depends on the source of data input

or that produce data to be used elsewhere.S3 = the number of modules whose correct function depends on prior processing.S4 = the number of database items.S5 = the total number of unique database items.S6 = the number of database segmentsS7 = the number of modules with a single entry and exit.

Program Structure: D1, where D1 is defined as follows: If the architectural design was developed using a distinct method, then D1= 1, otherwise D1=0.

Module independence: D2 = 1 – (S2/S1)Modules not dependent on prior processing: D3 = 1 – (S3/S1)Database size: D4 = 1- (S5/S4)Database compartmentalization: D5 = 1 – (S6/S4)Module entrance/exit characteristic: D6 = 1 – (S7/S1)With these intermediate values determined, the DSQI is computed in the following manner:DSQI = ∑wiDi

Where i = 1 to 6, wi is the relative weighting of the importance of each of the intermediate values, and ∑wi = 1

Metrics for Object-Oriented Design Whitmire describes nine distinct and measurable characteristics of an OO design:

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

116

Page 117: SDE Complete Notes

CMRIT Redefining Quality Education

• Size Size is defined in terms of four views: population, volume, length, and

functionality• Complexity

How classes of an OO design are interrelated to one another• Coupling

The physical connections between elements of the OO design• Sufficiency

“the degree to which an abstraction possesses the features required of it, or the degree to which a design component possesses features in its abstraction, from the point of view of the current application.”

• Completeness An indirect implication about the degree to which the abstraction or design

component can be reused• Cohesion

The degree to which all operations working together to achieve a single, well-defined purpose

• Primitiveness Applied to both operations and classes, the degree to which an operation is

atomic• Similarity

The degree to which two or more classes are similar in terms of their structure, function, behavior, or purpose

• Volatility Measures the likelihood that a change will occur

Class-Oriented MetricsThe class is the fundamental unit of an object oriented system.

Proposed by Chidamber and Kemerer Metrics Suite

• weighted methods per class• depth of the inheritance tree• number of children• coupling between object classes• response for a class• lack of cohesion in methods

The MOOD Metrics Suite• Method inheritance factor: • Coupling factor• Polymorphism factor

Proposed by Lorenz and Kidd:• class size• number of operations overridden by a subclass• number of operations added by a subclass• specialization index

Component-Level Design Metrics

Cohesion metrics: a function of data objects and the locus of their definition

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

117

Page 118: SDE Complete Notes

CMRIT Redefining Quality Education

Coupling metrics: a function of input and output parameters, global variables, and modules called

Complexity metrics: hundreds have been proposed (e.g., cyclomatic complexity)

Operation-Oriented Metrics

Proposed by Lorenz and Kidd:• average operation size• operation complexity• average number of parameters per operation

User Interface Design Metrics

Layout appropriateness: a function of layout entities, the geographic position and the “cost” of making transitions among entities.

12.4 METRICS FOR SOURCE CODE Also called Halstead’s Software Science: a comprehensive collection of metrics all

predicated on the number (count and occurrence) of operators and operands within a component or program

• It should be noted that Halstead’s “laws” have generated substantial controversy, and many believe that the underlying theory has flaws. However, experimental verification for selected programming languages has been performed. The measures are

n1 = the number of distinct operators that appear in a program. n2 = the number of distinct operands that appear in a program. N1 = the total number of operator occurrences. N2 = the total number of operand occurrences. Halstead shows that length N can be estimated

N= n1 log2 n1 + n2 log2 n2

and program volume may be defined.V = N log2 (n1+n2)

It should be noted that V will vary with programming language and represents the volume of information required to specify a program.

Theoretically, a minimum volume must exist for a particular algorithm. Halstead defines a volume ratio L as the ratio of volume of the most compact form of a program to the volume of the actual program.

L must always be less than 1. In terms of primitive measures, the volume ratio may be expressed as

L = 2/n1 X n2/N2 12.5 METRICS FOR TESTING

Modules with high cyclomatic complexity are more likely to be error prone than modules whose cyclomatic complexity is lower. For this reason, the tester should expand above average effort to uncover errors in such modules before they are integrated in a system.

Halstead Metrics Applied to Testing Testing effort can also be estimated using metrics derived from Halstead measures

• Using the definitions for program volume, V, and program level, PL, Halstead effort, e, can be computed as

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

118

Page 119: SDE Complete Notes

CMRIT Redefining Quality Education

PL = 1 / [n1/2) X (N2/n2)] and e = V/PL The percentage of overall testing effort to be allocated to a module k can

be estimated using the following relationship: Percentage of testing effort (k) = e(k) / ∑e(i)Where e(k) is computed for module k using equations and the summation in the denominator of equation is the sum of Halstead effort across all modules of the system.

Metrics for Object-Oriented Testing Binder suggests a broad array of design metrics that have a direct influence on the

“testability” of an OO system. • Lack of cohesion in methods (LCOM): The higher the value of LCOM, the more states must be

tested to ensure that methods do not generate side effects.• Percent public and protected (PAP): This metric indicates the percentage of class attributes that

are public or protected.• Public access to data members (PAD): This metric indicates the number of classes that can be

access another class’s attributes, a violation of encapsulation.• Number of root classes (NOR): This metric is a count of the distinct class hierarchies that are

described in the design model.• Fan-in (FIN): When used in the OO context, fan-in for the inheritance hierarchy is an indication

of multiple inheritance. FIN>1 indicates that a class inherits its attributes and operations from more than one root class.

• Number of children (NOC) and depth of the inheritance tree (DIT): Superclass methods will have to be retested for each subclass.

12.6 METRICS FOR MAINTENANCE IEEE Std. 982.1 – 1988 suggests a software maturity index that provides an indication of

the stability of a software product. The following information is determined:MT = the number of modules in the current release.Fc = the number of modules in the current release that have been changed.Fa = the number of modules in the current release that have been added.Fd = the number of modules from the preceding release that were deleted in the

current release.The software maturity index is computed in the following manner:

SMI = [Mr – (Fa + Fc +Fd)]/MT

As SMI approaches 1.0, the product begins to stabilize. SMI may also be used as a metric for planning software maintenance activities. The mean time to produce a release of a software product can be correlated with SMI, and empirical models for maintenance effort can be developed.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

119

Page 120: SDE Complete Notes

CMRIT Redefining Quality Education

13. METRICS FOR PROCESS & PROJECTS Software process and project metrics are quantitative measures that enable software

engineers to gain insight into the efficacy of the software process and the projects that are conducted using the process as a framework.

13.1 SOFTWARE MEASUREMENT Software measurement can be categorized in two ways.

• Direct measures of the software process and product. • Indirect measures of the product that includes functionality, quality,

complexity, efficiency, reliability, maintainability.

Size-Oriented Metrics errors per KLOC (thousand lines of code) defects per KLOC $ per LOC pages of documentation per KLOC errors per person-month Errors per review hour LOC per person-month $ per page of documentation

Function-Oriented Metrics errors per FP (thousand lines of code) defects per FP $ per FP pages of documentation per FP FP per person-month

Reconciling LOC and FP Metrics

The relationship between lines of code and function points depend upon the programming language that is used to implement the software and the quality of the design. A number of studies have attempted to relate FP and LOC measures.

The following table provides rough estimates of the average number of lines of code required to build one function point in various programming languages.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

120

Page 121: SDE Complete Notes

CMRIT Redefining Quality Education

Why Opt for FP?• Programming language independent.• Used readily countable characteristics that are determined early in the software

process.• Does not “penalize” inventive (short) implementations that use fewer LOC that

other clumsier version.• Makes it easier to measure the impact of reusable components.

Object-Oriented Metrics Number of scenario scripts (use-cases): A Scenario script is a detailed sequence of

steps that describes the interaction between the user and the application. Number of Key classes: Key classes are the “highly independent components” that

are defined early in object-oriented analysis. Number of support classes: Supports Classes are required to implement the system

but are not immediately related to the problem domain. Average number of support classes per key class (analysis class): The average

number of support classes per key class were known for a given problem domain, estimating would be much simplified.

Number of subsystems: A subsystem is an aggregation of classes that support a function that is visible to the end-user of a system.

Use-Case Oriented Metrics A normalization measure similar to LOC and FP. Used for estimation before significant modeling and construction

activities. Independent of programming languages. No standard size for use-case.

Web Engineering Project Metrics

Number of static Web pages (the end-user has no control over the content displayed on the page)

Number of dynamic Web pages (end-user actions result in customized content displayed on the page)

Number of internal page links (internal page links are pointers that provide a hyperlink to some other Web page within the WebApp)

Number of persistent data objects Number of external systems interfaced

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

121

Page 122: SDE Complete Notes

CMRIT Redefining Quality Education

Number of static content objects Number of dynamic content objects Number of executable functions

13.2 METRICS FOR SOFTWARE QUALITY The overriding goal of software engineering is to produce a high quality system,

application, or product within a timeframe that satisfies a market need. To achieve this goal:• Software Engineer must apply effective methods coupled with

modern tools.

• Software Engineer must measure a high quality is to be realized.• Private metrics collected are assimilated to provide project level

results.• This metrics provide the effectiveness of individual and group

software quality assurance and control activities.• Error data can also be used to compute defect removal efficiency

for each process framework activity.

Measuring Quality Correctness — the degree to which a program operates according to specification Maintainability—the degree to which a program is amenable to change Integrity—the degree to which a program is impervious to outside attack Usability—the degree to which a program is easy to use

Defect Removal Efficiency (DRE) A quality metric that provides benefits at both the project and process

level is defect removal efficiency. When considered for a project as a whole, DRE is defined in the

following manner: DRE = E / (E + D)Where E is the number of errors found before delivery of the software to the end-user D is the number of defects found after delivery.

______

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

122

Page 123: SDE Complete Notes

CMRIT Redefining Quality Education

14. RISK MANAGEMENT

Project Risks

What can go wrong?What is the likelihood?What will the damage be?What can we do about it?

14.1 REACTIVE vs PROACTIVE RISK STRATEGIES Reactive Risk Management

project team reacts to risks when they occur mitigation—plan for additional resources in anticipation of fire fighting fix on failure—resource are found and applied when the risk strikes crisis management—failure does not respond to applied resources and project is

in jeopardy

Proactive Risk Management formal risk analysis is performed organization corrects the root causes of risk

• TQM concepts and statistical SQA• examining risk sources that lie beyond the bounds of the software• developing the skill to manage change

14.2 SOFTWARE RISKS Risk always involves two characteristics

• Uncertainty : the risk may or may not happen; that is, there are no 100% probable risks.

• Loss : if the risk becomes a reality, unwanted consequences or losses will occur.

Project risks threaten the project plan. Project risks identify potential budgetary, schedule, personal, resource, stakeholder, and requirements problems and their impact on a software project.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

123

Page 124: SDE Complete Notes

CMRIT Redefining Quality Education

Technical risks threaten the quality and timeliness of the software to be produced. If a technical risk becomes a reality, implementation may become difficult or impossible. Technical risks occur because the problem is harder to solve than we thought it would be.

Business risks threaten the viability of the software to be built.

• The top five business risks are: (1) Building an excellent product or system that no one really ants, (2) Building a product that no longer fits into the overall business strategy for the

company, (3) Building a product that the sales force doesn’t understand how to sell, (4) Losing the support of senior management due to a change in focus or a

change in people and (5) Losing budgetary or personnel commitment.

Predictable risks are extrapolated from past project experience.

Unpredictable risks are the joker in the deck. They can and do occur, but they are extremely difficult to identify in advance.

Seven principles of risk management1. Maintain a global perspective—view software risks within the context of system and the

business problem 2. Take a forward-looking view—think about the risks that may arise in the future; establish

contingency plans 3. Encourage open communication—if someone states a potential risk, don’t discount it. 4. Integrate—a consideration of risk must be integrated into the software process5. Emphasize a continuous process—the team must be vigilant throughout the software process,

modifying identified risks as more information is known and adding new ones as better insight is achieved.

6. Develop a shared product vision—if all stakeholders share the same vision of the software, it likely that better risk identification and assessment will occur.

7. Encourage teamwork—the talents, skills and knowledge of all stakeholder should be pooled

14.3. RISK IDENTIFICATION

Product size—risks associated with the overall size of the software to be built or modified.

Business impact—risks associated with constraints imposed by management or the marketplace.

Customer characteristics—risks associated with the sophistication of the customer and the developer's ability to communicate with the customer in a timely manner.

Process definition—risks associated with the degree to which the software process has been defined and is followed by the development organization.

Development environment—risks associated with the availability and quality of the tools to be used to build the product.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

124

Page 125: SDE Complete Notes

CMRIT Redefining Quality Education

Technology to be built—risks associated with the complexity of the system to be built and the "newness" of the technology that is packaged by the system.

Staff size and experience—risks associated with the overall technical and project experience of the software engineers who will do the work.

Assessing Project Risk Have top software and customer managers formally committed to support the project? Are end-users enthusiastically committed to the project and the system/product to be

built? Are requirements fully understood by the software engineering team and their

customers? Have customers been involved fully in the definition of requirements? Do end-users have realistic expectations? Is project scope stable? Does the software engineering team have the right mix of skills? Are project requirements stable? Does the project team have experience with the technology to be implemented? Is the number of people on the project team adequate to do the job? Do all customer/user constituencies agree on the importance of the project and on the

requirements for the system/product to be built?

Risk Components

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 resultant software will be easy to correct,

adapt, and enhance. schedule risk—the degree of uncertainty that the project schedule will be maintained and

that the product will be delivered on time.

14.4 RISK PROJECTION Risk projection, also called risk estimation, attempts to rate each risk in two ways

• the likelihood or probability that the risk is real • the consequences of the problems associated with the risk, should it occur.

The are four risk projection steps:• establish a scale that reflects the perceived likelihood of a risk• delineate the consequences of the risk• estimate the impact of the risk on the project and the product,• note the overall accuracy of the risk projection so that there will be no

misunderstandings.

Developing a Risk Table

Risk Probability Impact RMMM

Risk MitigationMonitoring &

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

125

Page 126: SDE Complete Notes

CMRIT Redefining Quality Education

Management

Estimate the probability of occurrence Estimate the impact on the project on a scale of 1 to 5, where

• 1 = low impact on project success• 5 = catastrophic impact on project success

sort the table by probability and impact Assessing Risk Impact

The overall risk exposure, RE, is determined using the following relationship:

RE = P x C

where P is the probability of occurrence for a risk, and C is the cost to the project should the risk occur.

14.5 RISK REFINEMENT During early stages of project planning, a risk may be stated quite generally. As

time passes and more is learned about the project and the risk, it may be possible to refine the risk into a set of more detailed risks, each somewhat easier to mitigate, monitor, and manage.

One way to do this is to represent the risk in condition transition-consequence format. That is, the risk is stated in the following form:

• Given that <condition> then there is concern that <consequence>. This general condition can be refined in the following manner:

• Subcondition1: Certain reusable components were developed by a third party will no knowledge of internal design standards.

• Subcondition2: The design standard for component interfaces has not been solidified and may not conform to certain existing reusable components.

• Subcondition3: Certain reusable components have been implemented in a language that is not supported on the target environment.

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

126

Page 127: SDE Complete Notes

CMRIT Redefining Quality Education

14.6 RISK MITIGATION, MONITORING, AND MANAGEMENT

Mitigation—how can we avoid the risk?

Monitoring—what factors can we track that will enable us to determine if the risk is becoming more or less likely?

Management—what contingency plans do we have if the risk becomes a reality?14.7 THE RMMM PLAN

The RMMM plan documents all work performed as part of risk analysis and are used by the project manager as part of the overall project plan.

Some software teams do not develop a formal RMMM document. Rather, each risk is documented individually using a Risk Information Sheet (RIS).

In most cases, the RIS is maintained using a database system, so that creation and information entry, priority ordering, searches, and other analysis may be accomplished easily.

Once RMMM has been documented and the project has begun, risk mitigation and monitoring steps commence.

Risk monitoring is a project tracking activity with three primary objectives:

1. To assess whether predicted risks do, in fact, occur.

2. To ensure that risk aversion steps defined for the risk are being properly applied.

3. To collect information that can be used for future risk analysis.

Risk Information Sheet

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

127

Page 128: SDE Complete Notes

CMRIT Redefining Quality Education

Project: Embedded software for XYZ system.

Risk type: schedule risk

Priority (1 low ... 5 critical): 4

Risk factor: Project completion will depend on tests which require hardware component under development. Hardware component delivery may be delayed.

Probability: 60 %

Impact: Project completion will be delayed for each day that hardware is unavailable for use in software testing.

Monitoring approach: Scheduled milestone reviews with hardware group.

Contingency plan:Modification of testing strategy to accommodate delay using software simulation.

Estimated resources: 6 additional person months beginning 7-1-96

_____

I – M.Tech. – I – Semester (CSE) Software Design & Engineering

128