Topics 15 to 26 • Functional/Non-Functional Requirements, FURPS+, TELOS Feasibility, IEEE 830 SRS & RTM
Requirements Engineering (RE) is the systematic process of discovering, analyzing, documenting, and maintaining software requirements throughout the project lifecycle. The cost of fixing a requirements error escalates exponentially across subsequent phases:
$$\mathbf{\text{Relative Cost: Requirements (1x)} \rightarrow \text{Design (5x)} \rightarrow \text{Coding (10x)} \rightarrow \text{Testing (20x)} \rightarrow \text{Post-Release (100x–200x)!}}$$| Category | Definition & Scope | Concrete Industry Examples |
|---|---|---|
| Functional Requirements (FR) | Specifies the exact behavioral services and computational functions the system must perform (What the system does). | • "The system shall calculate compound interest using formula $A = P(1 + r/n)^{nt}$." • "The system shall generate PDF invoices upon successful Stripe payment." |
| Non-Functional Requirements (NFR) | Specifies systemic quality attributes, performance bounds, security constraints, and operational standards (How well it performs). | • "The system shall maintain $99.99\%$ monthly availability." • "API response latency shall not exceed $200\text{ms}$ at $10,000$ concurrent requests." |
| Dimension | Evaluation Criteria | Quantitative Analytical Techniques |
|---|---|---|
| T — Technical | Can the system be constructed with available hardware, software stacks, and engineering skills? | Proof-of-concept prototyping, technology risk scoring. |
| E — Economic | Is the financial return on investment sufficient to justify capital expenditure? | Cost-Benefit Analysis (CBA), Net Present Value (NPV), ROI, Payback Period. |
| L — Legal | Does the project comply with intellectual property laws, data privacy, and industry regulations? | Compliance audits (GDPR, SOC2, HIPAA, PCI-DSS). |
| O — Operational | Will the end-users embrace the software within existing organizational workflows? | Change management assessments, user resistance surveys. |
| S — Schedule | Can the project meet strict market windows or hard statutory deadlines? | PERT schedule variance analysis, critical path evaluation. |
A software project requires an initial development investment of $I_0 = \$100,000$. It generates annual net cash inflows of $C_1 = \$40,000, C_2 = \$50,000, C_3 = \$50,000$ over 3 years at a discount rate of $r = 10\%$ ($0.10$):
$$\mathbf{\text{NPV} = \sum_{t=1}^n \frac{C_t}{(1 + r)^t} - I_0}$$| Quality Attribute | Engineering Meaning & Verification Method |
|---|---|
| 1. Correct | Every stated requirement accurately reflects true real-world user needs. |
| 2. Unambiguous | Every requirement statement possesses exactly one possible interpretation (Zero vagueness: avoid words like "user-friendly", "fast"). |
| 3. Complete | Includes all essential capabilities, boundary conditions, error responses, and default states (No `TBD` sections). |
| 4. Consistent | Contains zero internal contradictions between conflicting requirement specifications. |
| 5. Verifiable (Testable) | There exists a finite, cost-effective automated or manual test case that can definitively prove requirement satisfaction. |
| 6. Modifiable | Structured with unique numbering and cross-references so changes can be made without cascading errors. |
| 7. Traceable | Each requirement has a unique identifier linked backward to business goals and forward to design modules and test cases. |
| 8. Prioritized | Ranked by customer importance and technical stability (e.g., MoSCoW: Must-have, Should-have, Could-have, Won't-have). |
| 9. Feasible | Achievable within system constraints, available budget, and technological capabilities. |
| Req ID | Requirement Description | Architecture Component | Source Code File | Test Case ID |
|---|---|---|---|---|
| REQ-101 | User password reset via OTP | AuthService.java | /auth/PasswordReset.java | TC-AUTH-01, TC-AUTH-02 |
| REQ-102 | PDF Invoice Generation | BillingModule.java | /billing/PdfGenerator.java | TC-BILL-05 |
QFD (Yoji Akao) is a structured technique that translates customer desires ("Voice of the Customer") directly into actionable software engineering requirements:
| QFD Requirement Category | Customer Expectation Profile | System Behavior & Satisfaction Impact |
|---|---|---|
| 1. Normal Requirements | Explicitly requested in customer meetings. | Customer is satisfied if present, dissatisfied if absent (e.g., Search filter). |
| 2. Expected Requirements | Implicit baseline capabilities assumed without asking. | Customer takes them for granted; absence causes catastrophic dissatisfaction (e.g., Data encryption, crash resilience). |
| 3. Exciting Requirements | Unexpected, innovative delightful features. | Absence causes zero complaint; presence creates immense customer delight and market differentiation (e.g., AI auto-completion). |
CRC Modeling (Beck & Cunningham) provides an agile, physical index-card method for discovering object-oriented requirements:
An automated testing framework costs $\$60,000$ to engineer. It generates recurring annual QA labor savings of $\$25,000/\text{year}$ over a 4-year lifecycle:
The Chung et al. NFR Framework models non-functional requirements as Softgoals that are "satisficed" rather than strictly satisfied:
Compare 3 Requirements ($R_1, R_2, R_3$) in a Pairwise Comparison Matrix $\mathbf{A}$ where $R_1$ is $3\times$ more important than $R_2$, and $R_1$ is $6\times$ more important than $R_3$:
$$\mathbf{A} = \begin{bmatrix} 1 & 3 & 6 \\ 1/3 & 1 & 2 \\ 1/6 & 1/2 & 1 \end{bmatrix} \implies \text{Normalized Weight Vector } \mathbf{W} = \begin{bmatrix} \mathbf{0.667 \ (66.7\%)} \\ \mathbf{0.222 \ (22.2\%)} \\ \mathbf{0.111 \ (11.1\%)} \end{bmatrix}$$ $$\mathbf{\text{Priority Order: } R_1 \text{ (Must-Have)} \gg R_2 \text{ (Should-Have)} \gg R_3 \text{ (Could-Have)}}$$Formal methods use discrete mathematics to prove program correctness before code generation:
┌─── BorrowBook ──────────────────────────┐
│ Δ LibraryState │
│ user? : UserID │
│ book? : BookID │
├─────────────────────────────────────────┤
│ user? ∈ RegisteredUsers │
│ book? ∈ AvailableBooks │
│ #(BorrowedBooks ▷ {user?}) < MaxLimit │
│ AvailableBooks' = AvailableBooks \ {book?}│
│ BorrowedBooks' = BorrowedBooks ∪ {(book?, user?)}│
└─────────────────────────────────────────┘
Verification: Guaranteed to prevent exceeding checkout limits or borrowing unavailable books by mathematical proof!
In a QFD House of Quality matrix, customer requirements ($CR_1$: Fast Search, $CR_2$: Data Security) have weights $W = [8, 10]$. Technical metrics ($TC_1$: Query Cache, $TC_2$: 256-Bit SSL) have relationship scores $R = [[9, 1], [3, 9]]$:
For a proposed change impacting 4 classes in a 40-class system: $\text{Impact Ratio} = \frac{4}{40} = \mathbf{10.0\%}$. Change is classified as Moderate Impact and approved by CCB!
Construct a complete Use Case Specification table for `Process Checkout`:
| Field | Specification Description |
|---|---|
| Use Case ID | UC-CHK-01 |
| Primary Actor | Authenticated Registered Customer |
| Pre-Conditions | Customer cart contains $\ge 1$ available in-stock item; customer is logged in. |
| Main Success Scenario | 1. Customer reviews cart. 2. Enters shipping address. 3. Selects payment method. 4. Authorizes charge. 5. System generates order ID and triggers PDF receipt email. |
| Extensions (Exception) | 4a. Card authorization fails $\implies$ Prompt customer to retry with secondary payment method. |
| Post-Conditions | Inventory reserved, credit card charged, order record persisted in database. |
Classify requirements defects using IEEE standards:
In a University Course Registration domain: Extract entities (`Student`, `CourseOffering`, `Professor`, `Transcript`) and establish multiplicity constraints: A Student registers for $3..6$ CourseOfferings; a CourseOffering is taught by exactly $1$ Professor!
In Use Case Point analysis:
In an ATM system specification: For every valid pin state, verify that all three failure conditions (Wrong PIN, Expired Card, Network Timeout) have explicit state transitions and localized error dialog prompts!
If $R_{\text{initial}} = 80$, $R_{\text{added}} = 12$, $R_{\text{modified}} = 8$, and $R_{\text{deleted}} = 4$:
$$\mathbf{\text{RVI} = \frac{R_{\text{added}} + R_{\text{modified}} + R_{\text{deleted}}}{R_{\text{initial}}} \times 100\% = \frac{12 + 8 + 4}{80} \times 100\% = \frac{24}{80} \times 100\% = \mathbf{30.0\%}}$$An RVI $> 20\%$ signals high requirement volatility, requiring agile iterative planning rather than fixed-price waterfall contracts!
Specify exact communication protocols, endpoints, payload formats (`application/json`), TLS 1.3 encryption, and error status codes (`400 Bad Request`, `401 Unauthorized`, `500 Server Error`) for zero interface mismatch!
Identify and mitigate cognitive biases in stakeholder interviews: (1) Availability Heuristic (users request features based on recent memorable outages), (2) Anchoring Bias (over-weighting the initial executive suggestion), (3) Confirmation Bias (analysts only hearing feedback supporting their pet architecture)!
`Make Payment` is a generalized base use case specialized by `Make Credit Card Payment` and `Make Crypto Payment` via standard object-oriented polymorphism!
Identify 4 common ambiguity pitfalls: (1) Vague Adverbs ("rapidly"), (2) Loophole Conditionals ("as far as possible"), (3) Passive Voice ("the password shall be hashed" $\implies$ by client or server?), (4) Compound Conjunctions ("A and B or C" $\implies$ $(A \land B) \lor C$ vs $A \land (B \lor C)$)!
In a Medical Device audit: Verify that $100\%$ of safety requirements in SRS map forward to verified unit tests and hazard mitigation code modules with zero orphan code!
Construct realistic user personas (e.g., "Dr. Priya, Senior Radiologist, needs 1-click DICOM export within 2 seconds") to ground abstract requirements in real clinical workflows!
• Must-Be: Core features users expect (login).
• One-Dimensional: Customer satisfaction scales linearly with performance (search speed).
• Attractive / Delighters: Innovative features creating high delight (AI instant summary)!
Using SAT solvers (Z3) to mathematically prove that a set of 500 security rules contains zero mutually contradictory assertion deadlocks!
Specify application security verification standards: Rate limiting ($100 \text{ req/min/IP}$), AES-GCM-256 at-rest database encryption, Argon2id password hashing, and zero raw PII in application debug logs!
Audit matrix verifying $100\%$ of customer requirements have assigned test cases ($\ge 1$ pass/fail test per FR) and zero untested orphaned source code classes!
Explicitly delineate external third-party boundaries: Stripe Payment Gateway, Twilio SMS API, and AWS S3 Storage Interfaces with timeout fallback rules!
Shadowing air traffic controllers in live radar rooms to discover unstated cognitive overload bottlenecks during multi-aircraft conflict resolution!
Using natural language processing rule checkers to flag non-quantifiable adjectives ("efficient", "flexible", "intuitive") and auto-prompting requirement authors for quantitative bounding metrics!
• Brainstorming: Unconstrained rapid generation of ideas without initial critique.
• NGT: Structured 4-phase technique (Silent idea generation $\rightarrow$ Round-robin recording $\rightarrow$ Group discussion $\rightarrow$ Anonymous mathematical voting), eliminating dominant stakeholder bias and yielding objective requirement priorities!
In a Customer Management subsystem: Verify that for every data entity (`CustomerProfile`, `Invoice`, `CreditCard`), all 4 lifecycle operations (Create, Read, Update, Delete/Deactivate) have explicit business logic and authorization constraints!
In a Medical Infusion Pump controller: Using model checking to verify that for every possible drug rate limit, the safety cutoff circuit is guaranteed to trigger within $50\text{ms}$ under all operational conditions!
Calculating the multiplier cost of requirements modification across the SDLC: $\text{Cost}(t) = C_0 e^{k t}$. A requirement defect caught in testing costs $20\times$ more to fix than during SRS inspection!
Mathematical proof that session tokens expire after $15\text{ minutes}$ of user inactivity and cannot be forged without cryptographic secret key!
Specifying multi-region active-active database replication latency bounds ($< 50\text{ms}$) and automated partition tolerance guarantees adhering to the CAP Theorem!
Feature: User Password Authentication
Scenario: Successful login with valid credentials
Given the user is on the login portal
When the user enters valid email and correct password
Then the system should issue a signed JWT token and redirect to dashboard
Using Temporal Logic (LTL/CTL) to prove that the system guarantees safety invariant $\mathbf{G}(\text{Request} \implies \mathbf{F} \text{Acknowledge})$ across all $2^{30}$ reachable execution states with zero deadlock risk!
Contractual SLA engineering: Specifying $99.999\%$ uptime (less than 5.26 minutes downtime per year) with p99 API latency bounded below $120\text{ms}$ at $50,000 \text{ QPS}$ load!