Ivica Crnkovic
Mälardalen University
Department of Computer Science and Engineering
[email protected]
http://www.idt.mdh.se/~icc
Software engineering and Scientific Methods
Page 1, 10/3/2015
Contents
 What is Software Engineering?
 Software Engineering and Science
 Methods of Software Engineering
 Software Engineering Research
 Example – Software architecture
Software engineering and Scientific Methods
Page 2, 10/3/2015
What is Software Engineering?
 Software engineering is an engineering discipline which is
concerned with all aspects of software production from the
early stages of system specification through to maintaining
the system after gone into use.
Ian Sommerville, Software Engineering
 We need further explanation of:

Engineering discipline

All aspects of software production
Software engineering and Scientific Methods
Page 3, 10/3/2015
Engineering
Engineers make the things work
 Solving problems
 understand the problem
 analyze the problem
 Find solutions
 Constructing the solution from parts that address the problem's
various aspects - do a synthesis
 To achieve the goal engineers
 apply theories, methods and tools from different disciplines
 Search for solutions even when there is not theory or methods
Software engineering and Scientific Methods
Page 4, 10/3/2015
Analysis of a problem
PROBLEM
Identify different aspects of the problem
Arrange the problems in clearly defined and
understandable sub-problems
Subproblem 1
Subproblem 2
Subproblem 3
Software engineering and Scientific Methods
Page 5, 10/3/2015
The synthesis
Find solutions for subproblems
Solution 1
Solution 2
Solution 3
Solution 4
Put together solutions to a consistent view
Provide (make) a solution
SOLUTION
Software engineering and Scientific Methods
Page 6, 10/3/2015
Engineering Example – the Vasa Ship
A master piece of work!
 1625 King Gustav II Adolf decided to start build
Wasa
 1628 - maiden voyage.
Length- 69 metres
Maximum width - 11.7 metres
From keel to the top of the main mast - 52.5 metres
Height of the stern - 19.3 metres
Crew: 445 men, Seamen – 145, Soldiers - 300
Armament 64 guns
Thousands of people involved in the project
Selecting wood, building different parts
Providing food, other services
Software engineering and Scientific Methods
Page 7, 10/3/2015
WHat happen with the Vasa ship?
Software engineering and Scientific Methods
Page 8, 10/3/2015
Vasa – Example of Bad Engineering
 the ship capsized on her maiden
voyage in the harbor of Stockholm.
Why did the Vasa capsize?
Software engineering and Scientific Methods
Page 9, 10/3/2015
Why did the Vasa capsize?
 The Vasa capsized because it was not stable;
 The Vasa capsized because

the methods for calculating stability were now known
or

the building process (or in terms of software engineering, the
development project) was inadequate.
Software engineering and Scientific Methods
Page 10, 10/3/2015
How to calculate stability?
Gravity force
Ship weight
Buoyancy
(bärkraft)
Ship’s center of gravity
Center of buoyancy
(water) displacement
The forces are of equal size and in the opposite directions
Software engineering and Scientific Methods
Page 11, 10/3/2015
The ship heels at an angle
h
Ship’s center of gravity
Software engineering and Scientific Methods
h – leverage effect
(påtryckning)
Center of buoyancy
(water displacement)
Has moved right
Page 12, 10/3/2015
Leverage effect (Moment)
Torque is defined as the product
of radius, force, and the sine of the
angle between force and radius:
t = r F (sin(X))
X
http://members.aol.com/PhysicsDad/calcphys/lecture.html
Software engineering and Scientific Methods
Page 13, 10/3/2015
The ship heels at an angle
h – leverage effect
(påtryckning)
This Torque (Moment)
will force the
Ship to return back
h
Software engineering and Scientific Methods
Page 14, 10/3/2015
The ship is unstable
h – leverage effect
(påtryckning)
Torque has change the direction
The ship will capsized
h
h
Software engineering and Scientific Methods
Page 15, 10/3/2015
Why the ships heel?
Because of wind!
Or waves…
h
Software engineering and Scientific Methods
Page 17, 10/3/2015
Stability Curve
Torque
Result = S - W
Wind (opposite direction)
A
S2
B
S1
aA
a1
aB a2
Software engineering and Scientific Methods
a
Page 18, 10/3/2015
Why did Vasa capsize?
 It was not stable

At that time there was no formal modeling for calculating
stability
 But at that time there were many ships which did not
capsized!
Software engineering and Scientific Methods
Page 19, 10/3/2015
Why did Vasa capsize?
 Engineering –

