Software Requirements Modelling
October 2025
Entity-Relationship Diagrams
ER diagrams are a popular grpahical notational paradigm for representing conceptual models
They have three core constructs:
- Entities - Real-world entities that have common properties and behaviours
- Relationships - Type of relationship between entities
- Attributes - Data or properties associated with entities
ER diagrams are popular
- They can be used early in the requirements phase
- They provide an overview of the problem to be addressed
- The view is relatively stable when changes are made to the problem’s requirements
Event Traces
Event traces are a grpahical description of a sequence of events that are exchanged between real-world entities
Each grpah depicts a single trace, representing one of several possible behaviours
Traces have a semantic that is relatively precise, simple and easy to understand.
Graphical representation of two traces:
sequenceDiagram
actor visitor
participant turnstile
visitor->>turnstile: Coin
visitor->>turnstile: Push
visitor->>turnstile: Rotated
visitor->>turnstile: Coin
visitor->>turnstile: Push
visitor->>turnstile: Rotated
Or exceptional behaviour:
sequenceDiagram
actor visitor
participant turnstile
visitor->>turnstile: Slug
visitor->>turnstile: Slug
visitor->>turnstile: Slug
visitor->>turnstile: Coin
visitor->>turnstile: Push
visitor->>turnstile: Rotated
Another example of an event trace chart is a message sequence chart.
See: WinterBreak
Data-Flow Diagrams
Unlike prior mentioned diagrams, data-flow diagrams are higher level, and model functionality and flow of data from one function to another.
Advantages:
- Provides an intuitive model of a proposed system’s high-level functionality and of the data dependencies among various processes Disadvantages
- Can be ambiguous to a software developer who is less familiar with the problem being modelled
UML Diagrams
Unified Modelling Language is a collection of notations used to document software specifications and designs
Some of its notations are used for documenting requirements, and others are used to support design activities
The class diagram is one of the most important in UML specificaitons of object-oriented systems
- A sophisticated diagram relating the classes (entities) in the specification
classDiagram
note "From Duck till Zebra"
Animal <|-- Duck
note for Duck "can fly, can swim, can dive, can help in debugging"
Animal <|-- Fish
Animal <|-- Zebra
Animal : +int age
Animal : +String gender
Animal: +isMammal()
Animal: +mate()
class Duck{
+String beakColor
+swim()
+quack()
}
class Fish{
-int sizeInFeet
-canEat()
}
class Zebra{
+bool is_wild
+run()
}
UML Use Cases
UML use cases allow us to represent requirements in a structured way
Use cases do not model all the tasks, instead they are used to specify user views of essentail system behaviour
Formal Methods
Formal methods or approaches are mathematically based specifications and design techniques
Normally used in the development of safety-critical systems
Some formal methods model requirements or software behaviour as a collection of mathematical functions or relations
Functions specify the state of the system’s execution and output
A relation is used whenever an input value maps more than one output value.
Decision Tables
Logic (OCL)
Z Specifications
Algebraic Specifications