Requirements And Specification

3y ago
34 Views
3 Downloads
2.25 MB
72 Pages
Last View : 9d ago
Last Download : 3m ago
Upload by : Matteo Vollmer
Transcription

Requirements and Specification

Requirements Engineering The process of establishing the services thatthe customer requires from a system and theconstraints under which it operates and isdeveloped The requirements themselves are thedescriptions of the system services andconstraints that are generated during therequirements engineering process

Requirements Engineering The hardest single part of building a softwaresystem is deciding what to build– Cripples the process if done wrong– Costly to rectify later

? The goal of requirement engineering is todetermine (pick one):– What software client wants?– What software client needs?

Software specification (or requirements engineering) The process of establishing what services are required andthe constraints on the system’s operation anddevelopment. Requirements engineering process Feasibility study Is it technically and financially feasible to build the system? Requirements elicitation and analysis What do the system stakeholders require or expect from the system? Requirements specification Defining the requirements in detail Requirements validation Checking the validity of the requirementsSommerville: Ch 2.2.1, p36ffChapter 2 Software Processes5

The requirements engineering processFeasibilitystudyRequirementselicitation lidationFeasibilityreportSystemmodelsUser and systemrequirementsRequirementsdocumentChapter 2 Software Processes6

Outcome An agreed requirements document thatspecifies a system satisfyingstakeholder requirements. Two level of detailsEnd-users and customers need a high-levelstatement of the requirements.System developers need a more detailedsystem specification.Chapter 2 Software Processes7

User requirements Should describe requirements in such a waythat they are understandable by system userswho don’t have detailed technical knowledge. User requirements are defined using naturallanguage, tables and diagrams as these can beunderstood by all users.

The LIBSYS system A library system that provides a singleinterface to a number of databases of articlesin different libraries. Users can search for, download and printthese articles for personal study.

Determining Stakeholders and Needs Must determine stakeholders– Anyone who benefits from the system developed– E.g., who’s client and who’s user ? Try to understand what their needs are Reconcile different needs/points of view

Techniques for Requirement Gathering Interviewing User stories Straw man documents Prototypes

Interviewing One path is obvious– Sit down with client/user and ask questions– Listen to what they say, and what they don’t say A less obvious path– Master-apprentice relationship– Have them teach you what they do– Go to workplace and watch them do the task In all types of interviews, get details– Ask for copies of reports, logs, emails on process– These may support, fill in, or contradict what the user said

Extreme Programming – User Stories Recall: client writes user stories– Using client vocabulary Describe usage scenarios of software– Title, short description Each user story has acceptance tests– Clarify the story– Will tell you when the customer thinks story is done

Disadvantages of Talking Interviews are useful, but“I know you believe you understood what you think I said, but I amnot sure you realize that what you heard is not what I meant!” Users/clients may– Not have the vocabulary to tell you what they need– Not know enough about computer science tounderstand what is possible Or impossible– Sometimes may lead to restricted functionality Good idea to gather requirements in otherways, too

Strawman Sketch the product for the user/client– Storyboards– Flowcharts– HTML mock-ups– Illustrate major events/interfaces/actions Anything to convey ideas without writing code!

Rapid Prototyping Write a prototype– Major functionality, superficially implemented– Falls down on moderate-to-extreme examples No investment in scaling, error handling, etc. Show prototype to users/clients– Users have a real system – more reliable feedback– Refine requirements– But, significant investment

Pitfalls of Rapid Prototyping Needs to be done quickly– Remember, this is just the requirements phase!– Danger of spending too long refining prototype The prototype becomes the product– Prototype deliberately not thoroughly thought-out– Product will inherit the sub-optimal architecture Prototype serves as the spec– Prototype is incomplete, maybe even contradictory When done well, extremely useful

Summary of Requirements Gathering Find out what users/clients need– Not necessarily what they say they want Use– Interviews– User stories– Straw man documents– Rapid prototyping– As appropriate . . .

Requirement vs. Specification User Requirements– Statements in natural language plus diagrams of theservices the system provides and its operationalconstraints. Written for customers. System Specifications– A structured document setting out detailed descriptions ofthe system’s functions, services and operationalconstraints. Defines what should be implemented so may bepart of a contract between client and contractor. The distinction is often glossed over– Sommerville sees this as two levels of detail in therequirements document, the system requirements are a“functional specification” Ch 4, p83.

