02 req ts collection

Upload: arunimdr

Post on 03-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 02 Req Ts Collection

    1/42

    ESEEinfhrung in Software Engineering

    2. Requirements Collection

    Prof. O. Nierstrasz

  • 8/12/2019 02 Req Ts Collection

    2/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.2

    http://en.wikipedia.org/wiki/Fair_use

  • 8/12/2019 02 Req Ts Collection

    3/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.3

    Roadmap

    > The Requirements Engineering Process> Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

  • 8/12/2019 02 Req Ts Collection

    4/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.4

    Sources

    > Software Engineering, I. Sommerville, 7th Edn., 2004.> Software Engineering A Practitioners Approach, R. Pressman,

    Mc-Graw Hill, 5th Edn., 2001.

    > Objects, Components and Frameworks with UML, D. D'Souza, A.Wills, Addison-Wesley, 1999

  • 8/12/2019 02 Req Ts Collection

    5/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.5

    Roadmap

    > The Requirements Engineering Process> Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

  • 8/12/2019 02 Req Ts Collection

    6/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.6

    Kommission:

    7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 7 88:00 - 9:00

    9:00 - 10:00

    10:00 - 11:00

    11:00 - 12:00

    12:00 - 13:00

    13:00 - 14:00

    14:00 - 15:00

    15:00 - 16:00

    16:00 - 17:00

    17:00 - 18:00

    Bemerkungen: Unterschrift:

    Zeitschema

    Jan 2002 Feb 2002

    Bitte ankreuzen wo Sie keinenfalls mitmachen knnen, und senden Sie das ausgefllte Formular bis ___________ ans Dekanat zurck.

  • 8/12/2019 02 Req Ts Collection

    7/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.7

    Electronic Time Schedule

    So,basically we need a form for the time schedule that can be distributed by eMail, aplace (html) where I can deposit these forms after they have been filled out, and an

    algorithm that calculates a few possible meeting times, possibly setting priorities tocertain persons of each committee (since there will always be some time scheduleoverlaps). It would also be great if there were a way of checking whether everybody ofthe relevant committee has really sent their time schedule back and at the same timelisting all the ones who have failed to do so. An automatic invitation letter for thecommittee meeting to all the persons involved, generated through this programme, wouldbe even a further asset.

    How can we transform this description into a requirements specification?

  • 8/12/2019 02 Req Ts Collection

    8/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.8

    The Requirements Engineering Process

    Feasibilitystudy

    Requirementselicitation and

    analysisRequirementsspecification

    Requirementsvalidation

    Feasibilityreport

    Systemmodels

    User and system

    requirements

    Requirements

    document

    Ian Sommerville 2000

  • 8/12/2019 02 Req Ts Collection

    9/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.9

    Requirements Engineering Activities

    Feasibi l i ty studyDetermine if the user needscan be satisfiedwith the available technologyand budget.

    Requirements

    analysis

    Find out what system stakeholders require

    from the system.Requirements

    def in i t ion

    Define the requirementsin a formunderstandable to the customer.

    Requirements

    specif icat ion

    Define the requirements in detail. (Written asa contract between client and contractor.)

    Requirements are for users;

    specifications are for analysts

    and developers.

  • 8/12/2019 02 Req Ts Collection

    10/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.10

    Requirements Analysis

    Sometimes called requirements elicitationor requirementsdiscovery

    Technical staff work with customers to determine

    > the application domain,> the servicesthat the system should provide and

    > the systems operational constraints.

    Involves various stakeholders:> e.g., end-users, managers, engineers involved in

    maintenance, domain experts, trade unions, etc.

  • 8/12/2019 02 Req Ts Collection

    11/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.11http://en.wikipedia.org/wiki/Fair_use

  • 8/12/2019 02 Req Ts Collection

    12/42 Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.12

    Problems of Requirements Analysis

    Various problems typically arise:

    Stakeholders dont knowwhat they really want

    Stakeholders express requirements in their own terms

    Different stakeholders may have conflicting requirements

    Organisational and political factorsmay influence the systemrequirements

    The requirements changeduring the analysis process.

    New stakeholdersmay emerge.

  • 8/12/2019 02 Req Ts Collection

    13/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.13

    Impedance Mismatches

    As Management

    requested it

    As the Project

    Leader defined it

    As Systems

    designed it

    As Programming

    developed it

    As

    Operations

    installed it

    What the

    User wanted

  • 8/12/2019 02 Req Ts Collection

    14/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.14

    Requirements evolution

    > Requirements always evolveas a better understanding

    of user needs is developed and as the organisationsobjectives change

    > It is essential toplan for changein the requirements as

    the system is being developed and used

  • 8/12/2019 02 Req Ts Collection

    15/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.15

    The Requirements Analysis Process

    Requirementsvalidation

    Domain

    understanding Prioritization

    Requirements

    collection

    Conflict

    resolution

    Classification

    Requirementsdefinition andspecification

    Processentry

    Ian Sommerville 2000

  • 8/12/2019 02 Req Ts Collection

    16/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.16

    Roadmap

    > The Requirements Engineering Process

    > Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

  • 8/12/2019 02 Req Ts Collection

    17/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.17

    Use Cases and Scenarios

    A use caseis the specificationof a sequence of actions, includingvariants, that a system (or other entity) can perform, interacting withactorsof the system.

    e.g., buy a DVD through the internet

    A scenariois aparticular trace of action occurrences, starting from aknown initial state.

    e.g., connect to myDVD.com, go to the search page

    ...

  • 8/12/2019 02 Req Ts Collection

    18/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.18

    Use Cases and Viewpoints ...

    Stakeholdersrepresent different problem viewpoints.

    Interview as many differentkinds of stakeholders aspossible/necessary

    Translate requirements into use casesor stories about thedesired system involving a fixed set of actors (users and systemobjects)

    For each use case, capture both typical and exceptionalusagescenarios

    Userstend to think about systems in terms of features.

    You must get them to tell you storiesinvolving those features.

    Use cases and scenarios can tell you if the requirements arecomplete and consistent!

  • 8/12/2019 02 Req Ts Collection

    19/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.19

    Unified Modeling Language

    Class Diagramsvisualize logical structureof system

    in terms of classes, objects and relationships

    Use Case Diagramsshow external actors and use casestheyparticipate in

    Sequence Diagramsvisualize temporal message orderingof aconcrete scenarioof a use case

    Collaborat ion

    (Communicat ion)

    Diagrams

    visualize relationshipsof objects exchangingmessages in a concrete scenario

    State Diagramsspecify the abstract statesof an object andthe transitionsbetween the states

    UML is the industry standard for documenting OO models

  • 8/12/2019 02 Req Ts Collection

    20/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.20

    Use Case Diagrams

    More on

    this later

  • 8/12/2019 02 Req Ts Collection

    21/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.21

    Sequence Diagrams

  • 8/12/2019 02 Req Ts Collection

    22/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.22

    Writing Requirements Definitions

    Requirements definitions usually consist of natural language,supplemented by (e.g., UML) diagrams and tables.

    Three types of problems can arise:

    Lack of clarity: It is hard to write documents that are bothprecise andeasy-to-read.

    Requirements confusion: Functional and non-functional requirementstend to be intertwined.

    Requirements amalgamation: Several different requirementsmay beexpressed together.

  • 8/12/2019 02 Req Ts Collection

    23/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.23

    Roadmap

    > The Requirements Engineering Process

    > Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

  • 8/12/2019 02 Req Ts Collection

    24/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.24

    Functional and Non-functionalRequirements

    Functional requirementsdescribe system servicesorfunctionsCompute sales tax on a purchase

    Update the database on the server ...

    Non-functional requirementsare constraintson the systemor the development process

    Non-functional requirements may be more critical than functionalrequirements.

    If these are not met, the system is useless!

  • 8/12/2019 02 Req Ts Collection

    25/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.25

    Non-functional Requirements

    Product

    requirements:

    specify that the delivered product must behavein a particular way

    e.g. execution speed, reliability, etc.

    Organisat ional

    requirements:

    are a consequence of organisational policiesand procedures

    e.g. process standards used, implementationrequirements, etc.

    External

    requirements:

    arise from factors which are externalto thesystem and its development process

    e.g. interoperability requirements, legislativerequirements, etc.

  • 8/12/2019 02 Req Ts Collection

    26/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.26

    Types of Non-functional Requirements

    Performancerequirements

    Spacerequirements

    Usability

    requirements

    Efficiencyrequirements

    Reliabilityrequirements

    Portabilityrequirements

    Interoperabilityrequirements

    Ethicalrequirements

    Legislative

    requirements

    Implementation

    requirements

    Standards

    requirements

    Delivery

    requirements

    Safetyrequirements

    Privacyrequirements

    Productrequirements

    Organizationalrequirements

    Externalrequirements

    Non-functionalrequirements

    Ian Sommerville 2000

    S C

  • 8/12/2019 02 Req Ts Collection

    27/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.27

    Examples of Non-functionalRequirements

    Product

    requirement

    It shall be possible for all necessary communicationbetween the APSE and the user to be expressed inthe standard Ada character set.

    Organisat ional

    requirement

    The system development processand deliverabledocuments shall conform to the process anddeliverables defined inXYZCo-SP-STAN-95.

    External

    requirement

    The system shall provide facilities that allow any

    user to check if personal data is maintained on thesystem.A procedure must be defined and supportedin the software that will allow users to inspect

    personal dataand to correct any errors in that data.

    ESE R i C ll i

  • 8/12/2019 02 Req Ts Collection

    28/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.28

    Requirements Verifiability

    Requirements must be written so that they can beobjectively verified.

    Imprecise:

    The system should be easy to useby experienced controllersand should be organised in such a way that user errors areminimised.

    Terms like easy to use and errors shall be minimised areuseless as specifications.

    Verif iable: Experienced controllers should 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 usersshould not exceed two per day.

  • 8/12/2019 02 Req Ts Collection

    29/42

    ESE Req irements Collection

  • 8/12/2019 02 Req Ts Collection

    30/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.30

    Precise Requirements Measures (II)

    Property Measure

    Reliability

    Mean time to failure

    Probability of unavailabilityRate of failure occurrence

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

    PortabilityPercentage of target dependent statementsNumber of target systems

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    31/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.31

    Roadmap

    > The Requirements Engineering Process

    > Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    32/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.32

    Prototyping Objectives

    The objective of evolutionary prototypingis to deliver aworking systemto end-users.

    Development starts with the requirements that are bestunderstood.

    The objective of throw-away prototypingis to validate orderive the system requirements.

    Prototyping starts with that requirements that arepoorlyunderstood.

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    33/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.33

    Evolutionary Prototyping

    > Must be used for systems where the specification cannotbe developed in advance.

    e.g., AI systems and user interface systems

    > Based on techniques which allow rapid system iterations.e.g., executable specification languages, VHL languages, 4GLs,

    component toolkits

    > Verification is impossibleas there is no specification.Validationmeans demonstrating the adequacy of the system.

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    34/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.34

    Throw-away Prototyping

    > Used to reduce requirements riskThe prototype is developedfrom an initial specification, delivered

    for experiment then discarded

    > The throw-away prototype should notbe considered as afinal systemSome system characteristics may have been left out

    (e.g., platform requirements may be ignored)

    There is no specification for long-term maintenance

    The system will be poorly structured and difficult to maintain

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    35/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.35

    Roadmap

    > The Requirements Engineering Process

    > Use Cases

    > Functional and non-functional requirements

    > Evolutionary and throw-away prototyping

    > Requirements checking and reviews

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    36/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.36

    Requirements Checking

    ValidityDoes the system provide the functionswhich best supportthe customers needs?

    Consistency Are there any requirements conflicts?

    CompletenessAre all functionsrequired by the customerincluded?

    Real ismCan the requirements be implementedgiven available budget and technology?

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    37/42

    Oscar Nierstrasz

    ESE Requirements Collection

    ESE 2.37

    Requirements Reviews

    > Regular reviewsshould be held while the requirementsdefinition is being formulated

    > Both client and contractorstaff should be involved inreviews

    > Reviews may be formal(with completed documents) orinformal.

    Good communicationsbetween developers, customers andusers can resolve problems at an early stage

  • 8/12/2019 02 Req Ts Collection

    38/42

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    39/42

    Oscar Nierstrasz

    q

    ESE 2.39

    Traceability

    To protect against changes you should be able to trace back from everysystem component to the original requirementthat caused itspresence

    C1 C2 Cmreq1 x

    req2 x

    x

    x

    reqn x x

    A software processshould help you keepthis virtual table up-to-date

    Simple techniquesmay be quitevaluable (namingconventions, ...)

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    40/42

    Oscar Nierstrasz

    q

    ESE 2.40

    What you should know!

    > What is the difference between requirements analysisand specification?

    > Why is it hard to define and specify requirements?

    > What are use cases and scenarios?> What is the difference between functional and non-

    functional requirements?

    > Whats wrong with a requirement that says a product

    should be user-friendly?> Whats the difference between evolutionary and throw-

    away prototyping?

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    41/42

    Oscar Nierstrasz ESE 2.41

    Can you answer the followingquestions?

    > Why isnt it enough to specify requirements as a set ofdesired features?

    > Which is better for specifying requirements: naturallanguage or diagrams?

    > How would you prototype a user interface for a web-based ordering system?

    > Would it be an evolutionary or throw-away prototype?

    > What would you expect to gain from the prototype?

    > How would you check a requirement for adaptability?

    ESE Requirements Collection

  • 8/12/2019 02 Req Ts Collection

    42/42

    License

    > http://creativecommons.org/licenses/by-sa/2.5/

    Attribution-ShareAlike 2.5You are free: to copy, distribute, display, and perform the work to make derivative works to make commercial use of the work

    Under the following conditions:

    Attribution.You must attribute the work in the manner specified by the author or licensor.

    Share Alike.If you alter, transform, or build upon this work, you may distribute the resultingwork only under a license identical to this one.

    For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder.

    Your fair use and other rights are in no way affected by the above.