Post

Ch 4: Requirements Engineering

Requirements engineering process, types of requirements, and validation.

Ch 4: Requirements Engineering

Chapter 4 — Requirements Engineering

(Sommerville Ch. 4)

What is Requirements Engineering?

Requirements engineering is the process of finding out, analyzing, documenting, and checking the services and constraints that a system must provide.

Types of Requirements

1
2
3
4
5
6
7
8
9
10
11
12
Requirements
├── Functional requirements
│   └── Describe what the system should do
│       (e.g. "The system shall allow users to search by keyword")
│
├── Non-functional requirements
│   ├── Product requirements (reliability, efficiency, portability)
│   ├── Organizational requirements (standards, implementation environment)
│   └── External requirements (legal, ethical)
│
└── Domain requirements
    └── Derived from the application domain

User vs. System Requirements

User RequirementsSystem Requirements
Written for customers/managersWritten for developers
High-level, natural languageDetailed and precise
What the system should doHow the system does it
Example: “Users shall be able to search inventory”Example: “The system shall search the inventory database using SQL within 2 seconds for datasets up to 100,000 records”

Why distinguish them: User requirements define the problem; system requirements define the solution. Conflating them leads to over-constraining design decisions early, or under-specifying what is actually needed.

The Requirements Engineering Process

1
2
3
4
5
6
7
8
┌────────────────┐    ┌────────────────┐    ┌────────────────┐
│  Requirements  │───►│  Requirements  │───►│  Requirements  │
│  Elicitation   │    │  Specification │    │  Validation    │
│  & Analysis    │    │                │    │                │
└────────────────┘    └────────────────┘    └────────────────┘
        ▲                                            │
        └────────────────────────────────────────────┘
                      (iterative)
  • Elicitation: Interviews, workshops, observation, prototyping, use cases
  • Analysis: Classify, model, prioritize, negotiate conflicts
  • Specification: Document in requirements document (SRS)
  • Validation: Checks against correctness, completeness, consistency

Requirements Document Structure (SRS)

  1. Introduction — purpose, scope, definitions
  2. Overall description — product perspective, functions, user characteristics
  3. Specific requirements
    • Functional requirements
    • Non-functional requirements
    • Interface requirements
  4. System models — use cases, data models
  5. Glossary
  6. Index

Metrics for Non-Functional Requirements

PropertyMeasure
SpeedTransactions/second; response time
SizeKilobytes; number of ROM chips
Ease of useTraining time; number of help frames
ReliabilityMean time to failure; probability of unavailability
RobustnessTime to restart after failure
PortabilityPercentage of platform-dependent statements

Requirements Validation Checks

  • Validity — do requirements reflect the actual needs of users?
  • Consistency — are there conflicts between requirements?
  • Completeness — are all required functions included?
  • Realism — can requirements be implemented given budget and technology?
  • Verifiability — can requirements be tested?

ATM System — Example Use Cases

Use CaseActorDescription
Withdraw cashCustomerInsert card, enter PIN, select amount, receive cash
Check balanceCustomerView account balance on screen
Transfer fundsCustomerMove money between linked accounts
Deposit cashCustomerInsert cash; system credits account
Change PINCustomerEnter old PIN, enter and confirm new PIN
Replenish cashBank engineerLoad cash cartridges into ATM

Social and Political Factors in Requirements

Example: National ID system

  • Political factors: civil liberties groups may oppose data collection
  • Social factors: cultural attitudes toward government surveillance differ
  • These factors can veto technically correct requirements or introduce legally mandatory ones
This post is licensed under CC BY 4.0 by the author.