Week4-5
Week4-5
a. Understand how to extract software and user requirements from relevant sources
using various method requirement discovery.
b. Discuss the processes involved in discovering and documenting these
requirements.
a. Big Picture in Focus: ULOa Understand how to extract
software and user requirements from relevant sources
using various method requirement discovery.
Metalanguage
• CIM-Computation Independent Model
• PIM-platform independent model
• PSM- Platform Specific Model
• UML- Unified Modeling Language
• MDA - Multiple platform-specific models
• OCL -Object Constraint Language
Essential Knowledge
In today’s age and time, software has been an important part in the economies of all
developed nations. It is a known fact that most systems are software-controlled hence,
there is an increasing demand to develop a good, maintainable, dependable and usable
software that could deliver the functionality and performance required by the users.
Example:
2. System Requirements
• Defined as a more detailed descriptions of the software system’s functions,
services, and operational constraints. The system requirements document
is a structured document which should define exactly what must be
implemented since these system requirements may be part of the contract
between the system buyer and the software developer.
• The readers of the system requirements are system end-users, client
engineers, system architects and software developers. Since they are
involved in the implementation, they have to know the details on what the
system will do. They are also more concerned on how these requirements
will support the business.
Example:
1.1 On the last working day of each month, a summary of the drugs
prescribed, their cost and the prescribing clinics shall be generated.
1.2 The system shall automatically generate the report for printing after
17.30 on the last working day of the month.
1.3 A report shall be created for each clinic and shall list the individual drug
names, the total number of prescriptions, the number of doses
prescribed and the total cost of the prescribed drugs.
1.4 If drugs are available in different dose units (e.g. 10mg, 20mg, etc.)
separate reports shall be created for each dose unit. 1.5 Access to all
cost reports shall be restricted to authorized users listed on a
management access control list.
Figure 1.0 Readers of different types of requirements specification
• Functional requirement
1. A user shall be able to search the appointments lists for all clinics.
2. The system shall generate each day, for each clinic, a list of patients
who are expected to attend appointments that day.
3. Each staff member using the system shall be uniquely identified by his
or her eight-digit employee number.
Figure 1.0 Types of nonfunctional requirement
• Non-functional requirements
o These are constraints on the services or functions offered by the system.
These include timing constraints, development process constraints and
constraints imposed by standards.
o These are requirements that are not directly concerned with the specific
services delivered by the system to its users.
o Often applied as a whole instead of individual system features or services.
It may affect the overall architecture of a system rather than the individual
components.
o A single non-functional requirement may generate a number of related
functional requirements that may define a required new system service.
o As shown in Figure 1 (Sommerville,2011), the non-functional requirements
have several types. These requirements may come from either of these
three, namely, product requirements, organizational requirements and
external requirements:
Non-functional classifications
▪ Product requirements
o Requirements which specify that the delivered product must
behave in a particular way e.g. execution speed, reliability,
etc.
▪ Organisational requirements
o Requirements which are a consequence of organisational
policies and procedures e.g. process standards used,
implementation requirements, etc.
▪ External requirements
o Requirements which arise from factors which are external to
the system and its development process e.g. interoperability
requirements, legislative requirements, etc.
▪ Product requirement
The MHC-PMS shall be available to all clinics during normal
working hours (Mon–Fri, 0830–17.30). Downtime within normal
working hours shall not exceed five seconds in any one day.
▪ Organizational requirement
Users of the MHC-PMS system shall authenticate themselves using
their health authority identity card.
▪ External requirement
The system shall implement patient privacy provisions as set out in
HStan-03-2006-priv.
▪ Goals and requirements
o Non-functional requirements may be very difficult to state
precisely and imprecise requirements may be difficult to
verify.
o Goal
o A general intention of the user such as ease of use.
o Verifiable non-functional requirement
o A statement using some measure that can be
objectively tested.
o Goals are helpful to developers as they convey the
intentions of the system users.
▪ Usability requirements
o The system should be easy to use by medical staff and should
be organized in such a way that user errors are minimized.
(Goal)
o Medical staff shall be able to use all the system functions after
four hours of training. After this training, the average number of
errors made by experienced users shall not exceed two per
hour of system use. (Testable non-functional requirement)
o Understand ability
▪ Requirements are expressed in the language of the
application domain;
▪ This is often not understood by software engineers
developing the system.
o Implicitness
▪ Domain specialists understand the area so well that they
do not think of making the domain requirements explicit
Requirements specification
▪ The process of writing don the user and system requirements in a requirements
document.
▪ User requirements have to be understandable by end-users and customers who
do not have a technical background.
▪ System requirements are more detailed requirements and may include more
technical information.
▪ The requirements may be part of a contract for the system development
▪ It is therefore important that these are as complete as possible
Ways of writing a system requirements specification
▪ In principle, requirements should state what the system should do and the design
should describe how it does this.
▪ In practice, requirements and design are inseparable
o A system architecture may be designed to structure the requirements;
o The system may inter-operate with other systems that generate design
requirements;
o The use of a specific architecture to satisfy non-functional requirements
may be a domain requirement.
o This may be the consequence of a regulatory requirement.
▪ Lack of clarity
o Precision is difficult without making the document difficult to read.
▪ Requirements confusion
o Functional and non-functional requirements tend to be mixed-up.
▪ Requirements amalgamation
o Several different requirements may be expressed together.
Structured specifications
Form-based specifications
▪ The processes used for RE vary widely depending on the application domain, the
people involved and the organisation developing the requirements.
▪ However, there are a number of generic activities common to all processes
o Requirements elicitation;
o Requirements analysis;
o Requirements validation;
o Requirements management.
▪ In practice, RE is an iterative activity in which these processes are interleaved.
• Software engineers work with a range of system stakeholders to find out about
the application domain, the services that the system should provide, the required
system performance, hardware constraints, other systems, etc.
• Stages include:
o Requirements discovery,
o Requirements classification and organization,
o Requirements prioritization and negotiation,
o Requirements specification.
Process activities
• Requirements discovery
o Interacting with stakeholders to discover their requirements. Domain
requirements are also discovered at this stage.
• Requirements classification and organisation
o Groups related requirements and organises them into coherent clusters.
• Prioritisation and negotiation
o Prioritising requirements and resolving requirements conflicts.
• Requirements specification
o Requirements are documented and input into the next round of the spiral.
Key points
Requirements discovery
• The process of gathering information about the required and existing systems and
distilling the user and system requirements from this information.
• Interaction is with system stakeholders from managers to external regulators.
• Systems normally have a range of stakeholders.
Interviewing
Interviews in practice
Scenarios
Use
cases
• Use-cases are a scenario based technique in the UML which identify the actors in
an interaction and which describe the interaction itself.
• A set of use cases should describe all possible interactions with the system.
• High-level graphical model supplemented by more detailed tabular description
(see Chapter 5).
• Sequence diagrams may be used to add detail to use-cases by showing the
sequence of event processing in the system.
Ethnography
Scope of ethnography
• Requirements that are derived from the way that people actually work rather than
the way I which process definitions suggest that they ought to work.
• Requirements that are derived from cooperation and awareness of other people’s
activities.
o Awareness of what other people are doing leads to changes in the ways in
which we do things.
• Ethnography is effective for understanding existing processes but cannot identify
new features that should be added to a system.
Focused ethnography
• Developed in a project studying the air traffic control process
• Combines ethnography with prototyping
• Prototype development results in unanswered questions which focus the
ethnographic analysis.
• The problem with ethnography is that it studies existing practices which may
have some historical basis which is no longer relevant.
Requirements validation
• Concerned with demonstrating that the requirements define the system that the
customer really wants.
• Requirements error costs are high so validation is very important
o Fixing a requirements error after delivery may cost up to 100 times the
cost of fixing an implementation error.
Requirements checking
• Validity. Does the system provide the functions which best support the
customer’s needs?
• Consistency. Are there any requirements conflicts?
• Completeness. Are all functions required by the customer included?
• Realism. Can the requirements be implemented given available budget and
technology?
• Verifiability. Can the requirements be checked?
• Requirements reviews
o Systematic manual analysis of the requirements.
• Prototyping
o Using an executable model of the system to check requirements. Covered
in Chapter 2.
• Test-case generation
o Developing tests for requirements to check testability.
Requirements reviews
• Regular reviews should be held while the requirements definition is being
formulated.
• Both client and contractor staff should be involved in reviews.
• Reviews may be formal (with completed documents) or informal. Good
communications between developers, customers and users can resolve
problems at an early stage.
Review checks
• Verifiability
o Is the requirement realistically testable?
• Comprehensibility
o Is the requirement properly understood?
• Traceability
o Is the origin of the requirement clearly stated?
• Adaptability
o Can the requirement be changed without a large impact on other
requirements?
Requirements management
Changing requirements
• The business and technical environment of the system always changes after
installation.
o New hardware may be introduced, it may be necessary to interface the
system with other systems, business priorities may change (with
consequent changes in the system support required), and new legislation
and regulations may be introduced that the system must necessarily abide
by.
• The people who pay for a system and the users of that system are rarely the same
people.
o System customers impose requirements because of organizational and
budgetary constraints. These may conflict with end-user requirements and,
after delivery, new features may have to be added for user support if the
system is to meet its goals.
Changing requirements
• Large systems usually have a diverse user community, with many users having
different requirements and priorities that may be conflicting or contradictory.
o The final system requirements are inevitably a compromise between them
and, with experience, it is often discovered that the balance of support
given to different users has to be changed.
Key points
System modeling
• Models of the existing system are used during requirements engineering. They
help clarify what the existing system does and can be used as a basis for
discussing its strengths and weaknesses. These then lead to requirements for
the new system.
• Models of the new system are used during requirements engineering to help
explain the proposed requirements to other system stakeholders. Engineers use
these models to discuss design proposals and to document the system for
implementation.
• In a model-driven engineering process, it is possible to generate a complete or
partial system implementation from the system model.
System perspectives
Context models
• Context models are used to illustrate the operational context of a system - they
show what lies outside the system boundaries.
• Social and organisational concerns may affect the decision on where to position
system boundaries.
• Architectural models show the system and its relationship with other systems.
System boundaries
• System boundaries are established to define what is inside and what is outside
the system.
o They show other systems that are used or depend on the system being
developed.
• The position of the system boundary has a profound effect on the system
requirements.
• Defining a system boundary is a political judgment
o There may be pressures to develop system boundaries that increase /
decrease the influence or workload of different parts of an organization.
Process perspective
• Context models simply show the other systems in the environment, not how the
system being developed is used in that environment.
• Process models reveal how the system being developed is used in broader
business processes.
• UML activity diagrams may be used to define business process models.
Figure 10 Process model of involuntary detention
Interaction models
• Use cases were developed originally to support requirements elicitation and now
incorporated into the UML.
• Each use case represents a discrete task that involves external interaction with a
system.
• Actors in a use case may be people or other systems.
• Represented diagrammatically to provide an overview of the use case and in a
more detailed textual form.
Figure 12 Use cases in the MHC-PMS involving the role ‘Medical Receptionist’
Sequence diagrams
• Sequence diagrams are part of the UML and are used to model the interactions
between the actors and the objects within a system.
• A sequence diagram shows the sequence of interactions that take place during a
particular use case or use case instance.
• The objects and actors involved are listed along the top of the diagram, with a
dotted line drawn vertically from these.
• Interactions between objects are indicated by annotated arrows.
Figure 13 Sequence diagram for View patient information
Key points
Generalization
Behavioral models
Data-driven modeling
• Many business systems are data-processing systems that are primarily driven by
data. They are controlled by the data input to the system, with relatively little
external event processing.
• Data-driven models show the sequence of actions involved in processing input
data and generating an associated output.
• They are particularly useful during the analysis of requirements as they can be
used to show end-to-end processing in a system.
Event-driven modeling
• Real-time systems are often event-driven, with minimal data processing. For
example, a landline phone switching system responds to events such as
‘receiver off hook’ by generating a dial tone.
• Event-driven modeling shows how a system responds to external and internal
events.
• It is based on the assumption that a system has a finite number of states and that
events (stimuli) may cause a transition from one state to another.
• These model the behaviour of the system in response to external and internal
events.
• They show the system’s responses to stimuli so are often used for modelling
real-time systems.
• State machine models show system states as nodes and events as arcs between
these nodes. When an event occurs, the system moves from one state to
another.
• Statecharts are an integral part of the UML and are used to represent state
machine models.
Figure 23 State diagram of a microwave oven
Model-driven engineering
• Model-driven engineering (MDE) is an approach to software development where
models rather than programs are the principal outputs of the development
process.
• The programs that execute on a hardware/software platform are then generated
automatically from the models.
• Proponents of MDE argue that this raises the level of abstraction in software
engineering so that engineers no longer have to be concerned with programming
language details or the specifics of execution platforms.
Types of model
• A computation independent model (CIM)
o These model the important domain abstractions used in a system. CIMs
are sometimes called domain models.
• A platform independent model (PIM)
o These model the operation of the system without reference to its
implementation. The PIM is usually described using UML models that
show the static system structure and how it responds to external and
internal events.
• Platform specific models (PSM)
o These are transformations of the platform-independent model with a
separate PSM for each application platform. In principle, there may be
layers of PSM, with each layer adding some platform-specific detail.
Executable UML
Key points
Self Help: You can also refer to the sources below to help you further
understand the lesson:
Irlbeck, M., Peled, D., & Pretschner, A. (Eds.). (2015). Dependable software systems
engineering. Retrieved from https://ebookcentral.proquest.com
Metalanguage
Essential Knowledge
Software architecture
It is the critical link between design and requirements engineering, as it identifies the
main structural components in a system and the relationships between them. The
output of the architectural design process is an architectural model that describes how
the system is organized as a set of communicating components.
• The design process for identifying the sub-systems making up a system and the
framework for sub-system control and communication is architectural design.
• The output of this design process is a description of the software architecture.
Architectural design
Architectural abstraction
• Stakeholder communication
o Architecture may be used as a focus of discussion by system
stakeholders.
• System analysis
o Means that analysis of whether the system can meet its non-functional
requirements is possible.
• Large-scale reuse
o The architecture may be reusable across a range of systems
o Product-line architectures may be developed.
Architectural representations
• Simple, informal block diagrams showing entities and relationships are the most
frequently used method for documenting software architectures.
• But these have been criticized because they lack semantics, do not show the
types of relationships between entities nor the visible properties of entities in the
architecture.
• Depends on the use of architectural models. The requirements for model
semantics depends on how the models are used.
• Very abstract - they do not show the nature of component relationships nor the
externally visible properties of the sub-systems.
• However, useful for communication with stakeholders and for project planning.
Architecture reuse
• Systems in the same domain often have similar architectures that reflect domain
concepts.
• Application product lines are built around a core architecture with variants that
satisfy particular customer requirements.
• The architecture of a system may be designed around one of more architectural
patterns or ‘styles’.
o These capture the essence of an architecture and can be instantiated in
different ways.
o Discussed later in this lecture.
• Performance
o Localized critical operations and minimize communications. Use large
rather than fine-grain components.
• Security
o Use a layered architecture with critical assets in the inner layers.
• Safety
o Localized safety-critical features in a small number of sub-systems.
• Availability
o Include redundant components and mechanisms for fault tolerance.
• Maintainability
o Use fine-grain, replaceable components.
Architectural views
• A logical view, which shows the key abstractions in the system as objects or object
classes.
• A process view, which shows how, at run-time, the system is composed of
interacting processes.
• A development view, which shows how the software is decomposed for
development.
• A physical view, which shows the system hardware and how software components
are distributed across the processors in the system.
• Related using use cases or scenarios (+1)
Architectural patterns
Layered architecture
Key points
Repository architecture
Client-server architecture
• Distributed system model which shows how data and processing is distributed
across a range of components.
o Can be implemented on a single computer.
• Set of stand-alone servers which provide specific services such as printing, data
management, etc.
• Set of clients which call on these services.
• Network which allows clients to access servers.
The Client–server pattern
Application architectures
Server implementation
Compiler components
• A lexical analyzer, which takes input language tokens and converts them to an
internal form.
• A symbol table, which holds information about the names of entities (variables,
class names, object names, etc.) used in the text that is being translated.
• A syntax analyzer, which checks the syntax of the language being translated.
• A syntax tree, which is an internal structure representing the program being
compiled.
Compiler components
• A semantic analyzer that uses information from the syntax tree and the symbol
table to check the semantic correctness of the input language text.
• A code generator that ‘walks’ the syntax tree and generates abstract machine
code.
Key points
• Models of application systems architectures help us understand and compare
applications, validate application system designs and assess large-scale
components for reuse.
• Transaction processing systems are interactive systems that allow information in
a database to be remotely accessed and modified by a number of users.
• Language processing systems are used to translate texts from one language into
another and to carry out the instructions specified in the input language. They
include a translator and an abstract machine that executes the generated
language.
Self Help: You can also refer to the sources below to help you further
understand the lesson:
Irlbeck, M., Peled, D., & Pretschner, A. (Eds.). (2015). Dependable software systems
engineering. Retrieved from https://ebookcentral.proquest.com