3.2
3.2 Software Requirements Modelling
Importance of Modelling Notations
Standard notations are crucial for several reasons:
Modelling: Provides a structured way of visually or textually representing complex systems, which is essential in understanding and analyzing software requirements.
Documenting: Facilitates thorough documentation of the requirements and systems architecture, which aids in future reference, maintenance, and compliance.
Communicating Decisions: Enhances clear communication among stakeholders, including developers, business analysts, and clients, ensuring that everyone has a unified understanding of project goals and specifications.
Benefits of Modelling
Effective modelling brings several advantages:
Thorough Understanding of Requirements: By using modelling, teams can identify any omitted elements that might indicate unknown or ambiguous behaviors within the system.
Highlighting Inconsistencies: Finding conflicting outputs for the same input can reveal inconsistencies in requirements that need to be resolved before implementation, ultimately saving time and resources.
Key Modelling Notations
Entity-Relationship Diagrams (ERD):
A widely used graphical representation for conceptual models.
Core Constructs:
Entities: Represent real-world objects or concepts that have distinct, identifiable properties.
Relationships: Indicate how entities are associated within the model.
Attributes: Define the specific data or properties that pertain to entities.
Advantages:
Employed early in the requirements phase, allowing for a stable overview that reveals potential problems related to changes or adjustments in the project scope.
Event Traces:
A graphical description that outlines sequences of events exchanged among entities within a system.
Each event trace graph illustrates a specific behavior or interaction, making it an accessible way to capture and communicate complex interactions.
Example: An event trace for a turnstile could show the typical operations (like entering or exiting) alongside exceptional behaviors (like malfunctioning).
Message Sequence Charts (MSC):
An enhanced notation used for detailing event traces.
Includes functionalities for illustrating the creation and destruction of entities, as well as the specification of actions and timers related to various interactions.
Use Case: Can effectively visualize interactions within library management systems, illustrating how patrons interact with publications.
Data-Flow Diagrams (DFD):
Used to model the way data flows among various processes in a system, portraying both data sources and destinations.
Advantages: Provides an intuitive high-level perspective on system functionality that is particularly useful during early design phases.
Disadvantages: May introduce potential ambiguities for less familiar developers, necessitating thorough training or supplementary information to ensure clarity.
Unified Modelling Language (UML) Diagrams:
A comprehensive collection of notations designed for the systematic documentation of software specifications and designs.
Class Diagram:
Primarily focused on object-oriented systems, highlighting the relationships among classes alongside their detailed properties and behaviors.
Use Cases: Structured representations focusing on essential behaviors expected from the system, aiding in capturing user interactions in a clear manner.
Formal Methods
Mathematics-based specifications and design techniques are particularly beneficial for systems where safety and reliability are paramount:
Functions: These specify the state of input and corresponding outputs, ensuring clarity in expected behavior.
Relations: Facilitate the mapping of input values to multiple outputs, often employed in complex systems needing rigorous validation.
Additional Formal Approaches
Decision Tables: Help formalize decision-making processes and the required actions based on various conditions.
Logic (e.g., OCL - Object Constraint Language): Provides a means to specify constraints within UML diagrams, ensuring the fidelity of designs.
Z specifications: A formal specification language that uses set theory and first-order predicate logic, used extensively in software verification.
Algebraic specifications: Offer a framework for defining data types and their operations through algebraic equations, ensuring robust software modeling and validation.