Software Requirements Engineering
Fundamentals of Requirements Engineering
- Definition of Requirements Engineering:
- The structured process of establishing:
- The services that the customer requires from a system.
- The constraints under which the system operates and is developed.
- Definition of Requirements:
- The formal descriptions of the system services and constraints that are generated during the requirements engineering process.
- The Dual Spectrum of a Requirement:
- A requirement can range broadly from a high-level abstract statement of a service or system constraint to a detailed mathematical functional specification.
- Requirements inevitably serve a dual function in the system lifecycle:
- Basis for a Bid: May serve as the basis for a bid for a contract; in this context, it must be open to interpretation to allow bidding contractors flexibility.
- Basis for the Contract: May serve as the basis for the contract itself; in this context, it must be defined in precise, exhaustive detail.
- Both levels of statement are officially designated as requirements.
Requirements Analysis Case Study: Point of Sale (POS) Systems
- POS System Overview:
- Definition: A Point of Sale (POS) or checkout is the physical or virtual place where a retail transaction is completed.
- Core Transaction: It is the specific point at which a customer executes a payment to a merchant in exchange for goods or services.
- Calculation Mechanisms: At the point of sale, a merchant calculates the total amount owing using a variety of potential methods:
- Manual calculation systems.
- Weighing machines (scales).
- Optical barcode scanners.
- Electronic cash registers (ECR).
- Hardware & Receipts: The merchant typically supplies the hardware and payment options used by the customer and normally issues a transaction receipt upon completion.
- Industry-Specific Customization:
- For small and medium-sized retailers, the POS must be tailored to the distinct operational needs of specific retail verticals:
- Grocery and Candy Stores: Require dedicated weighing scales integrated directly at the point of sale.
- Bars and Restaurants: Require functionality to customize sold items dynamically to accommodate special meal or beverage requests.
- Integration in Modern POS Software:
- Modern POS software incorporates advanced operational functionalities across various business verticals, including:
- Inventory management.
- Customer Relationship Management (CRM).
- Financial and accounting systems.
- Warehousing and supply chain management.
- Historical vs. Modern Architecture: Prior to modern integrated POS software, each of these functions was managed independently through siloed systems that required manual re-keying of information, resulting in high error rates.
- Requirements Identification Process:
- Requirements elicitation requires reading descriptive problem domain statements carefully to identify:
- Nouns: Identify candidate system entities, attributes, actors, and data stores (e.g., checkout, transaction, customer, merchant, goods, receipt, scale, inventory).
- Verbs: Identify functional actions, operations, and system responsibilities (e.g., pay, calculate, provide, issue, customize, re-key).
Levels and Types of Software Requirements
- User Requirements:
- High-level statements written in natural language accompanied by diagrams describing the services the system provides and its operational constraints.
- Primarily written for customers and non-technical stakeholders to describe functionality without implementation bias.
- System Requirements:
- A structured document that sets out detailed descriptions of system services, functions, and operational constraints.
- Often serves as the definitive legal and technical contract between the client and the software contractor.
- Software Design Specification:
- A detailed technical software description that serves as the explicit architectural foundation for system design and implementation.
- Authored specifically for software developers and system architects.
- Target Readership Across Requirement Levels:
- Different stakeholders interact with different requirements artifacts depending on their technical background and role.