Specifications Describe the functionality of the product– Precisely– Covering all the circumstances Move from the finite to the infinite– Finite examples (requirements) to infinite set ofpossible computations– This is not easy

Specifications: theory & practice In principle, specifications should be:– Unambiguous: Only one way to interpret the spec– Complete Include descriptions of all facilities required.– Consistent There should be no conflicts or contradictions in thedescriptions of the system facilities. In practice, it is almost impossible to produce acomplete and consistent requirements document.

LIBSYS requirement4.5 LIBSYS shall provide a financial accountingsystem that maintains records of all payments madeby users of the system. System managers mayconfigure this system so that regular users mayreceive discounted rates.

Requirement problems Database requirements include both conceptual anddetailed information– Describes the concept of a financial accounting system that isto be included in LIBSYS;– However, it also includes the detail that managers canconfigure this system - this is unnecessary at this level.

Different Views of Specifications Developer’s– Specification must be detailed enough to be implementable– Unambiguous– Self-consistent Client’s/user’s– Specifications must be comprehensible– Usually means: not too technical Legal– Specification can be a contract– Should include acceptance criteria If the software passes tests X, Y, and Z, it will be accepted

Requirements readers

Informal Specifications Written in natural language– E.g., English Example“If sales for current month are below target sales, thenreport is to be printed, unless difference betweentarget sales and actual sales is less than half ofdifference between target sales and actual sales inprevious month, or if difference between target salesand actual sales for the current month is under 5%”

Problems with Informal Specs Informal specs of any size inevitably suffer fromserious problems– Omissions Something missing– Ambiguities Something open to multiple interpretations– Contradictions Spec says “do A” and “do not do A”– Amalgamation Different requirements mixed togetherThese problems will be faithfully implemented inthe software unless found in the spec

Informal Specifications Revisited“If sales for current month are below target sales, thenreport is to be printed, unless difference betweentarget sales and actual sales is less than half ofdifference between target sales and actual sales inprevious month, or if difference between target salesand actual sales for the current month is under 5%”

Informal Specifications Revisited“If sales for current month are below target sales, thenreport is to be printed, unless difference betweentarget sales and actual sales is less than half ofdifference between target sales and actual sales inprevious month, or if difference between target salesand actual sales for the current month is under 5%”January: target 100K, actual 64KFebruary: target 120K, actual 100KMarch: target 100K, actual 95,100

Comments on Informal Specification Informal specification is universally reviled– By academics– By “how to” authors Informal specification is also widely practiced– Why?

Why Do People Use Informal Specs? The common language is natural language– Customers can’t read formal specs– Neither can most programmers– Or most managers / lawyers– A least-common denominator effect takes hold Truly formal specs are very time-consuming– And hard to understand– And overkill for most projects

Semi-Formal Specs Best current practice is “semi-formal” specs– Allows more precision than natural language wheredesired Usually a boxes-and-arrows notation– Must pay attention to:– What boxes mean– What arrows mean– Different in different systems! We’ll see one example (UML) next time

Functional and non-functional Functional requirements– Statements of services the system should provide, how thesystem should react to particular inputs and how the systemshould behave in particular situations. Non-functional requirements– constraints on the services or functions offered by thesystem such as timing constraints, constraints on thedevelopment process, standards, etc. Domain requirements– Requirements that come from the application domain of thesystem and that reflect characteristics of that domain.

Functional requirements Describe functionality or system services Functional user requirements may be highlevel statements of what the system should dobut functional system specifications shoulddescribe the system services in detail.

The LIBSYS system A library system that provides a singleinterface to a number of databases of articlesin different libraries. Users can search for, download and printthese articles for personal study.

Examples: functional requirements The user shall be able to search either all of theinitial set of databases or select a subset from it. The system shall provide appropriate viewers forthe user to read documents in the documentstore. Every order shall be allocated a unique identifier(ORDER ID) which the user shall be able to copyto the account’s permanent storage area.

Example of Requirements imprecision Ambiguous requirements may be interpreted indifferent ways by developers and users. Consider the term ‘appropriate viewers’– User intention - special purpose viewer for eachdifferent document type;– Developer interpretation - Provide a text viewerthat shows the contents of the document.

