View
82
Download
3
Category
Preview:
Citation preview
04/07/2023
1
Software Engineering Principles in System Software Design
04/07/2023
2
Agenda
Introduction
Definition of Software Engineering
Principles of Software Engineering
Example –Compiler
Software Development Process
Example –Assembler
Conclusion
04/07/2023
3
Introduction
The development of software engineering tools and methods began in the
late 1960’s.
The problems in managing a large development project led to increases in
development costs and decreases in productivity.
Software Engineering evolved gradually in response to the problems of cost,
productivity and reliability created by large and complex software systems.
These principles are not only applicable to application software but also for
the system software.
04/07/2023
4
Software Engineering: Definition
A collection of techniques, methodologies, and tools that help
with the production of
a high quality software system
with a given budget
before a given deadline
04/07/2023
5
Principles of Software Engineering
Rigor and formality
Separation of concerns
Modularity
Abstraction
Anticipation of change
Generality
Incrementality
04/07/2023
6
Rigor and Formality
Rigor means strict precision
Rigor helps to produce products with higher reliability,
greater quality while controlling costs and meeting
expectations.
Various degrees of rigor can be achieved
Formality is the highest degree of rigor
Formality enables tool support
Degree of rigor depends on application
04/07/2023
7
Separation of concerns
To dominate complexity, separate the issues to concentrate on
one at a time.
Divide & conquer.
Supports parallelization of efforts and separation of
responsibilities.
04/07/2023
8
Modularity
A complex system may be divided into simpler pieces called
modules
A system that is composed of modules is called modular
Supports application of separation of concerns
when dealing with a module we can ignore details of other
modules
04/07/2023
9
Cohesion and coupling
Each module should be highly cohesive.
Module understandable as a meaningful unit
Components of a module are closely related to one another
Modules should exhibit low coupling.
Modules have low interactions with others
Understandable separately
04/07/2023
10
A visual representation
(a) (b)
High coupling Low coupling
04/07/2023
11
Abstraction
Identify the important aspects of a phenomenon and ignore its
details.
Special case of separation of concerns.
The type of abstraction to apply depends on purpose.
04/07/2023
12
Anticipation of change
Ability to support software evolution requires anticipating
potential future changes.
It is the basis for software evolvability.
04/07/2023
13
Generality
While solving a problem, try to discover if it is an instance of a
more general problem whose solution can be reused in other
cases.
Carefully balance generality against performance and cost.
Sometimes a general problem is easier to solve than a special
case .
04/07/2023
14
Incrementality
Process proceeds in a stepwise fashion (increments)
Examples (process) Deliver subsets of a system early to get early feedback from expected
users, then add new features incrementally.
Deal first with functionality, then turn to performance.
Deliver a first prototype and then incrementally add effort to turn
prototype into product.
04/07/2023
15
Example -Compiler
Rigor and Formality: Compiler
Compilers are critical products Errors are multiplied on a mass scale
Very high degree of formalization regular expressions, grammars
Formalization enables tool support Scanner generators (lex) Parser generators (yacc)
04/07/2023
16
Separation of Concerns: Compiler
Correctness is primary concern
Other concerns
Efficiency of compiler and of generated code
User friendliness (helpful warnings, etc.)
Example for interdependencies: runtime diagnostics and efficient code
Example: runtime assertion checking
Diagnostics simplify testing, but create overhead
Typical solution: option to disable checks
04/07/2023
17
Modularity: Compiler
Compilers are modularized into phases
Each phase has precisely defined input and output
High cohesion: common functionality in each phase
Low coupling: pipe-and-filter architecture, symbol table
Source code object code
Symbol Table
Lexical Analysis Parsing Semantic Analysis
Code Generation
04/07/2023
18
Abstraction: Compiler
Abstract syntax to neglect syntactic details such as begin…
end vs. {…} to bracket statement sequences.
Abstract syntax
Abstract while loop syntax: while( BoolExpr Stmt )
Concrete Pascal syntax WHILE BoolExpr DO Stmt ;
Concrete Java syntax: while ( BoolExpr ) Stmt
04/07/2023
19
Abstraction: Compiler
CoIntermediate Code Generation
Assembler Code GenerationOptimization
Code Generation
04/07/2023
20
Anticipation of Change: Compiler Case Study
Typical changes
New versions of processors and operating systems .
New target machines .
Language and library extensions (e.g., standards) .
04/07/2023
21
Incrementality :Compiler Case Study
Language can be extended incrementally
Compiler can be enhanced incrementally
Supported language subset
Runtime diagnostics
Optimizations
04/07/2023
22
Software Development Process
In the water fall model, the software development effort is pictured as
flowing through a sequence of different stages as given belowRequirement
Analysis
System Specification
System Design
Implementation
System Testing
Maintenance
04/07/2023
23
Software Development Process
Requirement Analysis
• The focus of this stage is on the needs of the users of the
system .
• The requirements specify what the system must do, but not
how it will be done.
• The result of the this stage is a requirement document.
04/07/2023
24
Software Development Process contd..
System Specification
• The goal of this stage is to formulate a precise description of the desired
system.
• The requirements analysis step looks at the system from the point of view
of the end user.
• The system specifications are written from the point of view of system
developers and programmers.
04/07/2023
25
Software Development Process contd..
System Design• This stage begins to address the solution itself.
• The system design document outlines the most significant
characteristics of the software to be developed.
Implementation• In this stage of the development process ,the individual modules or objects
described by the design process are coded and preliminary testing is done.
04/07/2023
26
Software Development Process contd..
System testing
• This phase is usually the most expensive and time consuming part of the
software development process.
• Several different levels of testing are involved.
Maintenance
• This is the last phase of the Software life-cycle model.
• Maintenance can be made much easier and less costly by the presence of good
documentation.
• The document created during the system development should be kept
throughout the lifetime of the system.
04/07/2023
27
System Specifications -Assembler
Types of specifications
• Input specifications
Label
Operation field
An instruction operand
Source program
04/07/2023
28
System Specifications contd..
• Output specifications
Current location
Object program
• Quality specifications
Processing time
04/07/2023
29
System design- Procedural System Design
Data flow diagram
Assemble
programSource
program
Objectprogram
Assemblylisting
04/07/2023
30
Modularized Assembler Design
Assembler
Pass_2Pass _1
P1_read_src P2_assemble_inst
Access_int_file
P1_assign_sym
P1_assign_loc P2_write_listP2_write_obj
P2_search_optabAccess_symtab
04/07/2023
31
System Testing
A large software System, composed of many thousands of lines of Source
code.
These are almost too complex to be debugged effectively all at once , when
error occur there are too many places to look for them.
Most of systems are tested in a series of stages.
In each stage the amount of code being debugged is kept small. So it can be
tested thoroughly and efficiently.
04/07/2023
32
Levels of Testing
Unit Testing
Black box testing
White box testingIntegration TestingSystem Testing
- Alpha testing
- Beta testingAcceptance Testing
04/07/2023
33
Sequences for Testing
Bottom–Up Testing
Top-down Testing
04/07/2023
34
Conclusion
Thus System Software also has the principles for its design.
Software Engineering Principles are not only applicable to
compilers and assemblers but also for other System software
like operating system , linker and loader .
04/07/2023
35
Reference
• Leland L . Beck , System software-An introduction to System
Programming.
• http://www.d.umn.edu/~gshute/softeng/principles.html
04/07/2023
36
Thank You
Recommended