- User Requirements Readers:
- Client managers.
- System end-users.
- Client engineers.
- Contractor managers.
- System architects.
- System Requirements Readers:
- System end-users.
- Client engineers.
- System architects.
- Software developers.
- Software Design Specification Readers:
- Client engineers (occasionally/perhaps).
- System architects.
- Software developers.
Functional and Domain Requirements
- Functional Requirements:
- Core Definition: Statements specifying the services the system must provide, detailing how the system should react to particular inputs, and defining how it behaves in particular situations.
- Contextual Factors: Depend directly on the category of software being produced, the expected user base, and the broader system environment.
- Abstraction Divide: Functional user requirements are typically high-level statements of system intent, whereas functional system requirements must elaborate these services in rigorous, precise detail.
- Concrete Examples:
- Database Search: "The user shall be able to search either all of the initial set of databases or select a subset from it."
- Document Viewer: "The system shall provide appropriate viewers for the user to read documents in the document store."
- Identifier Generation: "Every order shall be allocated a unique identifier (ORDER_ID) which the user shall be able to copy to the account’s permanent storage area."
- The Challenge of Requirements Imprecision:
- High-level or ambiguous natural language requirements create serious operational issues due to divergent interpretations.
- Example Analysis ("appropriate viewers"):
- User Intention: The system will provide a dedicated, special-purpose viewer optimized for each unique document type.
- Developer Interpretation: The system will simply provide a general-purpose text viewer that displays the raw contents of the document file.
- Completeness and Consistency:
- Completeness: The requirements document includes comprehensive descriptions of all facilities and services requested by the customer.
- Consistency: The requirements document contains no conflicting, contradictory, or mutually exclusive descriptions of system facilities.
- Real-World Limitation: In practical engineering scenarios, creating a completely consistent and complete requirements document for large, complex systems is extraordinarily difficult or impossible.
- Domain Requirements:
- Definition: Requirements derived directly from the application domain that reflect fundamental domain characteristics, constraints, and business rules.
- Forms of Expression: Can manifest as entirely new functional requirements, specific algorithmic computation constraints, or constraints placed upon existing functional requirements.
- Criticality: Failure to satisfy domain requirements often makes the entire system completely unworkable.
- Core Problems with Domain Requirements:
- Understandability: Expressed in the specialized terminology and jargon of the application domain, which software developers frequently do not comprehend.
- Implicitness: Domain experts understand their area so intuitively that they fail to make critical baseline domain requirements explicit, assuming they are common knowledge.
Non-Functional Requirements and Classifications
- Core Definition:
- Requirements that define system properties and operational constraints rather than specific functional behaviors.
- Cover parameters such as reliability, response time, I/O device capabilities, storage limitations, and system representation formats.
- Encompass process requirements, such as mandating a specific Computer-Aided Software Engineering (CASE) toolset, programming language, or software development methodology.
- Criticality: Non-functional requirements are often far more critical than individual functional requirements; failure to meet a non-functional constraint can render an entire software system completely useless regardless of functional capabilities.