Non-functional requirements These define system properties andconstraints e.g. reliability, response time andstorage requirements. Constraints are I/Odevice capability, system representations, etc. Process requirements may also be specifiedmandating a particular process, programminglanguage, or development method. Non-functional requirements may be morecritical than functional requirements. If theseare not met, the system is useless.

Non-functional classifications Product requirements– Requirements which specify that the delivered product mustbehave in a particular way e.g. execution speed, reliability,etc. Organizational requirements– Requirements which are a consequence of organizationalpolicies and procedures e.g. process standards used,implementation requirements, etc. External requirements– Requirements which arise from factors which are external tothe system and its development process e.g. interoperabilityrequirements, legislative requirements, etc.

Non-functional requirement requirementsPrivacyrequirementsSafetyrequirements

Non-functional requirements examples Product requirement8.1The user interface for LIBSYS shall be implementedas simple HTML without frames or Java applets. Organizational requirement9.3.2 The system development process and deliverabledocuments shall conform to the process and deliverablesdefined in XYZCo-SP-STAN-95. External requirement7.6.5 The system shall not disclose any personal informationabout customers apart from their name and reference numberto the operators of the system.

Goals and requirements Non-functional requirements/specifications may bevery difficult to state precisely and impreciserequirements 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 objectivelytested. Goals are helpful to developers as they convey theintentions of the system users.

Examples A system goal– The system should be easy to use by experienced controllersand should be organized in such a way that user errors areminimized A verifiable non-functional requirement– Experienced controllers shall be able to use all the systemfunctions after a total of two hours training. After thistraining, the average number of errors made by experiencedusers shall not exceed two per day.

Requirements measures

Requirements interaction Conflicts between different non-functionalrequirements are common in complex systems Spacecraft system– To minimize weight, the number of separate chipsin the system should be minimized.– To minimize power consumption, lower power chipsshould be used.– However, using low power chips may mean thatmore chips have to be used. Which is the mostcritical requirement?

(Application) Domain requirements Derived from the application domain Describe system characteristics and featuresthat reflect the domain. Domain requirements– new functional requirements,– constraints on existing requirements,– define specific computations. If domain requirements are not satisfied, thesystem may be unworkable.

Library system domain requirements There shall be a standard user interface to alldatabases which shall be based on the Z39.50standard. Because of copyright restrictions, somedocuments must be deleted immediately onarrival. Depending on the user’s requirements,these documents will either be printed locallyon the system server for manually forwardingto the user or routed to a network printer.

Train protection system The deceleration of the train shall becomputed as:– Dtrain Dcontrol Dgradientwhere Dgradient is 9.81ms2 * compensatedgradient/alpha and where the values of9.81ms2 /alpha are known for differenttypes of train.

Domain requirements problems Understandability– Requirements are expressed in the language of theapplication domain;– This is often not understood by software engineersdeveloping the system. Implicitness– Domain specialists understand the area so well thatthey do not think of making the domainrequirements explicit.

Guidelines for writing requirements Invent a “standard” format and use it for allrequirements. Use language in a consistent way. Use shall ormust for mandatory requirements, should fordesirable requirements Use text highlighting to identify key parts ofthe requirement Avoid the use of computer jargon See Reading on the Schedule

Requirements and design In principle, requirements should state whatthe system should do and the design shoulddescribe how it does this In practice, requirements and design areinseparable– A system architecture may be designed tostructure the requirements;– The system may inter-operate with other systemsthat generate design requirements;– The use of a specific design may be a domainrequirement.

The requirements document The official statement of what is required ofthe system developers.– includes a definition of user requirements– includes a specification of the systemrequirements. It is NOT a design document.– As far as possible, it should determine WHAT thesystem should do rather than HOW it should do it

Users of a requirements documentSystemcustomersSpecify the requirements andread them to check that theymeet their needs. Customersspecify changes to therequirements.ManagersUse the requirementsdocument to plan a bid forthe system and to plan thesystem development process.SystemengineersUse the requirements tounderstand what system isto be developed.System testengineersUse the requirements todevelop validation tests forthe system.SystemmaintenanceengineersUse the requirements tounderstand the system andthe relationships between itsparts.

