ics 52 introduction to software engineeringtaylor/ics52_fq01/vdh-qualities.pdf · recurring and...

30
©2001, University of California, Irvine Lecture 2-1 ICS 52 Introduction to Software Engineering Lecture Notes for Fall Quarter, 2001 André van der Hoek Lecture 2-1 Copyright ©2001, André van der Hoek Duplication of course material for any commercial purpose without the written permission of the lecturer is prohibited.

Upload: others

Post on 25-May-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

ICS 52Introduction to Software Engineering

Lecture Notes for Fall Quarter, 2001André van der Hoek

Lecture 2-1

Copyright ©2001, André van der Hoek

Duplication of course material for any commercial purpose without the written permission of the lectureris prohibited.

Page 2: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Today’s Lecture

� Recurring and fundamental principles ofsoftware engineering

� An introduction to requirements

Page 3: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Recurring, Fundamental Principles

� Rigor and formality� Separation of concerns

� Modularity� Abstraction

� Anticipation of change� Generality� Incrementality

These principles apply to all aspects of software engineering

Page 4: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Rigor and Formality

� Creativity often leads to imprecision andinaccuracy� Software development is a creative process� Software development can tolerate neither

imprecision nor inaccuracy

� Rigor helps to…� …produce more reliable products� …control cost� …increase confidentiality in products

� Formality is “rigor -- mathematically sound”� Often used for mission critical systems

Page 5: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Separation of Concerns

� Trying to do too many things at the sametime often leads to mistakes� Software development is comprised of many

parallel tasks, goals, and responsibilities� Software development cannot tolerate mistakes

� Separation of concerns helps to…� …divide a problem into parts that can be dealt

with separately� …create an understanding of how the parts

depend on/relate to each other

Page 6: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Example Dimensions of Separation

� Time� Requirements, design, implementation, testing, …� Dial, receive confirmation, connect, talk, …

� Qualities� Efficiency and user friendliness� Correctness and portability

� Views� Data flow and control flow� Management and development

Page 7: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Modularity

� Separation into individual, physical parts� Decomposability

� Divide and conquer

� Composability� Component assembly� Reuse

� Understanding� Localization

� Special case of separation of concerns� Divide and conquer “horizontally”� “Brick”-effect

Page 8: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Modularity

Big

SmallSmall SmallSmall

Page 9: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Abstraction

� Separation into individual, logical parts� Relevant versus irrelevant details

� Use relevant details to solve task at hand� Ignore irrelevant details

� Special case of separation of concerns� Divide and conquer “vertically”� “Iceberg”-effect

Page 10: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Abstraction

Big

Abstraction

Details

Page 11: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Anticipation of Change

� Not anticipating change often leads to highcost and unmanageable software� Software development deals with inherently

changing requirements� Software development can tolerate neither high

cost nor unmanageable software

� Anticipation of change helps to…� …create a software infrastructure that absorbs

changes easily� …enhance reusability of components� …control cost in the long run

Page 12: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Generality

� Not generalizing often leads to continuousredevelopment of similar solutions� Software development involves building many

similar kinds of software (components)� Software development cannot tolerate building

the same thing over and over again

� Generality leads to…� …increased reusability� …increased reliability� …faster development� …reduced cost

Page 13: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Incrementality

� Delivering a large product as a whole, and inone shot, often leads to dissatisfaction and aproduct that is “not quite right”� Software development typically delivers one final

product� Software development cannot tolerate a product

that is not quite right or dissatisfies the customer

� Incrementality leads to…� …the development of better products� …early identification of problems� …an increase in customer satisfaction

� Active involvement of customer

Page 14: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Cohesion

VERSUS

Page 15: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Coupling

VERSUS

Page 16: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Provided Interface

ImplementationRequired Interface

A Good Separation of Concerns, 1

Abstraction through the use of provided/required interfacesModularity through the use of componentsLow coupling through the use of hierarchiesHigh cohesion through the use of coherent implementations

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Page 17: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

A Good Separation of Concerns, 2

Abstraction through the use of provided/required interfacesModularity through the use of componentsLow coupling through the use of a central “blackboard”High cohesion through the use of coherent implementations

Implementation

Provided Interface

Page 18: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Benefit 1: Anticipating Change

Separating concerns anticipates change

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Implementation

Provided Interface

Page 19: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Benefit 1: Anticipating Change

Separating concerns anticipates change

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Implementation

Provided Interface

Page 20: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Benefit 2: Promoting Generality

Separating concerns promotes generality

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Page 21: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Benefit 3: Facilitating Incrementality

Separating concerns facilitates incrementality

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Implementation

Provided Interface

Provided Interface

ImplementationRequired Interface

Provided Interface

ImplementationRequired Interface

Page 22: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Recurring, Fundamental Principles

� Rigor and formality� Separation of concerns

� Modularity� Abstraction

� Anticipation of change� Generality� Incrementality

These principles apply to all aspects of software engineering

Page 23: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

ICS 52 Life CycleRequirements

phaseVerify

DesignphaseVerify

ImplementationphaseTest

TestingphaseVerify

Page 24: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Requirements Phase

� Terminology� Requirements analysis/engineering

� Activity of unearthing a customer’s needs

� Requirements specification� Document describing a customer’s needs

� Note: requirements address what a customerneeds, not what a customer wants� A customer often does not know what they want� Time-lag between initial desire and future need� Long and arduous, sometimes educational,

process

Page 25: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Requirements Analysis

� System engineering versus softwareengineering� What role does software play within the full

solution?� Trend: software is everywhere

� Even in computer chips (TransMeta)

� Contract model versus participatory design� Contract: carefully specify requirements, then

contract out the development� Participatory: customers, users, and software

development staff work together throughout thelife cycle

Page 26: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Techniques for Requirements Analysis

� Interview customer� Create use cases/scenarios� Prototype solutions� Observe customer� Identify important objects/roles/functions� Perform research� Construct glossaries� Question yourself

Use the principles

Page 27: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Requirements Specification

� Serves as the fundamental reference pointbetween customer and software producer

� Defines capabilities to be provided withoutsaying how they should be provided� Defines the “what”� Does not define the “how”

� Defines environmental requirements on thesoftware to guide the implementers� Platforms� Implementation language(s)

� Defines software qualities

Page 28: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Software Qualities

� Correctness� Reliability� Robustness� Performance� User friendliness� Verifiability� Maintainability� Repairability� Safety

� Evolvability� Reusability� Portability� Understandability� Interoperability� Productivity� Size� Timeliness� Visibility

These qualities often conflict with each other

Page 29: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Why Spend a Lot of Time?

� A requirements specification is the source forall future steps in the software life cycle� Lays the basis for a mutual understanding

� Consumer (what they get)� Software producer (what they build)

� Identifies fundamental assumptions� Potential basis for future contracts

� Better get it right� Upon delivery, some software is actually rejected

by customers

� Changes are cheap� Better make them now rather than later

Page 30: ICS 52 Introduction to Software Engineeringtaylor/ics52_fq01/vdh-qualities.pdf · Recurring and fundamental principles of software engineering An introduction to requirements. Lecture

©2001, University of California, IrvineLecture 2-1

Your Tasks

�� Read and study slides of this lecture�� Read and study Chapter 2 and Chapter 3 of

Ghezzi, Jazayeri, and Mandrioli