SE Unit 2
SE Unit 2
Nature of Software:
For understanding of the nature of software, it is important to examine the characteristics of software
that make it different from other things that human beings build.
1. Software is developed or engineered: Since software is purely logical rather than a physical
system element. It is not manufactured in the classical sense. Software projects cannot be
managed as if they were manufacturing projects (You may have a factory where each person
has a specific set of tasks they follow. A worker may tighten a screw all day long).
2. Software doesn’t “wear out: Stated simply, the hardware begins to wear out. Software is not
susceptible to the environmental maladies that cause hardware to wear out. However,
Software deteriorates due to changes.
Figure depicts failure rate as a function of time for hardware. The relationship, often called the
“bathtub curve,” indicates that hardware exhibits relatively high failure rates early in its life;
defects are corrected and the failure rate drops to a steady-state level (hopefully, quite low)
for some period of time.
1. Network intensiveness. A WebApps resides on a network and must serve the needs of a diverse
community of clients. The network may enable worldwide access and communication.
2. Concurrency. A large number of users may access the WebApp at one time.
3. Unpredictable load. The number of users of the WebApp may vary by orders of magnitude from
day to day.
4. Performance. WebApp should have good performance.
5. Availability. WebApps often demand access on a 24/7/365 basis.
6. Data driven. The primary function of many WebApps is to use hypermedia to present text,
graphics, audio, and video content to the end user.
7. Content sensitive. The quality and aesthetic (beauty) nature of content remains an important
determinant of the quality of a WebApp .
8. Continuous evolution: Unlike conventional application software that evolves over a series of
planned, chronologically spaced releases, Web applications evolve continuously.
9. Immediacy: WebApps often exhibit a timeto-market that can be a matter of a few days or weeks.
10. Security: Because WebApps are available via network access, , In order to protect sensitive content
and provide secure modes of data transmission, strong security measures must be implemented. .
11. Aesthetics. When a WebApp has been designed to market or sell products or ideas, aesthetics may
have as much to do with success as technical design.
SOFTWARE MYTHS
Software Myth: Software engineering professionals recognize myths as “misleading attitudes that
have caused serious problems for managers and practitioners alike”. Software myths propagate false
beliefs and confusion in the minds of management, users and developers.
1. Management Myths
2. User Myths
3. Developer Myths
1. Management Myths
Managers, who own software development responsibility, are often under strain and pressure to
maintain a software budget, time constraints, improved quality, and many other considerations.
Common management myths are listed in Table.
# Myth Reality
1. The members of an organization Standards are often incomplete, inadaptable, and
can acquire all-the information, outdated.
they require from a manual, which Developers are often unaware of all the established
contains standards, procedures, standards.
and principl Developers rarely follow all the known standards
because not all the standards tend to decrease the
delivery time of software while maintaining its
quality
2. If the project is behind schedule, Adding more manpower to the project, which is already
increasing the number of behind schedule, further delays the project.
programmers can reduce the time New workers take longer to learn about the project
gap as compared to those already working on the project
2. User Myths
# Myth Reality
1. Brief requirement stated in the Starting development with incomplete and
initial process is enough to start ambiguous requirements often lead to software
development; failure.
Detailed requirements can be Adding requirements at a later stage often requires
added at the later stages. repeating the entire development process.
2. Software is flexible; hence Incorporating change requests earlier in the
software requirement changes development process costs lesser than those that
can be added during any phase of occurs at later stages. This is because incorporating
the development process. changes later may require redesigning and extra
resources.
3. Developer Myths
# Myth Reality
1. Software development is 50% to 70% of all the efforts are expended after the
considered complete when the software is delivered to the user
code is delivered.
2. The success of a software project The quality of programs is not the only factor that
depends on the quality of the makes the project successful instead the
product produced. documentation and software configuration also play
a crucial role.
3. Software engineering requires Software engineering is about creating quality at
unnecessary documentation, every level of the software project.
which slows down the project. Proper documentation enhances quality which
results in reducing the amount of rework.
4. The only product that is delivered The deliverables of a successful project includes not
after the completion of a project is only the working program but also the
the working program(s). documentation to guide the users for using the
software.
5. Software quality can be assessed The quality of software can be measured during any
only after the program is phase of development process by applying some
executed. quality assurance mechanism. One such mechanism
is formal technical review that can be effectively
used during each phase of development to uncover
certain errors
The requirements analysis and specification phase starts after the feasibility study.
The requirements analysis and specification phase ends when The Requirements Specification
Document (SRS) has been developed and reviewed.
(1). The Goal of The Requirements Analysis And Specification Phase:
The goal of the requirements analysis and specification phase is to clearly understand the customer
requirements and to systematically organize the requirements into a document called the Software
Requirements Specification (SRS) document.
(2). Who carries out requirements analysis and specification?
Requirements analysis and specification activity is usually carried out by a few experienced
members called by system analysts, and it normally requires them to spend some time at the
customer site.
(3). How is the SRS document validated?
Once the SRS document is ready, it is first reviewed internally by the project team to
ensure that it accurately captures all the user requirements, and that it is understandable,
consistent, unambiguous, and complete.
The SRS document is then given to the customer for review.
After the customer has reviewed and agrees to it, it forms the basis for all future
development activities and also serves as a contract document between the customer and
the development organization.
Activities
We can conceptually divide the requirements gathering and analysis activity into two separate tasks:
1. Requirements gathering (requirements elicitation) Process.
2. Requirements analysis
Requirements gathering - The analyst discusses with the client and end users and knows their
expectations from the software.
Organizing Requirements - The analyst prioritizes and arranges the requirements in order of
importance, urgency and convenience.
Negotiation & discussion - If requirements are ambiguous/conflicts, then it is then negotiated
and discussed with stakeholders.
Documentation - All formal & informal, functional and non-functional requirements are
documented and made available for next phase processing.
(a). Requirement Gathering /Elicitation Techniques:
(i). Interviews: Interviews are strong medium to collect requirements. Organization may conduct
several types of interviews such as:
Structured (closed) interviews, where every single information to gather is decided in
advance.
Non-structured (open) interviews, where information to gather is not decided in advance.
Oral interviews
Written interviews
One-to-one interviews which are held between two persons across the table.
Group interviews which are held between groups of participants. They help to uncover
any missing requirement as numerous people are involved.
(ii). Surveys: Organization may conduct surveys among various stakeholders by querying about
their expectation and requirements from the upcoming system.
(iii). Questionnaires: A document with pre-defined set of objective questions and respective
options is handed over to all stakeholders to answer, which are collected and compiled.
(iv). Task analysis: Team of engineers and developers may analyze the operation for which the
new system is required. If the client already has some software to perform certain operation, it is
studied and requirements of proposed system are collected.
(v).Domain Analysis: Every software falls into some domain category. The expert people in the
domain can be a great help to analyze general and specific requirements.
(vi). Brainstorming: An informal debate is held among various stakeholders and all their inputs are
recorded for further requirements analysis.
(vii). Prototyping: Prototyping is building user interface without adding detail functionality for user
to interpret the features of intended software product.
(viii). Observation: Team of experts visit the client’s organization or workplace and observe the
actual working of the existing installed systems.
2. Requirements Analysis
After requirements gathering is complete, the analyst analyses the gathered requirements to form a
clear understanding of the exact customer requirements.
The main purpose of the requirements analysis activity is to analyse the gathered requirements to
remove all ambiguities, incompleteness, and inconsistencies from the gathered customer
requirements and to obtain a clear understanding of the software to be developed.
The following basic questions pertaining to the project should be clearly understood by the analyst
before carrying out analysis:
During requirements analysis, the analyst needs to identify and resolve three main types of problems
in the requirements:
• Anomaly
• Inconsistency
• Incompleteness
o Anomaly: An ambiguity is an anomaly. When a requirement is ambiguous, several interpretations
of that requirement are possible. Any anomaly in any of the requirements can lead to the
development of an incorrect system.
Example: When the temperature becomes high, the heater should be switched off.
Example: Consider the following two requirements that were collected from two different
stakeholders in a process control application development project.
The furnace should be switched-off when the temperature of the furnace rises above 500.
When the temperature of the furnace rises above 500 the water shower should be switched-
on and the furnace should remain on.
o Incompleteness: An incomplete set of requirements is one in which some requirements have been
overlooked.
Example:
If a student secures a grade point average (GPA) of less than 6, then the parents of the student must
be intimated about the regrettable performance through a (postal) letter as well as through e-mail.
However, on an examination of all requirements, it was found that there is no provision by which
either the postal or e-mail address of the parents of the students can be entered into the system.
Note: Can an analyst detect all the problems existing in the gathered requirements?
Ans: A few problems in the requirements be very subtle and escape even the most experienced eyes.
IEEE Recommended Practice for Software Requirements Specifications [IEEE830] describes the content
and qualities of a good software requirements specification (SRS). Some of the identified desirable
qualities of an SRS document are the following:
Attributes of Good SRS Document
1. Concise: The SRS document should be concise and at the same time unambiguous, consistent,
and complete.
2. Implementation-independent: The SRS should be free of design and implementation
decisions unless those decisions reflect actual requirements. This means that the SRS
document should specify the externally visible behavior of the system and not discuss the
implementation issues.
3. The SRS document should describe the system to be developed as a black box, and should
specify only the externally visible behavior of the system. For this reason, the SRS document is
also called the black-box specification of the software being developed.
4. Traceable: Traceability is also important to verify the results of a phase with respect to the
previous phase and to analyse the impact of changing a requirement on the design elements
and the code.
Example: It should be possible to trace a specific requirement to the design elements that
implement it and vice versa. Similarly, it should be possible to trace a requirement to the code
segments that implement it and the test cases that test this requirement and vice versa.
5. Modifiable: Customers frequently change the requirements during the software development
due to a variety of reasons. To cope up with the requirements changes, the SRS document
should be easily modifiable. For this, an SRS document should be well-structured.
6. Identification of response to undesired events: The SRS document should discuss the system
responses to various undesired events and exceptional conditions that may arise.
7. Verifiable: All requirements of the system as documented in the SRS document should be
verifiable. This means that it should be possible to design test cases based on the description
of the functionality as to whether or not requirements have been met in an implementation.
Example: “When the name of a book is entered, the software should display whether the book
is available for issue or it has been loaned out” is verifiable.
Important Categories of Customer Requirements (As per the IEEE 830 guidelines)
As per the IEEE 830 guidelines, the important categories of user requirements are the following.
An SRS document should clearly document the following aspects of software:
(i) Functional requirements
(ii). Non-functional requirements
— Design and implementation constraints
— External interfaces required
— Other non-functional requirements
(iii). Goals of implementation.
(i). Functional Requirements
Requirements, which are related to functional aspect of software fall into this category.
They define functions and functionality within and from the software system.
Examples -
Search option given to user to search from various invoices.
User should be able to mail any report to management.
Users can be divided into groups and groups can be given separate rights.
Should comply business rules and administrative functions.
Software is developed keeping downward compatibility intact.
(ii). Non-Functional Requirements
The non-functional requirements are non-negotiable obligations that must be supported by the
software. Non-functional requirements usually address aspects concerning:
External interfaces,
User interfaces,
Maintainability,
Portability,
Usability,
Maximum number of concurrent users,
Timing and throughput (transactions per second, etc.).
Design and implementation constraints:
Design and implementation constraints describe any items or issues that will limit the options
available to the developers.
Example: The developers may use these suggestions while choosing among different design solutions
Decision tree:
A decision tree gives a graphic view of the processing logic involved in decision making and the
corresponding actions taken. The edges of a decision tree represent conditions and the leaf nodes
represent the actions to be performed depending on the outcome of testing the condition.
Example: -
Consider Library Membership Automation Software (LMS) where it should support the following three
options: ƒ
a. New member ƒ
b. Renewal ƒ
c. Cancel membership
a. New member option:
Decision: When the 'new member' option is selected, the software asks details about the member
like the member's name, address, phone number etc.
Action: If proper information is entered then a membership record for the member is created and
a bill is printed for the annual membership charge plus the security deposit payable.
b. Renewal option:
Decision: If the 'renewal' option is chosen, the LMS asks for the member's name and his
membership number to check whether he is a valid member or not.
Action: If the membership is valid then membership expiry date is updated and the annual
membership bill is printed, otherwise an error message is displayed.
Decision table
A decision table is used to represent the complex processing logic in a tabular or a matrix form. The
upper rows of the table specify the variables or conditions to be evaluated. The lower rows of the
table specify the actions to be taken when the corresponding conditions are satisfied. A column in a
table is called a rule. A rule implies that if a condition is true, then the corresponding action is to be
executed.
Example: -
Consider the previously discussed LMS example. The following decision table shows how to represent
the LMS problem in a tabular form. Here the table is divided into two parts, the upper part shows the
conditions and the lower part shows what actions are taken. Each column of the table is a rule.
From the above table you can easily understand that, if the valid selection condition is false then the
action taken for this condition is 'display error message'. Similarly, the actions taken for other
conditions can be inferred from the table.
Formal System Specification methods provide us with tools to precisely describe a system and show
that a system is correctly implemented.
Formal Technique:
Definition: A formal technique is a mathematical method to specify a hardware and/or software
system, verify whether a specification is realisable, verify that an implementation satisfies its
specification, prove properties of a system without necessarily running the system, etc.
Why Formal Technique: ?
To accurately describing the execution behavior of a language.
English descriptions are often incomplete and ambiguous.
Compiler writers must implement the language description accurately.
Programmers want the same behaviour on different platforms.
Note:
There is no single widely acceptable notation or formalism for describing semantics
Formal System Types
Formal Language
Formal specification language consists of: —syn ,sem, and sat.
The set syn is called the syntactic domain, the set sem is called the semantic domain, and the relation
sat is called the satisfaction relation.
For a given specification syn, and model of the system sem, if sat (syn, sem), then syn is said to be the
specification of sem, and sem is said to be the specificand of syn.
Syntactic domains: The syntactic domain of a formal specification language consists of an
alphabet of symbols and a set of formation rules to construct wellformed formulas from the
alphabet.
Semantic domains: Formal techniques can have considerably different semantic domains.
Abstract data type specification languages are used to specify algebras, theories, and programs.
Satisfaction relation: Given the model of a system, it is important to determine whether an
element of the semantic domain satisfies the specifications.
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. In essence, the pre-conditions capture the requirements on the
input parameters of a function.
The post-conditions are the conditions that must be satisfied when a function post-conditions
are essentially constraints on the results produced for the function execution to be considered
successful.
How to develop an axiomatic specifications?
The following are the sequence of steps that can be followed to systematically develop the axiomatic
specifications of a function:
1. Establish the range of input values over which the function should behave correctly. Establish
the constraints on the input parameters as a predicate.
2. Specify a predicate defining the condition which must hold on the output of the function if it
behaved properly.
3. Establish the changes made to the function’s input parameters after execution of the
function..
4. Combine all of the above into pre- and post-conditions of the function.
Example:
Specify the pre- and post-conditions of a function that takes a real number as argument and returns
half the input value if the input is less than or equal to 100, or else returns double the value.
Example:
Axiomatically specify a function named search which takes an integer array and an integer key value as
its arguments and returns the index in the array where the key value is present.
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.
Essentially, algebraic specifications define a system as a heterogeneous algebra. A
heterogeneous algebra is a collection of different sets on which several operations are defined
An algebraic specification is usually presented as.
Types section
Exception section
Syntax section
Equations section
construction operators
Inspection operators
Example 1: Let us specify a data type point supporting the operations create, xcoord, ycoord, isequal;
where the operations have their usual.
Example: 2: Let us specify a bounded FIFO queue having a maximum size of MaxSize and supporting
the operations create, append, remove, first, and isempty; where the operations have their usual
meaning.