- Classification Categories:
- Product Requirements:
- Mandate that the delivered product behave in a specified operational manner.
- Subcategories: Usability requirements, Efficiency requirements (subdivided into Performance requirements and Space requirements), Reliability requirements, and Portability requirements.
- Organizational Requirements:
- Derive directly from corporate policies, customer standards, and operational procedures.
- Subcategories: Delivery requirements, Implementation requirements, and Standards requirements.
- External Requirements:
- Stem from factors external to the software product and its organizational environment.
- Subcategories: Interoperability requirements, Ethical requirements, and Legislative requirements (subdivided into Privacy requirements and Safety requirements).
- Goals versus Verifiable Requirements:
- Non-functional requirements expressed informally are difficult to verify objectively.
- System Goal: A general, non-quantifiable statement expressing user intentions (e.g., "The system should be easy to use"). While helpful for context, goals are untestable.
- Verifiable Non-Functional Requirement: A structured requirement stated using measurable, objective metrics that can be empirically verified through testing.
- Comparative Example:
- System Goal: "The system should be easy to use by experienced controllers and should be organised in such a way that user errors are minimised."
- Verifiable Requirement: "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."
- Metrics for Non-Functional Requirement Properties:
- Speed:
- Processed transactions/second.
- User/Event response time.
- Screen refresh time.
- Size:
- K Bytes (KB).
- Number of RAM chips.
- Ease of Use:
- Training time.
- Number of help frames.
- Reliability:
- Mean time to failure (MTTF).
- Probability of unavailability.
- Rate of failure occurrence (ROCOF).
- Availability.
- Robustness:
- Time to restart after failure.
- Percentage of events causing failure.
- Probability of data corruption on failure.
- Portability:
- Percentage of target dependent statements.
- Number of target systems.
- Non-Functional Requirements Interactions and Trade-offs:
- Complex systems typically suffer from conflicts between competing non-functional requirements.
- Spacecraft System Case Study:
- Requirement 1: Minimize total weight by minimizing the number of separate hardware chips in the system.
- Requirement 2: Minimize total electrical power consumption by utilizing lower-power chips.
- Conflict: Utilizing low-power chips often necessitates employing a larger aggregate number of chips to achieve required processing capacity, directly contradicting the weight-minimization requirement.
Writing Requirements and Specification Notations
- Problems with Natural Language (NL) Specifications:
- Lack of Clarity: Achieving strict precision without making the document overwhelmingly difficult to read is nearly impossible.
- Requirements Confusion: Functional constraints, non-functional constraints, system goals, and design details become hopelessly intermingled.
- Requirements Amalgamation: Multiple distinct requirements are lumped together into single compound statements.
- Ambiguity: Writers and readers inevitably interpret words with subtle semantic differences.
- Over-Flexibility: The exact same architectural requirement can be phrased in radically different linguistic ways across the specification.
- Lack of Modularisation: Natural language constructs lack modular structuring mechanisms suitable for complex engineering specifications.
- Guidelines for Writing Requirements:
- Establish a standard, consistent document template and adhere to it for all specifications.
- Standardize terminology: use "shall" to designate mandatory requirements; use "should" to denote desirable/optional requirements.
- Utilize visual cues (text highlighting, bolding, typography) to emphasize critical aspects.
- Rigorously eliminate unnecessary technical jargon and computer buzzwords.
- The Inseparable Interplay Between Requirements and Design:
- In strict engineering theory, requirements outline what a system must do, while system design dictates how it executes those functions.
- In engineering practice, requirements and design are fundamentally intertwined:
- A high-level system architecture must often be formulated to structure the requirements document itself.
- Interoperability mandates with external legacy platforms introduce hard design constraints directly into requirements.
- Specific system designs may be strictly required by domain-specific regulations.
- Alternative Specification Notations:
- Structured Natural Language: Uses standard templates and tabular forms to impose uniformity, defining inputs, outputs, preconditions, postconditions, and side effects.
- Design Description Languages (DDLs / PDLs): Uses programming-language syntax extended with abstract constructs to model operational behavior.
- Graphical Notations: Leverages formal diagrams supplemented by textual annotations to capture functional models (e.g., Structured Analysis and Design Technique (SADT) by Ross (1977) / Schoman and Ross (1977), and Use-Case descriptions by Jacobsen, Christerson et al. (1993)).
- Mathematical Specifications: Utilizes formal notations based on mathematical concepts (e.g., finite-state automata, set theory) to eliminate ambiguity, though many clients cannot interpret them as legal contracts.
- Forms-Based Specifications Elements:
- Explicit definition of the target function or system entity.
- Concrete description of inputs and their external sources.
- Concrete description of outputs and their designated destinations.
- Formal indication of other supporting entities or shared resources required.
- Specification of preconditions and postconditions (where applicable).
- Comprehensive documentation of potential side effects.
- Program Description Languages (PDL):
- Primary Applications: Highly effective where an operation is fundamentally a strict temporal sequence of actions, or when defining rigid hardware and software operating interfaces.
- Disadvantages: Lacks expressiveness for non-algorithmic domain abstractions; non-programmers cannot understand the syntax; causes stakeholders to interpret the specification as an implementation design rather than a requirement.
- Concrete PDL Specification Example (ATM Main Processing Loop):
class ATM {
// declarations here
public static void main (String args[]) throws InvalidCard {
try {
thisCard.read (); // may throw InvalidCard exception
pin = KeyPad.readPin () ; attempts = 1 ;
while (!thisCard.pin.equals (pin) & attempts < 4 )
{
pin = KeyPad.readPin () ; attempts = attempts + 1 ;
}
if (!thisCard.pin.equals (pin))
throw new InvalidCard ("Bad PIN");
thisBalance = thisCard.getBalance () ;
do {
Screen.prompt (" Please select a service ") ;
service = Screen.touchKey () ;
switch (service) {
case Services.withdrawalWithReceipt:
receiptRequired = true ;
- Interface Specification:
- Necessary because most systems operate by interfacing with other software and hardware entities.
- Three Core Interface Types:
- Procedural interfaces (function/method calls).
- Data structures that are exchanged.
- Low-level data representations.
- Concrete PDL Interface Example (PrintServer):
interface PrintServer {
// defines an abstract printer server
// requires: interface Printer, interface PrintDoc
// provides: initialize, print, displayPrintQueue, cancelPrintJob, switchPrinter
void initialize ( Printer p ) ;
void print ( Printer p, PrintDoc d ) ;
void displayPrintQueue ( Printer p ) ;
void cancelPrintJob (Printer p, PrintDoc d) ;
void switchPrinter (Printer p1, Printer p2, PrintDoc d) ;
} //PrintServer
The Software Requirements Document (SRS)
- Purpose and Role:
- The formal, authoritative statement of agreed deliverables required from software engineers.
- Must specify external observable system behavior, operational constraints, predictable lifecycle evolution, and handling of unexpected error conditions.
- Serves as a reference baseline for maintenance engineers throughout system life.
- Strictly defines what the system must accomplish rather than how internal components are designed.
- Stakeholders and Users of the Requirements Document:

- System Customers: Specify their functional needs, read requirements to verify whether proposed services satisfy their operational goals, and author change requests.
- Managers: Use the requirements document to plan bids, track contractual milestones, and manage project scheduling.
- System Engineers: Use requirements to comprehend what software systems must be engineered and integrated.
- System Test Engineers: Use the document to develop system validation test cases and acceptance criteria.
- System Maintenance Engineers: Use requirements to comprehend system functionality and trace inter-component relationships during post-deployment changes.
- IEEE Standard Requirements Structure:
- Introduction.
- General description.
- Specific requirements.
- Appendices.
- Index.
- Detailed Requirements Document Structure:
- Introduction.
- Glossary (defining specialized terms and acronyms).
- User requirements definition.
- System architecture.
- System requirements specification.
- System models.
- System evolution (forecasting expected future changes).
- Appendices.
- Index.
Practical Class Exercises and Key Takeaways
- In-Class Exercise: Video Rental System (VRS):
- Problem Context: The owner of a local video store wants a new business plan where all video rental activities—except physical pickup and return—occur online to reduce in-store staffing and boost profits.
- Specified System Capabilities:
- Online Customer Functions: Search for videos, register/become members, rent videos, modify membership details, and pay overdue fees online.
- Store Personnel Functions: Process rented or returned physical media, add or remove video items to/from inventory, and update video metadata.
- Exercise Objective: Perform requirements linguistic analysis by extracting all candidate entity concepts (nouns) and functional responsibilities (verbs).
- Project Homework Task:
- Propose an original software engineering problem (e.g., adapt an intended final-year capstone project).
- Write a detailed, unambiguous requirements document intended for hand-off to an external software engineering vendor.
- Ensure every submitted software project is unique.
- Present the conceptual specification in class and conduct peer Requests for Proposals (RFPs).
- Core Summary Principles:
- Requirements formalize what a system must accomplish alongside its operational and development constraints.
- Functional requirements capture active system services; non-functional requirements constrain the solution space or production process.
- User requirements communicate high-level intent via natural language, diagrams, and tables; system requirements provide detailed contractual specifications using structured natural language, PDLs, or mathematical formalisms.
- The official Software Requirements Document represents the binding agreement between client and developer.