Problems with NL specification Ambiguity– The readers and writers of the requirement mustinterpret the same words in the same way. NL isnaturally ambiguous so this is very difficult. Over-flexibility– The same thing may be said in a number ofdifferent ways in the specification. Lack of modularization– NL structures are inadequate to structure systemrequirements.

Alternatives to NL specification

Structured language specifications The freedom of the requirements writer islimited by a predefined template forrequirements All requirements are written in a standard way The terminology used in the description maybe limited The advantage is that the most of theexpressiveness of natural language ismaintained but a degree of uniformity isimposed on the specification

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

Form-based node specification

Tabular specification Used to supplement natural language Particularly useful when you have to define anumber of possible alternative courses ofaction

Tabular specification

Graphical models Graphical models are most useful when youneed to show how state changes or where youneed to describe a sequence of actions

Sequence diagrams These show the sequence of events that takeplace during some user interaction with asystem You read them from top to bottom to see theorder of the actions that take place Cash withdrawal from an ATM– Validate card– Handle request– Complete transaction

Sequence Diagram of ATM withdrawal64

Interface specification Most systems must operate with othersystems and the operating interfaces must bespecified as part of the requirements Three types of interface may have to bedefined– Procedural interfaces (i.e., APIs)– Data structures that are exchanged– Data representations (e.g., the ordering of bits) Formal notations are an effective techniquefor interface specification

Interface description

The requirements document The requirements document is the officialstatement of what is required of the systemdevelopers Should include both a definition of userrequirements and a specification of thesystem requirements It is NOT a design document. As far aspossible, it should set of WHAT the systemshould do rather than HOW it should do it

IEEE requirements standard Defines a generic structure for arequirements document that must beinstantiated for each specific system.– Introduction.– General description.– Specific requirements.– Appendices.– Index.

Requirements document structure Preface Introduction Glossary User requirements definit

Software specification (or requirements engineering) . requirements document, the system requirements are a “functional specification” Ch 4, p83. . Example of Requirements imprecision Ambiguous requirements may

Related Documents:

This specification is to be applied in conjunction with the supporting data sheet, quality requirements specification (QRS) and information requirements specification (IRS) as follows. IOGP S-740: Specification for Batteries (IEC) This specification

Universal Serial Bus Revision 3.2 Specification Universal Serial Bus Revision 3.2 Specification. xxxx and xxxx xxxx and xxxx. Uni-versal Serial Bus Specification Universal Serial Bus Revision 3.2 Specification I2C-Bus Specification I2C-Bus Specification Sys-tem Management Bus Specification

Digital speed controller installation direction (left)*2 DR Digital speed controller installation direction (right)*2 G5 Designated grease specification NM Non-motor end specification PN PNP specification*1 TMD2 Split motor and controller power supply specification WA Battery-less absolute encoder specification WL Wireless communication specification WL2 Wireless axis operation specification

HPKB Design Specification Document Data Mining Design Specification Document Non-Traditional Data Design Specification Document HMI Design Specification Document System Integration Design Specification Document 1.4. Software Design Specification Document Development Gui

requirements specification, software requirements specification, software design specification, software test specification, software integration specification, etc. Requirements A requirement is a need, expectation, or obligation. It can be stated or implied by an

1.4 Send requirements specification With a requirements specification finished with all left-hand side columns filled and some right-hand side column solution examples, it is time to send it to a range of suppliers and evaluate the replies. Screening candidate suppliers can be done in several ways: This specification is based on Requirements .

2 Does Not Meet Specification Requirements: Corrective action is necessary. 3 Meets Specification Requirements: Complies with project requirements. 0 Not Applicable: Rating not required in this area at this time. 4 Exceeds Specification Requirements: Exceeds project requirements. Scoring Index: 1. 419.01 2. 419.03(2)

2 Ring Automotive Limited 44 (0)113 213 7389 44 (0)113 231 0266 Ring is a leading supplier of vehicle lighting, auto electrical and workshop products and has been supporting the automotive aftermarket for more than 40 years, supplying innovative products and a range synonymous with performance and quality. Bulb technology is at the heart of the Ring business, which is supported by unique .