Beruflich Dokumente
Kultur Dokumente
Luca Vigan
Dipartimento di Informatica Universit di Verona
Requirements Analysis
1 / 81
Objectives
To introduce the concepts of user and system requirements. To describe functional and nonfunctional requirements. To explain how software requirements may be organized in a requirements document.
Requirements Analysis
2 / 81
Table of contents
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
3 / 81
Background/motivation
Outline
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
4 / 81
Background/motivation
A welcome problem...
You have inherited 100 Million Euro and want to start your own airline company!
Requirements Analysis
5 / 81
Background/motivation
Flights: Routes, times, seats, crew, food (rst class, vegetarian, ...)... Crew and support staff: Personal data, tasks, time plan, pay-roll, ... Customers: Reservations, accounts, Miles & More, meat-eater, ... Inventory: Airplanes, fuel, vegetarian food, deliveries (carrots, ...)
Requirements Analysis
6 / 81
Background/motivation
Building a system that is secure, redundant (fault tolerant), evolvable, . . . and this is only the beginning!
Requirements Analysis
7 / 81
Outline
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
8 / 81
The context
Requirements analysis and definition System and software design Implementation and unit testing Integration and system testing Operation and maintenance
First phase: requirements analysis and denition. Sometimes called requirements planning or requirements engineering.
Requirements Analysis
9 / 81
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. N.B.: the term requirement is not used in the software industry in a consistent way: it may range from a high-level abstract statement of a service or of a system constraint to a detailed mathematical functional specication. This is inevitable as requirements may serve a dual function:
May be the basis for a bid for a contract = must be open to interpretation. May be the basis for the contract itself = must be dened in detail.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 10 / 81
Requirements abstraction
If a company wishes to let a contract for a large software development project, it must dene its needs in a sufciently abstract way that a solution is not predened. The requirements must be written so that several contractors can bid for the contract, offering, perhaps, different ways of meeting the client organizations needs. Once a contract has been awarded, the contractor must write a system denition 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. from: A.M. Davis, Software requirements: Objects, Functions, & States, Prentice Hall 1993.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 11 / 81
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 systems functions, services, and operational constraints. Denes what should be implemented so may be part of a contract between client and contractor.
Requirements Analysis
12 / 81
Functional requirements: statements of services the system should provide, how the system should react to particular inputs and how the system should behave in particular situations. Non-functional requirements: constraints on the services or functions offered by the system such as timing constraints, constraints on the development process, standards, etc. Domain requirements: requirements that come from the application domain of the system and that reect characteristics of that domain.
Requirements Analysis
13 / 81
Functional requirements
Statements of services the system should provide, how the system should react to particular inputs and how the system should behave in particular situations. Describe functionality or system services. 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.
Requirements Analysis
14 / 81
Non-functional requirements
Constraints on the services or functions offered by the system such as timing constraints, constraints on the development process, standards, etc. Dene system properties and constraints, e.g. reliability, response time and storage requirements. Constraints are I/O device capability, system representations, etc. Process requirements may also be specied mandating a particular CASE system, programming language, or development method. Non-functional requirements may be more critical than functional requirements. If these are not met, the system is useless.
Requirements Analysis
15 / 81
Requirements Analysis
16 / 81
Non-functional classications
Product requirements: requirements which specify that the delivered product must behave in a particular way, e.g. execution speed, reliability, etc. Organizational requirements: requirements which are a consequence of organizational 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.
Requirements Analysis
17 / 81
Requirements interaction
Conicts between different non-functional requirements are common in complex systems. Example: a spacecraft system.
To minimize weight, the number of separate chips in the system should be minimized. To minimize power consumption, lower power chips should be used. However, using low power chips may mean that more chips have to be used. Which is the most critical requirement?
Requirements Analysis
19 / 81
Domain requirements
Are derived from the application domain and describe system characteristics and features that reect the domain. Domain requirements may be new functional requirements, constraints on existing requirements, or dene specic computations. If domain requirements are not satised, the system may be unworkable. Possible problems: Understandability:
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.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 20 / 81
More detailed specications of system functions, services and constraints than user requirements. They are intended to be a basis for designing the system. They may be incorporated into the system contract. System requirements may be dened or illustrated using system models discussed in the next weeks.
Requirements Analysis
22 / 81
Structuring requirements
Outline
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
23 / 81
Structuring requirements
Requirements Analysis
24 / 81
Structuring requirements
Goal (cont.)
The goal: Specify the requirements as detailed as possible, but as abstract as possible. To understand what the product should do.
Otherwise programming is pointless! Exception: rapid prototyping to aid analysis itself.
As a contract with the customer. To plan the development. Many projects require a concrete product denition.
Companies, governments, most large companies... For instance, the term Pichtenheft is sometimes used in Germany to stress the legal aspects (Heft = fascicolo/quaderno, Picht = obbligo, sich verpichten= impegnarsi a fare qualcosa).
Requirements Analysis
25 / 81
Structuring requirements
Planning is difcult
What does one want? The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difcult as establishing the detailed technical requirements... No other part of the work so cripples the resulting system if done wrong. No other part is more difcult to rectify later. (Brooks 1987) Compromises are necessary between different, contradictory user requirements. Example: Bank
Requirements Analysis
26 / 81
Structuring requirements
Planning is difcult
What does one want? The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difcult as establishing the detailed technical requirements... No other part of the work so cripples the resulting system if done wrong. No other part is more difcult to rectify later. (Brooks 1987) Compromises are necessary between different, contradictory user requirements. Example: Bank customers want security. Bank employees want minimal restrictions and overhead. Delayed effects are difcult to predict. Example:
Requirements Analysis
26 / 81
Structuring requirements
Planning is difcult
What does one want? The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difcult as establishing the detailed technical requirements... No other part of the work so cripples the resulting system if done wrong. No other part is more difcult to rectify later. (Brooks 1987) Compromises are necessary between different, contradictory user requirements. Example: Bank customers want security. Bank employees want minimal restrictions and overhead. Delayed effects are difcult to predict. Example: Inuence of the invention of the auto on
Requirements Analysis
26 / 81
Structuring requirements
Planning is difcult
What does one want? The hardest single part of building a software system is deciding precisely what to build. No other part of the conceptual work is as difcult as establishing the detailed technical requirements... No other part of the work so cripples the resulting system if done wrong. No other part is more difcult to rectify later. (Brooks 1987) Compromises are necessary between different, contradictory user requirements. Example: Bank customers want security. Bank employees want minimal restrictions and overhead. Delayed effects are difcult to predict. Example: Inuence of the invention of the auto on the sexual behavior of American teenagers.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 26 / 81
Structuring requirements
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 interoperate with other systems that generate design requirements. The use of a specic design may be a domain requirement.
Requirements Analysis
27 / 81
Structuring requirements
Ambiguity: The readers and writers of the requirement must interpret the same words in the same way. Natural language is naturally ambiguous so this is very difcult. Over-exibility: The same thing may be said in a number of different ways in the specication. Lack of modularization: Natural language structures are inadequate to structure system requirements.
Requirements Analysis
28 / 81
Structuring requirements
Graphical notations:
Graphical languages supplemented by text annotations help dene the functional requirements for the system. Use-case descriptions and sequence diagrams are commonly used nowadays.
Mathematical specications:
Unambiguous specications based on mathematical concepts such as nite-state machines or sets. However, most customers dont understand formal specications and are reluctant to accept them as a system contract.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 29 / 81
Structuring requirements
Requirements specication
For whom Customer (Managers) Users Contract manager System architects Customer System architects Programmers System architect Programmers
Question addressed What is the problem (rough)? Answer: Product sketch in natural language (+gures) What is the problem (detailed)? Answer: Product denition Precise structured document Serves as contract What is the solution (rough)? Answer: System architecture
Software specication
Requirements Analysis
30 / 81
Structuring requirements
Product sketch: 1. The program should read les over the Internet. Product denition: 1.1. 1.2. 1.3. 1.3.1. The user can access and view les over the Internet. A le is given through a URL, typed in from the keyboard. Various types of URLs are supported. html means that the le is hyper-text... (Explanation of how are les loaded, displayed, browsed, ...)
Requirements Analysis
31 / 81
Structuring requirements
Structuring requirements
Unstructured text is poor. Example: Editor for a CASE Tool. 2.6 Grid facilities To assist in positioning entities on a diagram, the user may turn on a grid in either centimeters or inches, via an option on the control panel. Initially, the grid is off. The grid may be turned on and off at any time during an editing session and can be toggled between inches and centimeters. A grid option will be provided on the reduce-to-t view but the number of grid lines shown will be reduced to avoid lling the smaller diagram with grid lines. Problems:
The rst sentence mixes different requirements. Incomplete description (e.g. units used when turned on). Justication partially mixed with specication.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 32 / 81
Structuring requirements
Structuring requirements
Structuring requirements
The terminology used in the description may be limited. The advantage is that the most of the expressiveness of natural language is maintained but a degree of uniformity is imposed on the specication.
Structuring requirements
Form-based specication
Denition 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) of the function.
Requirements Analysis
36 / 81
Structuring requirements
Structuring requirements
Tabular specication
Used to supplement natural language. Particularly useful when you have to dene a number of possible alternative courses of action. Example: Condition Sugar level falling (r 2 < r 1) Sugar level stable (r 2 = r 1) Sugar level increasing and rate of increase decreasing ((r 2 r 1) < (r 1 r 0)) Sugar level increasing and rate of increase stable or increasing ((r 2 r 1) (r 1 r 0)) Action CompDose = 0 CompDose = 0 CompDose = 0 CompDose = round ((r 2 r 1)/4) If rounded result = 0 then CompDose = MinimumDose
Requirements Analysis
38 / 81
Structuring requirements
Graphical models
Graphical models are most useful when you need to show how state changes or where you need to describe a sequence of actions. Different graphical models explained in the next weeks.
Requirements Analysis
39 / 81
Structuring requirements
System modeled as data-transformer. Describes data as well as function input and output. Control ow not xed. Expresses only (very weak!) functional requirements.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 40 / 81
Structuring requirements
41 / 81
Structuring requirements
DFD renement
Can be used at different abstraction levels.
Maximal level: just one bubble. Renement: renement of a bubble in separate specialized functions. The renement can be repeated up to a satisfactory level of detail.
D2 D3
D1 D4
A
D5
D1 D1
A1
D2 D2
A2
D5
Flow continuity constraint: the renement of a function must preserve the same input and output ows.
A3
D4 D3
Requirements Analysis
42 / 81
Structuring requirements
Requirements Analysis
43 / 81
Structuring requirements
Requirements Analysis
44 / 81
Structuring requirements
Requirements Analysis
45 / 81
Structuring requirements
Requirements Analysis
46 / 81
Structuring requirements
Structuring requirements
DFD: summary
Pro: Easy to use. Understandable. General. Contra: No formal specication. Impossible to evaluate or execute the specication. Limitations: DFD dont describe control and synchronization. DFD dont model dynamic view (not at regime) of the system. A system cannot always be modeled as a function.
Requirements Analysis
48 / 81
Structuring requirements
CONNECT TO HANDSET
VOICE CALL
CONNECT TO COMPUTER
Structuring requirements
Sequence diagrams
Show the sequence of events that take place during some user interaction with a system. You read them from top to bottom to see the order of the actions that take place. Cash withdrawal from an ATM: Validate card. Handle request. Complete transaction.
Requirements Analysis
50 / 81
Structuring requirements
Interface specication
Most systems must operate with other systems and the operating interfaces must be specied as part of the requirements. Three types of interface may have to be dened:
Procedural interfaces. Data structures that are exchanged. Data representations.
Requirements Analysis
51 / 81
Structuring requirements
The requirements document is the ofcial statement of what is required of the system developers. Should include both a denition of user requirements and a specication of the system requirements. It is NOT a design document. As far as possible, it should set off (describe clearly) WHAT the system should do rather than HOW it should do it.
Requirements Analysis
52 / 81
Structuring requirements
Requirements Analysis
53 / 81
Structuring requirements
Product objectives. Product scope. Denitions, acronyms, abbreviations. References. Overview of requirements description. Product function. User description. General restrictions. Acceptance criteria and dependencies.
General description.
1 2 3 4
3 4
Structuring requirements
Introduction.
1 2 3 4 5
Objectives of the Requirements Document. Product objectives. Denitions, acronyms, abbreviations. References. Document structure. Product description (from the different points of view). Product functionalities. User characteristics. Constraints.
General description.
1 2 3 4
3 4 5
Structuring requirements
The standard IEEE 830-1993 is concerned with the Software Requirements Specication (SRS). It mandates that an SRS must satisfy 8 quality attributes:
1 2 3 4 5 6 7 8
Requirements Analysis
56 / 81
Structuring requirements
An SRS is unambiguous if and only if every requirement stated therein has only one interpretation. As a minimum, this requires that each characteristic of the nal product is described using a single unique term. In cases where a term used in a particular context could have multiple meanings, the term must be included in a glossary where its meaning is made more specic. Ogni requisito ha una sola interpretazione possibile, sia per chi lo denisce (chi scrive), sia per chi lo usa (chi legge).
Requirements Analysis
57 / 81
Structuring requirements
An SRS is correct if and only if every requirement stated therein is one that the software shall meet. Ogni requisito rappresenta fedelmente nel sistema nale qualcosa che stato richiesto: Da questa denizione segue che:
Non pu esistere nessun tool o procedura che verica la correttezza no a quando il sistema non implementato. possibile vericare la correttezza delle speciche rispetto ad altre speciche, ad esempio pi astratte.
Requirements Analysis
58 / 81
Structuring requirements
Inclusion of all signicant requirements, whether relating to functionality, perfomance, design constraints, attributes or external interfaces. Denition of the responses of the software to all reliable classes of input data in all realizable classes of situations. Note that it is important to specify the responses to valid and invalid input values. Full labelling and referencing of all gures, tables, and diagrams in the SRS and denition of all terms and units of the measure.
Any SRS that uses the phrase TBD ... is not complete. If it is necessary, it should be accompanied by: A description of the conditions causing the TBD (for example, why an answer is not known) so that the situation can be solved. A description of what must be done to eliminate the TBD. Contiene i requisiti di tutte le funzionalit del sistema, e specica, per tutte le possibili classi di input, la risposta del sistema. La completezza spesso ottenibile solo incrementalmente, dopo rafnamenti successivi.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 59 / 81
Structuring requirements
An SRS is veriable if and only if every requirement stated therein is veriable. A requirement is veriable if and only if there exists some nite cost-effective process with which a person or machine can check that the software product meets the requirement. If a method cannot be devised to determine whether the software meets a particular requirement then that requirement has to be removed or revised. Ogni requisito deve essere chiaro. Se un requisito non esprimibile in termini vericabili nel momento in cui lo SRS viene denito, dovrebbe essere denito un momento del ciclo di vita del software entro cui il requisito deve essere presentato in una forma vericabile.
Requirements Analysis
60 / 81
Structuring requirements
Consistency refers to internal consistency. An SRS is consistent if and only if no set of individual requirements described in it conict. There are three types of likely conicts in an SRS: Two or more requirements might describe the same real world object but use different terms for that objects. The specied characteristics of the real world object might conict. There might be a logical or temporal conict between two specied actions.
Requirements Analysis
61 / 81
Structuring requirements
An SRS is modiable if and only if its structure and style are such that any necessary changes to the requirements can be made easily, completely and consistently. Modiability generally requires an SRS to: Have a coerent and easy-to-use organization, with a table of contents, an index, and explicit cross-referencing. Not to be redundant. Whenever redundancy is necessary, the SRS should include explicit cross-references to make it modiable. Express each requirement separately, rather than intermixed with other requirements.
Requirements Analysis
62 / 81
Structuring requirements
Requirements Analysis
63 / 81
Structuring requirements
An SRS is ranked for importance and/or stability if each requirement in it has an identier to indicate either the importance or stability of that particular requirement. Typically, all of the requirements that relate to a software product are not equally important. Some requirements may be essential, while others may be desiderable. Each requirement in the SRS should be identied to make these differences clear and explicit
Requirements Analysis
64 / 81
Structuring requirements
Processes and data requirements. Behavior and quality requirements. Security requirements. Implementation constraints and installation requirements. Development goals.
5 6 7 8
Plan for incremental delivery of subsystems. Denitions, acronyms, abbreviations. Notes. Appendix.
Requirements Analysis Ingegneria del SW, 11.03.11 65 / 81
Structuring requirements
General. Analysis of status quo (current situation). IT security goals. Threat and risk analysis. System requirements.
1 2 3 4 5
General system description and intended use. Organizational context for system deployment. Description of external interfaces. Functionality requirements. Quality requirements. Technical constraints. Organizational constraints. Miscellaneous constraints.
Requirements Analysis Ingegneria del SW, 11.03.11 66 / 81
Constraints.
1 2 3
Outline
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
67 / 81
Section I Problem description and goals. Section II Functionality. Section III User prole. Section IV Acceptance criteria. Section V Development, deployment, and maintenance environments, interfaces, and other considerations. Section VI General architecture (solution sketch). Section VII Information sources (e.g. contact persons, manuals, glossary).
Requirements Analysis
68 / 81
Section I Problem description and goals. Section II Functionality. Section III User prole. Section IV Acceptance criteria. Section V Development, deployment, and maintenance environments, interfaces, and other considerations. Section VI General architecture (solution sketch). Section VII Information sources (e.g. contact persons, manuals, glossary).
Requirements Analysis
70 / 81
The information system should help administer data and accounts for customers of branch banks. Primary goals are:
Fast retrieval of up-to-date information about customers and their accounts, to aid customer support. Cost-effective and secure administration of payments. To automate the processing of standing orders.
The system should allow for a printer that prints account statement so that... Employee training is planned. Maximally 2 employees per branch...
Requirements Analysis
71 / 81
Develop a comprehensive Bank Information System (BIS) for the customers different branch banks. Functionality can be loosely categorized as follows:
(a) Account administration. The analysis of the current customer and account data indicates that the following functionality is required:
Create new accounts. Delete and change accounts. Create, change, and delete standing orders. ...
Requirements Analysis
72 / 81
Users of BIS are, exclusively, employees of the branch bank. They are:
Bank tellers who process cash payments. Customer representatives who use the information system to advise customers and administer their data. Administrators who maintain user data, x technical problems, and are responsible for backups.
Requirements Analysis
73 / 81
BIS Project sketch Section V. Development, deployment, and maintenance environments, interfaces, and other considerations
Each branch should have its own software copy as well as a mainframe computer with multiple graphic terminals. The system operates in multi-user mode. The system should be linked to an external central system that coordinates the work of the individual branches and maintains central data. The development and maintenance environment consist of Unix workstations and the operating environment consists of a SUN-compute server running Unix and supporting an Oracle database system. The data transfer between the central system and the BIS is over Datex-P cables. ...Graphical interfaces in the current standard (e.g. OSF-Motif) will be used.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 75 / 81
BIS Project sketch Section V. Development, deployment, and maintenance environments, interfaces, and other considerations (cont.)
The system includes a one year guarantee. A maintenance contract can later be arranged. Subsequent system extensions possibly include a subsystem to aid investment planning and support for managing life-insurance policies.
Requirements Analysis
76 / 81
Requirements validation
Goal: check whether the sketch is: Valid: Is the right functionality specied? For whom? Consistency: There should be no conicts between requirements. Completeness: The entire functionality should be specied. Realistic: It must be possible to implement the system under the given resource (time and nancial) constraints. How? Different approaches with different advantages/disadvantages:
Walk-through and requirements review. Construction of a prototype. Use of logic-based tools.
Requirements Analysis
78 / 81
Conclusions
Outline
Background/motivation The analysis and denition phase Structuring requirements A concrete example of a simplied product sketch Conclusions
Requirements Analysis
79 / 81
Conclusions
Key points
Requirements set out what the system should do and dene constraints on its operation and implementation. Functional requirements set out services the system should provide. Non-functional requirements constrain the system being developed or the development process. User requirements are high-level statements of what the system should do. User requirements should be written using natural language, tables and diagrams. System requirements are intended to communicate the functions that the system should provide. A software requirements document is an agreed statement of the system requirements. The IEEE standard is a useful starting point for dening more detailed specic requirements standards.
Luca Vigan (Universit di Verona) Requirements Analysis Ingegneria del SW, 11.03.11 80 / 81
Conclusions
Homework: a project
Development of a scheduling Class Scheduling System CSS for an educational institution, e.g. the Department of Computer Science of the University of Verona.
1
Assume the role of the client (or customer, i.e. the university), and write a problem (project) description. Among others, the description should address the following issues: Who will use the system? Who will/should administer the system? Which functionalities (input, output) should the system have? In which computer environment should the system work? Who could act as an expert, i.e. who is available to provide further information (and answer possible questions of the contractor about the project to be developed)? Which acceptance criteria (which kind of tests) should the system satisfy?
Assume the role of the contractor (i.e. provider, or system architect ) and, on the basis of the problem description, start the Analysis&Denition phase by giving a detailed analysis of the requirements and by writing a detailed and structured product (project) sketch.
Requirements Analysis Ingegneria del SW, 11.03.11 81 / 81