Professional Documents
Culture Documents
01 - Introduction 6upff
01 - Introduction 6upff
1. Introduction
Software Architecture
and Engineering
Introduction
Peter Mller
Chair of Programming Methodology
Approach
Guest Lecture
Dr. Andreas Leitner, Google Zurich:
Testing at Google
Course Infrastructure
Literature
No single book covers course content
Web page:
www.pm.inf.ethz.ch/education/courses/sae
Recommended books:
- Bernd Bruegge, Allen H. Dutoit: Object-Oriented
Software Engineering. Prentice Hall, 2004.
- Carlo Ghezzi, Mehdi Jazayeri, Dino Mandrioli:
Fundamentals of Software Engineering. Prentice Hall,
2002.
- Mauro Pezz, Michal Young: Software Testing and
Analysis. Wiley, 2008.
Grading
The Projects
Projects
Exam
Background Knowledge
10
11
12
Exercise Sessions
1. Introduction Motivation
13
1. Introduction Motivation
14
1. Introduction
16%
53%
1. Introduction Motivation
15
1. Introduction Motivation
17
1. Introduction Motivation
Highenergy
X-ray
and
electron
beams
destroy
tumors
16
1. Introduction Motivation
31%
18
Hazard analysis
- Extensive testing on hardware simulator
- Program software does not degrade due to wear, fatigue,
or reproduction process
- Computer errors are caused by hardware or by alpha
particles
Peter Mller Software Architecture and Engineering
1. Introduction Motivation
19
Keyboard
Controller
Mode and
Energy
1. Introduction Motivation
20
Accident
Cursor in lower
right corner of
screen
X-Ray mode
entered (sets
default energy)
Data Entry
Complete
Mode switched
to electron
Keyboard
Controller
Mode and
Energy
Data Entry
Complete
Proceed if data
entry complete
Beamer set to
energy level
(takes 8 secs)
Overdose (100x)
Patient dies
Treatment
Controller
Beamer set to
high energy level
(takes 8 secs)
Treatment
Controller
1. Introduction Motivation
21
1. Introduction Motivation
Challenge: Complexity
Complexity is caused by
22
Code is buggy
Aspects of complexity
1. Introduction Motivation
Cursor in lower
right corner of
screen
23
1. Introduction Motivation
24
Challenge: Change
Change is caused by
- Bug fixes
- Changing requirements
(adding, enhancing, removing features)
- Changing environment
- Changing development team
1. Introduction Motivation
25
1. Introduction Motivation
26
Engineering
- The application of science to the needs of
humanity
- Application of knowledge, mathematics,
and practical experience to the design of
useful objects or processes
1. Introduction Motivation
27
1. Introduction Motivation
28
Related Areas
Is this requirement
addressed on hardware
or software level (or
both)?
Software Engineering
- The application of computer science,
mathematics, project management to build
high quality software
Systems Engineering
- Complex systems with
software and hardware
- Interdisciplinary
- Example: Therac-25
Computer Science
- Computability, algorithms and complexity,
programming languages, data structures,
databases, artificial intelligence, etc.
Peter Mller Software Architecture and Engineering
1. Introduction
Project Management
- Organizes and leads the
project work to meet
project requirements
- Concerned with time,
budget, procurement,
communication, etc.
29
30
Maintainability
Performance
Robustness
Verifiability
Understandability
Scalability
Reliability
Reusability
Evolvability
Usability
Portability
Repairability
Security
Interoperability
Peter Mller Software Architecture and Engineering
31
Correctness
Robustness
- No data is corrupted
- Behavior is logged for later analysis or retry
33
Security
Reliability
Can be enhanced by
34
- Cryptography
- Proven protocols
32
35
36
Performance
Scalability
- Response time
- Throughput
- Memory usage
Can be enhanced by
- Considering performance when designing the software
architecture
- Code optimization (performance tuning)
- De-centralized architectures
- Low complexity of algorithms
Examples
- Peer-to-peer file exchange systems scale easily to
millions of users
- A routing protocol is scalable if the size of the routing
table grows as O(log N), where N is the number of nodes
Peter Mller Software Architecture and Engineering
37
Interoperability
Can be enhanced by
Examples
- A word processor can incorporate a spreadsheet table or
graph
- By using a web service, any application can query
Google
39
Maintainability
Maintainability (contd)
Can be enhanced by
40
Maintainability
Repairability
38
Evolvability
Understandability
Peter Mller Software Architecture and Engineering
41
Verifiability
Reusability
- Testing
- Formal verification
Can be enhanced by
- Software monitors (e.g., to measure performance)
- Modular design
42
Can be enhanced by
- Modular design, narrow interfaces, parameterization
- Good documentation
- Object technology (inheritance, overriding)
43
44
1. Introduction
Portability
Portable software can run in different
environments (e.g., hardware, operating system)
Can be enhanced by
45
Tools
General guidelines
that govern activities
Packages of methods
and techniques
47
48
Requirements are
typically fuzzy
Typical Application
Safety-Critical Application
Requirements Elicitation
Requirements Elicitation
Analysis
System Design
Detailed Design
Safety
requirements
must be
stated
formally
Analysis
System Design
Detailed Design
Implementation
Implementation
Validation
46
Methodologies
Principles
Programs are
formal entities
Validation
49
50
Separation of Concerns
- Reduce complexity
- Functionality, reliability, performance, environment, etc.
Tradeoff
- Risk to miss global optimizations
- Chance to make optimized decisions in the face of
complexity is very limited
51
52
Size
(modularization)
Complexity
Qualities
(focus on correctness,
performance later)
Domains
(problem domain,
solution domain)
Views
(data flow, control flow)
Peter Mller Software Architecture and Engineering
53
54
Modularity
Low
cohesion
High
coupling
Peter Mller Software Architecture and Engineering
Low
coupling
High
cohesion
55
Lexical
Analysis
Parsing
56
Abstraction
Identify the important aspects and ignore the
details
Symbol Table
Source
Code
Semantic
Analysis
Code
Generation
Object
Code
57
58
Anticipation of Change
Abstract syntax
Abstract machines
Optimization
Assembler
Code Gen.
59
60
int computeFee( ) {
if( balance >= 2000)
return 0;
else
return monthlyFee;
}
Parameters
(database)
Rules
Interpreter
10
61
Generality
Typical changes
62
Preparation
63
Incrementality
Generic
Tree
Format
Examples
- Incremental software life cycles (e.g., spiral model)
- Prototypes, early feedback
- Project management is inherently incremental
Backtends
Alpha
System 390
x86
MIPS
PowerPC
SPARC
64
65
11