Solve problems even when there is no formal theory

Experience – best practices

Observations

Rules of thumb

Processes to ensure the feasibility of problem solving

COULD VASA BE SUCSSESFULLY BUILT IN SPITE OF
LACK OF THEORY?

WHAT DID PROJECT FAILED TO DO?
Software engineering and Scientific Methods
Page 20, 10/3/2015
Other reasons why Vasa capsized?
 Resource & budget plan. The project was delayed and in its
later phases, there was enormous pressure to finish work on
time.
 Project management. The main builder (or in modern terms,
the project manager) unfortunately sickened and died during
the building of the ship, and the consequence was weak
management and very poor coordination of the groups
building different parts.
 Changes in requirements. The original requirement for one
gun deck was changed to two gun decks when the building
of the ship had already begun. Because the king was behind
the decision, its possible consequences were not analyzed.
Software engineering and Scientific Methods
Page 21, 10/3/2015
Other reasons why Vasa capsized?
 Conflicting requirements and trade-off analysis. The Vasa
was intended to be a new type of ship combining superior
sailing characteristics and maneuverability with
overwhelming striking force.
 Design changes during the construction. The dimensions of
the ship were changed several times during its construction
with no proper analysis of the consequences.
 Scalability. Vasa was designed as a smaller ship, and its
dimensions were merely proportionally increased.
 Validation. The stability and other tests were primitive and
not well performed. (Test: running across the deck)
Software engineering and Scientific Methods
Page 22, 10/3/2015
Vasa Disaster – Similar do Software Projects
Similar situation in software development project
 No formal/theoretical background for requirements and
solution
 Feasibility of the requirements not analyzed
 Changes in requirements during the project work
 Time and Budget not properly planned
 No proper verification/validation
 Bad quality assurance
 Shortage in knowledge in new disciplines
....
Software engineering and Scientific Methods
Page 23, 10/3/2015
Engineering vs. Software Engineering
 Many similarities
 Methods and procedures
 Similar objectives and goals
 Many differences
 Difference between software and hardware/the real world
Software – no physical limits
Not visible
Modifiable
More complex
 Different theories and methods used
 Different experiences, traditions
 Different maturity level
Software engineering and Scientific Methods
Page 24, 10/3/2015
All aspects of Software Development
 Aspects

Technical (how technically solve the problem)

Organizational (how to organize people)

Financial

Marketing

Professional and ethical responsibility

Research and Science
Software engineering and Scientific Methods
Page 25, 10/3/2015
Computer Science Vs. Software Engineering
COMPUTER SCIENCE
Computer Functions
OTHER SCIENCES
Theories
CUSTOMER
Problem
SOFTWARE ENGINEERING
Software Engineering
Research & Science
Principles, Methods
and Tools to Solve
Problem and
Construct sSolutions
Software engineering and Scientific Methods
Solution
Page 28, 10/3/2015
Computer Science Vs. Software Engineering
COMPUTER SCIENCE
Algorithms and data structures
Programming languages
Architecture
Numerical and symbolic computation
Operating systems
SOFTWARE
ENGINEERING
Software methodology and engineering
Databases and information retrieval
Artificial intelligence and robotics
Human-computer communication
In many cases a defuse
Social, ethical, and professional issues
boundaries between SE and CS
Software engineering and Scientific Methods
Page 29, 10/3/2015
Methods and Technologies
Solution
Phases
Requirements
Analysis
Design
Implementation
Test
Delivery
Maintenance
Service
Software/Systems Engineering Methods
Different Technologies
Software engineering and Scientific Methods
Page 30, 10/3/2015
SE disciplines and areas
From European Software Engineering Conference and
Symposium on the Foundations of Software Engineering
 Requirements Engineering
 Specification and Verification
 Software Architecture and
Design
 Analysis and Testing
 Development Paradigms and
Software Processes
 Evolution and Refactoring
 Tools and Environments
 Empirical Software
Engineering
 Software Metrics
 Software Quality and
Performance
 Component-based Software
Engineering
 Model Driven Engineering
 Web Applications
 Distributed Systems and
Middleware
 Service Oriented Applications
 Mobile and Embedded System
 Open Standards and
Certification
 Software Economics and
Human Resources
 Dependability (safety, security,
reliability)
 Case Studies and Experience
Software engineering and Scientific
Methods
Reports
Page 31, 10/3/2015
SE disciplines - more examples
 Project management
 Real-time
 Development processes
 Tools and environments
 Reverse engineering
 Software Configuration
