Software Engineering Q&A - II
Software Engineering Q&A - II
When specifying software requirements, several languages and tools (often called
requirements specification languages or specification processors) can be used, depending on
the level of formality and the goals of the specification. These languages fall on a spectrum
from informal (natural language) to formal (mathematically precise). Here's a categorized
overview:
1. Natural Language
Use constrained natural language with templates like EARS (Easy Approach to
Requirements Syntax) or Planguage.
Example template: "The system shall [do something] when [condition]."
4. UML/OCL
6. Petri Nets
7. Z Notation
9. B-Method / Event-B
10. Alloy
These help parse, verify, or simulate requirements written in the above languages:
5. Staffing-Level Estimation.
Putnam analyzed that characteristic of software development and staffing has some
characteristics of R and D projects studied by Norden and Rayleigh Norden Curve can be
used to Relate the Number of delivered lines of code to the effort and the time required to
develop the project.
L=CkK1/3td4/3
k= total effort expended in PM in product development.
L= the product size in KLOC
td= time required to develop the software
Ck = state of Technology constraints
like Ck=2(poor development environment)
Ck=8 (good software development environment)
Ck=11 (Excellent environment)
6. Estimating Software Maintenance Costs.
Software maintenance typically requires 40 to 60 percent, and in some cases as much as
90 percent, of the total lifecycle effort devoted to a a software product.
The major concerns about maintenance during the planning phases of a software projects
are estimating the number of maintenance programmers that will be needed and specifying the
facilities required for maintenance.
A widely used rule of thumb for the distribution of maintenance activities is
60% - Enhancement
20% - Adaptation
20% - Corrections
In survey 487 business data processing installations,Lientz and swanson determined that
typical level of effort devoted to software maintenance was around
Formal specification techniques are mathematical approaches used to define the behavior,
functions, and constraints of a software system precisely and unambiguously. These
techniques use formal logic, set theory, and algebra to create models of system requirements,
which help in early detection of errors, improved documentation, and better system
verification.
Key Points:
1. Purpose:
o Specify what a system should do without describing how it should do it.
o Enhance the clarity and consistency of requirements.
o Enable rigorous verification and validation.
2. Benefits:
o Reduces ambiguity and misunderstandings.
o Facilitates early error detection and correction.
o Supports automated verification and test case generation.
3. Common Formal Specification Techniques:
o Z Notation: Based on set theory and first-order predicate logic; widely used
for specifying data and operations.
o VDM (Vienna Development Method): Focuses on data types and functions;
used for modeling and verification.
o B Method: Used in software development with formal proofs for correctness.
o Alloy: A lightweight modeling language that uses relational logic and allows
simulation and checking.
4. Challenges:
o Requires expertise in formal methods and mathematical logic.
o Can be time-consuming and expensive for small projects.
o Tool support and scalability may be limited for large systems.
Formal specifications are especially valuable in safety-critical systems (like avionics, medical
devices, and nuclear systems) where precision and correctness are crucial.
Key Points:
1. Purpose:
o Clearly describe what the software will do.
o Serve as a reference for developers, testers, and stakeholders.
o Provide a basis for validation, verification, and future maintenance.
2. Contents of an SRS Document:
o Introduction: Purpose, scope, definitions, and overview.
o Overall Description: Product perspective, user needs, assumptions.
o Functional Requirements: Detailed description of system behaviors and
features.
o Non-Functional Requirements: Performance, reliability, security, usability.
o External Interface Requirements: Interactions with hardware, software, and
users.
Functional Requirements
These describe the core functions or features the system must perform. Each requirement
typically includes:
Non-Functional Requirements
These define how the system performs its functions, covering quality attributes such as:
This section ensures that developers, testers, and stakeholders have a clear and testable set
of criteria for building and validating the software system.