WXGE 6103 Software Engineering Process and Practice Software







































- Slides: 39

WXGE 6103 Software Engineering Process and Practice Software Requirements

Contents n n n Introduction Functional Requirements Non-functional Requirements User Requirements Interface Specification Software Requirements Document

Requirement engineering (RE) n n n The process of establishing the services that the customer requires from a system and the constraints under which it operates and is developed Output of RE process : A set of requirements (descriptions of the system services and constraints) Can be high level or low level details

Types of requirement n n User requirements ¨ High-level abstract requirements ¨ Statements in natural language plus diagrams of the services the system is expected to provide and the constraints under which it must operate ¨ Written by customer /stakeholder. System requirements ¨ A structured document setting out detailed descriptions of the system’s functions, services and operational constraints. Defines what is to be implemented. ¨ Produced by developer ¨ may be part of a contract between client and developer.

Requirements readers

Functional and Non-functional requirements n n n 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, what the system should not do. Non-functional requirements ¨ Constraints on the services or functions offered by the system such as timing constraints, constraints on the development process, standards, etc. ¨ Emergent system properties such as reliability, usability, maintainability, response time etc. Domain requirements ¨ Reflect characteristic & constraints of the application domain

Functional Requirements n E. g. for a university library system, LIBSYS, to order books and documents from other libraries ¨ The user shall be able to search either all of the initial set of databases or select a subset from it. ¨ 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).

Functional Requirements n n In principle, requirements should be both complete and consistent Complete ¨ All services required by the user should be defined Consistent ¨ Requirement should not have contradictory definitions In practice, it is impossible to produce a complete and consistent requirements document

Non-functional Requirements n n Not directly related to the specific functions provided by the system. Non-functional requirements may be more critical than functional requirements. Define system properties (reliability, response time and storage requirements) and constraints (I/O device capability, data representations) May be concerned with the process (e. g. must use a particular CASE system, programming language or development method)

Classification of Non-functional Requirements n Product requirements ¨ n specify the product behavior (e. g. performance, reliability, etc. ) Organisational requirement Derived from organisational policies and procedures e. g. process standards (TSP) used, implementation requirements (programming language etc) ¨ E. g. company standard process XYZCo-SPSTAN-95. ¨

Classification of Non-functional Requirements n External requirements arise from factors external to the system and its development process e. g. interoperability requirements, legislative requirements, etc. ¨ Example: The system shall not disclose any personal information about customers apart from their name and reference number to the operators of the system ¨

Non-functional Requirements Types

Non-functional Requirements n Normally state the goal (general intention of the user), which tends to lead to misinterpretation n Verifiable Non-functional requirement ¨ A statement using some measure that can be objectively tested

Non-functional Requirements n Example ¨ A system goal n ¨ 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 n 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.

Non-functional Requirements Measures / Metrics

Non-functional Requirements n n Conflicts between different non-functional requirements are common in complex systems, have to trade-off between conflicting requirements. For eg: Spacecraft system ¨ To minimise weight, the number of separate chips in the system should be minimised ¨ To minimise 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?

User Requirements n n n Highly abstract 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

User Requirements n Problems with Natural Language ¨ Lack of clarity n ¨ Requirements confusion n ¨ Precision is difficult without making the document difficult to read Functional and non-functional requirements tend to be mixed-up Requirements amalgamation n Several different requirements may be expressed together

Sample : LIBSYS requirement 4. . 5 LIBSYS shall provide a financial accounting system that maintains records of all payments made by users of the system. System managers may configure this system so that regular users may receive discounted rates.

Requirement problems n Database requirements includes both conceptual and detailed information ¨ Describes the concept of a financial accounting system that is to be included in LIBSYS; ¨ However, it also includes the detail that managers can configure this system - this is unnecessary at this level.

Guidelines for writing requirements Invent a standard format and use it for all requirements. n Use language in a consistent way. Use ‘shall’ for mandatory requirements. Use ‘should’ for desirable requirements. n Use text highlighting to identify key parts of the requirement. n Avoid the use of computer jargon. n

System requirements More detailed specifications of user requirements n Serve as a basis for designing the system n May be used as part of the system contract n System requirements may be expressed using system models n In principle, requirements should state what the system should do and the design should reflect this n

Problems with NL specification n Ambiguity ¨ 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. n Over-flexibility ¨ The same thing may be said in a number of different ways in the specification. n Lack of modularisation ¨ It is not easy to modularise requirements written in NL.

Alternatives to NL specification

Structured language specifications n n The freedom of the requirements writer is limited by a predefined template for requirements. All requirements are written in a standard way. 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 specification.

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

Form-based node specification

Tabular specification Used to supplement natural language. n Particularly useful when you have to define a number of possible alternative courses of action. n

Tabular specification

Graphical models are most useful when you need to show state changes or where you need to describe a sequence of actions. n Different graphical models are explained in Chapter 8. n

Sequence diagrams These show the sequence of events that take place during some user interaction with a system. n You read them from top to bottom to see the order of the actions that take place. n Cash withdrawal from an ATM n ¨ Validate card; ¨ Handle request; ¨ Complete transaction.

Sequence diagram of ATM withdrawal

Interface specification Most systems must operate with other systems and the operating interfaces must be specified as part of the requirements. n Three types of interface may have to be defined n ¨ Procedural interfaces; ¨ Data structures that are exchanged; ¨ Data representations. n Formal notations are an effective technique for interface specification.

PDL interface description

Software Requirements Document (SRD) n n n 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

Software Requirements Document n n Possible organization based on IEEE standard: Structure ¨ Preface ¨ Introduction ¨ Glossary ¨ User requirements definition ¨ System architecture ¨ System requirements specification ¨ System models ¨ System evolution ¨ Appendices ¨ Index

Standards for Requirements Document: n IEEE Standard (IEEE/ANSI 830 -1998) 1. Introduction 1. 1 Purpose 1. 2 Scope 1. 3 Definition, acronyms and abbreviations 1. 4 References 1. 5 Overview of remainder of the document 2. 1. 2. 3. General description 2. 1 Product perspective 2. 2 Product functions 2. 3 User characteristics 2. 4 General constraints 2. 5 Assumptions and dependencies Specific requirements (functional, non-functional and interface requirements) Appendices Index [117]

Tutorial 3 (In a group of 2 and 3) 1) 2) As a manager of an Airline company, write ‘user requirement’ to advertise a project on Online Airline Booking System on a newspaper. As a project manager of a development company, write ‘system requirements’ that you want to submit to bid for the Online Airline Booking System Project.