Management
 Software Maintenance
 Object-oriented modelling
 Formal specification
 Software dependability
(reliability, safety,…)
 Software engineering and the
Internet
 Education
 Software Economics
 ......
Software engineering and Scientific Methods
Page 32, 10/3/2015
What is then Software Engineering Research?
 Analyzing natures of problems and their solutions
 Finding more general principles that SE can use
 Developing methods and tools
 Implementing principles on new problem domains
 ……
Software engineering and Scientific Methods
Page 34, 10/3/2015
Software Engineering Research
Different methods used SE
Exemplified by Software Architecture

Presentation extracted from Mary Shaw’s
presentation on ICSE 2001 in Toronto
http://www-2.cs.cmu.edu/~Compose/paper_abstracts/etaps-2002.html
Software engineering and Scientific Methods
Page 35, 10/3/2015
The basic characteristic of SE
REAL WORLD
Practical problem
?
REAL WORLD
Practical Solution
Software engineering and Scientific Methods
Page 36, 10/3/2015
Software engineering and Scientific Methods
Page 37, 10/3/2015
Research Strategy
Software engineering and Scientific Methods
Page 38, 10/3/2015
Validation of the Result
Software engineering and Scientific Methods
Page 39, 10/3/2015
Nasreddin story and Software Engineering
Story about a lost ring
Nasreddin Hodja
Software engineering and Scientific Methods
Page 40, 10/3/2015
Software engineering and Scientific Methods
Page 41, 10/3/2015
SE Research process
 Research Questions
 Research Results
 Result Validation
Software engineering and Scientific Methods
Page 42, 10/3/2015
Software engineering and Scientific Methods
Page 43, 10/3/2015
Example: Software Architecture
 The software architecture of a program or computing system
is the structure or structures of the system, which comprise
software components, the externally visible properties of
those components and the relationships among them
L. Bass, P. Clements, R. Kazman, Software Architecture In Practise, Addison
Wesley, 1998
System
Subsystem
subsystem
component
component
Software engineering and Scientific Methods
component
Page 45, 10/3/2015
Software engineering and Scientific Methods
Page 46, 10/3/2015
Software engineering and Scientific Methods
Page 47, 10/3/2015
Software engineering and Scientific Methods
Page 48, 10/3/2015
Software engineering and Scientific Methods
Page 49, 10/3/2015
Software engineering and Scientific Methods
Page 50, 10/3/2015
Software engineering and Scientific Methods
Page 51, 10/3/2015
Software engineering and Scientific Methods
Page 52, 10/3/2015
Software engineering and Scientific Methods
Page 55, 10/3/2015
Software engineering and Scientific Methods
Page 56, 10/3/2015
Software engineering and Scientific Methods
Page 57, 10/3/2015
Software engineering and Scientific Methods
Page 58, 10/3/2015
Software engineering and Scientific Methods
Page 59, 10/3/2015
Software engineering and Scientific Methods
Page 60, 10/3/2015
Research Model – different phases in research life cycle
Software engineering and Scientific Methods
Page 62, 10/3/2015
Example:Software architecture
New concept: system decomposition
System
subsystem
component
Subsystem
component
Software engineering and Scientific Methods
component
Page 63, 10/3/2015
Next step – Characterisation - Architectural Style

Recurring structures that occur in software systems
AS = {Component types,Connector types,Constraints}
Component
and Connector
Types
Pipe and Filter
Shared Repository
Layered Abstract Machines
Buss
Software engineering and Scientific Methods
Page 64, 10/3/2015
Next step: Aspects of Software Architecture
 Further
characterisation Elements and Form
Attachment
Connector
Arch Component
Port

Role
Representation
(sub)System
Rationale

Describes how the architecture satisfies system requirements for both
functional and extra-functional properties.
Software engineering and Scientific Methods
Page 65, 10/3/2015
Next step: Formalization
Example - UML
IComA
<<subsystem>>
ComA
IComB
<<subsystem>>
ComB
Conceptual
Architecture
IComA
<<subsystem>>
ComC
Software engineering and Scientific Methods
Page 66, 10/3/2015
Software engineering and Scientific Methods
Page 68, 10/3/2015
Software engineering and Scientific Methods
Page 69, 10/3/2015
Summary
 Software Engineering is oriented on practical things
from the real word

Understanding problems, providing software solutions
 SE uses methods and tools for solving the problems
from different disciplines
 SE research

Understanding principles

Defining principle for solving the problems

Developing methods and tools
Software engineering and Scientific Methods
Page 70, 10/3/2015
Descargar

No Slide Title