Requirement Analysis and Specification
Requirement Analysis and Specification
The requirements analysis and specification phase starts after the feasibility study stage is
complete and the project has been found to be financially viable and technically feasible.
The goal of the requirements analysis and specification phase is to clearly understand the
customer requirements and to systematically organise the requirements into a document called the
Software Requirements Specification (SRS) document.
Requirements analysis and specification activity is usually carried out by a few experienced
members of the development team. The engineers who gather and analyse customer requirements
and then write the requirements specification document are known as system analysts. After
understanding the precise user requirements, the analysts analyse the requirements to weed out
inconsistencies, anomalies and incompleteness. They then proceed to write the Software
Requirements Specification (SRS) document. The SRS document is the final outcome of the
requirements analysis and specification phase.
Requirements analysis and specification phase mainly involves carrying out the following two
important activities:
• Requirements gathering and analysis
• Requirements specification
Operational Semantics
Informally, the operational semantics of a formal method is the way computations are represented.
There are different types of operational semantics according to what is meant by a single run of the
system and how the runs are grouped together to describe the behaviour of the system.
Linear semantics: In this approach, a run o f a system is described by a sequence (possibly infinite)
of events or states. The concurrent activities of the system are represented by non-deterministic
inter leavings of the atomic actions.
Branching semantics: In this approach, the behaviour of a system is represented by a directed
graph. The nodes of the graph represent the possible states in the evolution of a system.
Maximally parallel semantics: In this approach, all the concurrent actions enabled at any state are
assumed to be taken together.
Partial order semantics: Under this view, the semantics described to a system is a structure of states
satisfying a partial order relation among the states (events). The partial order represents a
precedence ordering among events, and constrains some events to occur only after some other events
have occurred.
AXIOMATIC SPECIFICATION
In axiomatic specification of a system, first-order logic is used to write the pre- and post-
conditions to specify the operations of the system in the form of axioms. The pre-conditions
basically capture the conditions that must be satisfied before an operation can successfully be
invoked. The post-conditions are the conditions that are essentially constraints on the results
produced for the function execution to be considered successful.
ALGEBRAIC SPECIFICATION
In the algebraic specification technique, an object class or type is specified in terms of relationships
existing between the operations defined on that type. Algebraic specifications define a system as a
heterogeneous algebra. For example, alphabetic strings S together with operations of concatenation
and length {S, I , con, len}, is not a homogeneous algebra, since the range of the length operation is
the set of integers. Each set of symbols in a heterogeneous algebra is called a sort of the algebra. An
algebraic specification is usually presented in four sections.
Types section: In this section, the sorts (or the data types) being used is specified.
Exception section: This section gives the names of the exceptional conditions that might occur
when different operations are carried out.
Syntax section: This section defines the signatures of the interface procedures. The collection of
sets that form input domain of an operator and the sort where the output is produced are called
the signature of the operator. For example, PUSH takes a stack and an element as its input and
returns a new stack that has been created.
Equations section: This section gives a set of rewrite rules (or equations) defining the meaning of
the interface procedures in terms of each other. In general, this section is allowed to contain
conditional expressions.
Properties of algebraic specifications
Three important properties that every algebraic specification should possess are:
Completeness: This property ensures that using the equations, it should be possible to reduce any
arbitrary sequence of operations on the interface procedures.
Finite termination property: This property essentially addresses the following question: Do
applications of the rewrite rules to arbitrary expressions involving the interface procedures always
terminate? For arbitrary algebraic equations, convergence (finite termination) is undecidable. But,
if the right hand side of each rewrite rule has fewer terms than the left, then the rewrite process
must terminate.
Unique termination property: This property indicates whether application of rewrite rules in
different orders always result in the same answer.