ser_ch1

Embed Size (px)

Citation preview

  • 8/12/2019 ser_ch1

    1/51

    2005 IAS, Universitt Stuttgart 1

    SER

    1 Introduction and Motivation

    1.1 Why is Software Engineering Important?

    1.2 Why is Software Engineering Error-Prone?

    1.3 FAQs on Software Engineering

    1.4 Professional and Ethical Responsibility

    1.5 Summary

    Software Engineering for Real-Time Systems

  • 8/12/2019 ser_ch1

    2/51

    2005 IAS, Universitt Stuttgart 2

    SER

    Why is Software Engineering Important?

    The economies of ALL developed nations are dependent on software

    More and more systems are software controlled

    Software engineering is concerned with theories, methods and tools for

    professional software development

    Software engineering expenditure represents a significant fraction of GNP

    in all developed countries

    1.1 Why is Software Engineering Important?

  • 8/12/2019 ser_ch1

    3/51

    2005 IAS, Universitt Stuttgart 3

    SER1.1 Why is Software Engineering Important?

    Intensification of problems

    The complexity of programs is increasing

    System lifetime increases

    New applications for the use of computers emerge.

    In 2001 ca. 8Bio Microprocessors were delivered. Only 2% ended up in

    PCs. The rest is embedded in systems -> This is what this lecture is all

    about.

    Software development is an integral component of system development

    More and more developers are occupied with the maintenance of old

    systems

  • 8/12/2019 ser_ch1

    4/51

    2005 IAS, Universitt Stuttgart 4

    SER1.1 Why is Software Engineering Important?

    Life cycle of a software product

    flood of information

    high complexity

    costly and faulty maintenance

    software development

    software

    maintenance

    requirement specification(2000 requirements)

    product(1m DIN A4,1 M BYTE Code)

    system analysis(10 000 detailed

    requirements)

    software programs(100 000 lines of code)

    rough design(50 module packages)

    detailed design( 1500 modules )

  • 8/12/2019 ser_ch1

    5/51

    2005 IAS, Universitt Stuttgart 5

    SER1.1 Why is Software Engineering Important?

    Software costs

    Software costs often dominate system costs. The costs of software on a

    PC are often greater than the hardware cost. Modern telecommunication

    systems attribute 80..90% of total system cost to software cost.

    Software costs more to maintain than it does to develop. For systems with

    a long lifetime such as real-time or embedded systems - , maintenancecosts are several times the development costs.

    Software engineering is concerned with cost-effective software

    development.

    Design to Cost!

  • 8/12/2019 ser_ch1

    6/51

    2005 IAS, Universitt Stuttgart 6

    SERSoftware Engineering for Real-Time Systems

    1 Introduction and Motivation

    1.1 Why is Software Engineering Important?

    1.2 Why is Software Engineering Error-Prone?

    1.3 FAQs on Software Engineering

    1.4 Professional and Ethical Responsibility

    1.5 Summary

  • 8/12/2019 ser_ch1

    7/51

    2005 IAS, Universitt Stuttgart 7

    SER1.2 Why is Software Engineering Error-Prone?

    Characteristics of Software

    software is an immaterial product

    software is not subject to wear out

    software ages but continues to live

    software normally can be changed easier and quicker

    than a technical product

    there are no spare parts for software

    Deeply embedded into todays business and society

    processes makes it vulnerable to all type of attacks.

    duplication is trivialsoftware theft

    security

    Standing on quicksand

  • 8/12/2019 ser_ch1

    8/51

    2005 IAS, Universitt Stuttgart 8

    SER1.2 Why is Software Engineering Error-Prone?

    Denver-Airport (1993 - 1995)

    October 1993: Problems in the high tech baggage distribution plant.

    April 1994: Postpone of the opening after debacle:

    Pieces of baggage were thrown on cars not there at all; cars fell out of the

    lanes; etc.

    The computer-controlled baggage distribution plant consisted of over 150

    computers, 4000 cars, 5000 sensors, 56 bar code scanners; value of the plant:

    $200 million, additional $100 million for building modifications.

    Main cause:Too many messages via Ethernet; sorting instructions didn't arrive in time because

    the network (LAN) is overloaded.

    The whole problem is too complex.

    August 1994: Installation of a (second) conventional system with usual

    conveyor belts: additional $50 million.

    First official opening: March 1, 1995 - but out of service soon after;

    reopening: October 1995

    Total costs: $5200 million, instead of $2000 million projected initially.

    Software faults are expensive

  • 8/12/2019 ser_ch1

    9/51

    2005 IAS, Universitt Stuttgart 9

    SER1.2 Why is Software Engineering Error-Prone?

    Case Study - Ariane 5 (1)

    An European rocket designed to send commercial payloads (e.g.communication satellites, etc.) into orbit

    Successor of successful Ariane 4 launcher

    Ariane 5 can carry heavier payloads than Ariane 4

    June 4, 1996

    Total failure of the Ariane 5 launcher on its

    maiden flight

  • 8/12/2019 ser_ch1

    10/51

    2005 IAS, Universitt Stuttgart 10

    SER1.2 Why is Software Engineering Error-Prone?

    Launcher failure

    Approximately 37 seconds after the successful lift-off, the Ariane 5

    launcher lost control.

    Incorrect control signals were sent to the engines and these swivelled so

    that unsustainable stresses were imposed on the rocket.

    It started to break up and self-destructed.

    The system failure was a direct result of a software failure. However, it was

    symptomatic of a more general system validation failure.

  • 8/12/2019 ser_ch1

    11/51

    2005 IAS, Universitt Stuttgart 11

    SER1.2 Why is Software Engineering Error-Prone?

    The problem

    The attitude and trajectory of the rocket are measured by a computer-

    based inertial reference system. This transmits commands to the engines

    to maintain attitude and direction.

    The software failed and this system and the backup system shut down.

    Diagnostic commands were transmitted to the engines, which interpretedthem as real data and which swivelled to an extreme position.

  • 8/12/2019 ser_ch1

    12/51

    2005 IAS, Universitt Stuttgart 12

    SER

    Software failure

    1.2 Why is Software Engineering Error-Prone?

    Software failure occurred when attempting to convert a 64-bit floating point

    number to a signed 16-bit integer which caused the number to overflow.

    There was no application-defined exception handler associated with the

    conversion so the default exception management facilities provided by the

    system were invoked. They shut down the whole software. The backup software was just a copy and behaved in exactly the same

    way.

  • 8/12/2019 ser_ch1

    13/51

    2005 IAS, Universitt Stuttgart 13

    SER

    Avoidable failure?

    The software that failed was reused from the Ariane 4 launch vehicle. Thespecific part leading towards the overflow was not used in Ariane 5.

    Decisions were made:

    to reuse working algorithms and their implementation in a modular

    (black box) way.

    not to remove/change the reused component as this could introduce

    new faults.

    not to provide any overflow exception handling because the processor

    was heavily loaded. For dependability reasons, it was thought

    desirable to have some spare processor capacity.

    1.2 Why is Software Engineering Error-Prone?

  • 8/12/2019 ser_ch1

    14/51

    2005 IAS, Universitt Stuttgart 14

    SER1.2 Why is Software Engineering Error-Prone?

    Why not Ariane 4?

    The physical characteristics of Ariane 4 (a smaller vehicle) are such that it

    has a lower initial acceleration than Ariane 5.

    The value of the variable on Ariane 4 could never reach a level that caused

    overflow during the launch period.

  • 8/12/2019 ser_ch1

    15/51

    2005 IAS, Universitt Stuttgart 15

    SER

    Validation failure

    As the facility that failed was not required for Ariane 5, there was no

    requirement associated with it.

    As there was no associated requirement, there were no tests of that part of

    the software and hence no possibility of discovering the problem.

    During system testing, simulators of the inertial reference systemcomputers were used. These did not generate the error as there was no

    requirement!

    1.2 Why is Software Engineering Error-Prone?

  • 8/12/2019 ser_ch1

    16/51

    2005 IAS, Universitt Stuttgart 16

    SER1.2 Why is Software Engineering Error-Prone?

    Review failure

    The design and code of all software should be reviewed for problems

    during the development process.

    However:

    The inertial reference system software was not reviewed because it

    had been used in a previous version.

    The review failed to expose the problem or that the test coverage

    would not reveal the problem.

    The review failed to appreciate the consequences of system shutdown

    during a launch.

  • 8/12/2019 ser_ch1

    17/51

    2005 IAS, Universitt Stuttgart 17

    SER

    Lessons learned

    As well as testing for what the system should do, you may also have to testfor what the system should not do

    Do not have a default exception handling response which is system shut-

    down in systems that have no fail-safe state

    In critical computations, always return best effort values even if the

    absolutely correct values cannot be computed

    Wherever possible, use real equipment and not simulations

    Improve the review process to include external participants and review all

    assumptions made in the code

    1.2 Why is Software Engineering Error-Prone?

  • 8/12/2019 ser_ch1

    18/51

    2005 IAS, Universitt Stuttgart 18

    SER

    The failure was avoidable

    The developers of the Ariane 5 made a critical and elementary

    mistake:

    They designed a system which took the whole system to the fall by a

    single component fault.

    1.2 Why is Software Engineering Error-Prone?

    Extensive listing of software problems

    http://www.csl.sri.com/users/neumann/illustrative.html

  • 8/12/2019 ser_ch1

    19/51

    2005 IAS, Universitt Stuttgart 19

    SERSoftware Engineering for Real-Time Systems

    1 Introduction and Motivation

    1.1 Why is Software Engineering Important?

    1.2 Why is Software Engineering Error-Prone?

    1.3 FAQs on Software Engineering

    1.4 Professional and Ethical Responsibility

    1.5 Summary

  • 8/12/2019 ser_ch1

    20/51

    2005 IAS, Universitt Stuttgart 20

    SER

    FAQs about Software Engineering

    What is software? What is software engineering?

    What is the difference between software engineering and computer

    science?

    What are real-time systems?

    Why is software engineering for real-time systems difficult? What is a software process?

    What is a software process model?

    What are the costs of software engineering?

    What are software engineering methods?

    What is CASE (Computer-Aided Software Engineering) What are the attributes of good software?

    What are the reasons for poor software quality?

    What are the key challenges facing software engineering?

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    21/51

    2005 IAS, Universitt Stuttgart 21

    SER

    What is software?

    Computer programs andassociated documentation

    Software products may be

    generic

    -> developed to be sold to

    a range of differentcustomers

    Custom-made

    -> developed for a single

    customer according to

    their specification

    1.3 FAQs on Software Engineering

    software

    product

    designdocumentation

    systemdesignprototypes

    configuration

    managementtest environment

    users

    guide

    support

    userrequirements

    specification

    Software is much more than code.

  • 8/12/2019 ser_ch1

    22/51

    2005 IAS, Universitt Stuttgart 22

    SER

    What is software engineering?

    Software engineering is the use of qualified methods, tools and process

    models for building and using software aiming

    1.3 FAQs on Software Engineering

    on the one hand to reduce the software costs at the development,

    maintenance and enhancement of program systems

    on the other hand to realize a higher level of system quality.

  • 8/12/2019 ser_ch1

    23/51

    2005 IAS, Universitt Stuttgart 23

    SER

    What is the difference between software engineering and

    computer science?

    Software engineering constructive approach

    guidelines from experiences and empirical

    methods

    development and delivery of useful

    software products

    1.3 FAQs on Software Engineering

    Computer Science analytical, inductive approach

    theoretical valid, comprehensive solutions

    research and definition of principles,

    methods and software tools that may beapplied to software product development

    practical

    theoretical

  • 8/12/2019 ser_ch1

    24/51

    2005 IAS, Universitt Stuttgart 24

    SER

    What are real-time systems?

    Many of today Information systems seat reservation

    bank account management

    logistic systems

    Telecommunication

    Industrial automation systems

    Production and manufacturing automation

    Air-conditioning and building automation systems

    Energy generation (automation, monitoring, safety)

    Traffic management, train systems, air flight systems

    Further micro-controller / embedded systems

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    25/51

    2005 IAS, Universitt Stuttgart 25

    SER

    Why is software engineering for real-time systems difficult?

    Being in time is the critical requirement

    programming languages with real time features

    parallel processing

    synchronization

    interrupt processing

    process input/output

    integrated hardware / software systems

    embedded into technical processes that are difficult to simulate

    real-time operating systems, database systems, etc

    test of dynamic aspects

    simulation of complex parallel processes

    safety and reliability aspects

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    26/51

    2005 IAS, Universitt Stuttgart 26

    SER

    What is a software process?

    A set of activities whose goal is the development or evolution of software

    Generic activities in all software processes are:

    Specification - what the system should do and its development

    constraints

    Development - production of the software system

    Validation - checking that the software is what the customer wants

    Evolution - changing the software in response to changing demands

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    27/51

    2005 IAS, Universitt Stuttgart 27

    SER

    Problem: quality assurance

    Ensuring, that quality requirements are met

    in every development phase.

    1.3 FAQs on Software Engineering

    accompanying development

    Ensuring, that the software process is worked on basis of proven products,

    specifications and documents only.

    standardized procedure

    Ensuring, that unexamined products, without specifications or documents

    do not leave the company.

    release through SQA

  • 8/12/2019 ser_ch1

    28/51

    2005 IAS, Universitt Stuttgart 28

    SER

    What is a software process model?

    A simplified representation of a software process, presented from aspecific perspective

    Examples of process perspectives are

    Workflow perspective - sequence of activities

    Data-flow perspective - information flow

    Role/action perspective - who does what

    Generic process models

    Waterfall

    Evolutionary development

    Formal transformation Integration from reusable components

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    29/51

    2005 IAS, Universitt Stuttgart 29

    SER

    What are the costs of software engineering?

    Roughly 60% of costs are development costs, 40% are testing costs. For

    custom software, evolution costs often exceed development costs. During

    maintenance activities, cost of test increases.

    Costs vary depending on the type of system being developed and the

    requirements of system attributes such as performance and system

    reliability

    Distribution of costs depends on the development model that is used

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    30/51

  • 8/12/2019 ser_ch1

    31/51

    2005 IAS, Universitt Stuttgart 31

    SER

    What are software engineering methods?

    Structured approaches to software development which include systemmodels, notations, rules, design advice and process guidance

    Model descriptions

    Descriptions of graphical models which should be produced

    Rules

    Constraints applied to system models

    Recommendations

    Advice on good design practice

    Process guidance

    What activities to follow

    1.3 FAQs on Software Engineering

  • 8/12/2019 ser_ch1

    32/51

    2005 IAS, Universitt Stuttgart 32

    SER

    Methods of programming

    1.3 FAQs on Software Engineering

    20202010200019901980197019601950

    build systematical new development configure

    todayprogramming as an art

    structured

    object oriented

    adaptive

    SW crisis

  • 8/12/2019 ser_ch1

    33/51

    2005 IAS, Universitt Stuttgart 33

    SER

    What is CASE (Computer-Aided Software Engineering)?

    1.3 FAQs on Software Engineering

    Software systems which are intended to provide automated support forsoftware process activities. CASE systems are often used for method

    support

    Upper-CASE

    Tools to support the early process activities of requirements and

    design

    Lower-CASE Tools

    Tools to support later activities such as programming, debugging and

    testing

    requirements, design

    programming, debugging,

    test

  • 8/12/2019 ser_ch1

    34/51

    2005 IAS, Universitt Stuttgart 34

    SER

    What are the attributes of good software?

    1.3 FAQs on Software Engineering

    The software should deliver the required functionality and performance tothe user and should be maintainable, dependable and usable

    Maintainability

    Software must evolve to meet changing needs

    Dependability

    Software must be trustworthy

    Efficiency

    Software should not make wasteful use of system resources

    Usability

    Software must be usable by the users for which it was designed

  • 8/12/2019 ser_ch1

    35/51

    2005 IAS, Universitt Stuttgart 35

    SER

    What are reasons for poor software quality?

    1.3 FAQs on Software Engineering

    organization and management unclear object in mind

    unclear responsibility

    inadequate project planning and control

    insufficient estimation of the project costs

    quality control not independent

    methodology

    missing/ insufficient registration of needs

    no use of development methods

    incomplete documentation

    no standards or no use of standards

    no quality assurance

    technology

    no development models

    no strategies for process improvement

    not enough use of CASE-Tools

    no analysis of metrics

  • 8/12/2019 ser_ch1

    36/51

    2005 IAS, Universitt Stuttgart 36

    SER

    Distribution of the error costs

    1.3 FAQs on Software Engineering

    requirementsreview

    designreview

    codereview

    componenttest

    systemtest

    deployment

    error costs100%

    80%

    60%

    40%

    20%

    0%

    The later an error is discovered, the more expensive is the elimination!

  • 8/12/2019 ser_ch1

    37/51

    2005 IAS, Universitt Stuttgart 37

    SER

    What are the key challenges facing software engineering?

    1.3 FAQs on Software Engineering

    Legacy systems Old, valuable systems must be maintained and updated

    Heterogeneity

    Systems are distributed and include a mix of hardware and software

    Better, faster, cheaper There is increasing pressure for faster delivery of software at a lower

    cost with improving quality

    Security, reliability, availability, safety

    Modern society and businesses depend heavily on software. They are

    vulnerable to poor quality and attacks.

  • 8/12/2019 ser_ch1

    38/51

    2005 IAS, Universitt Stuttgart 38

    SER

    Problem: communication (1)

    1.3 FAQs on Software Engineering

    Team 1

    component

    A

    component

    B

    Team 2

    component

    C

    component

    D

    If Team 1 changes the interface of component A ...

  • 8/12/2019 ser_ch1

    39/51

    2005 IAS, Universitt Stuttgart 39

    SER

    Problem: communication (2)

    1.3 FAQs on Software Engineering

    Team 1

    component

    A

    component

    B

    Team 2

    component

    C

    component

    D

    ... can you ensure, that Team 2 will consider this when constructingcomponent C?

    Problem: different teams, products, companies

  • 8/12/2019 ser_ch1

    40/51

    2005 IAS, Universitt Stuttgart 40

    SERSoftware Engineering for Real-Time Systems

    1 Introduction and Motivation

    1.1 Why is Software Engineering Important?

    1.2 Why is Software Engineering Error-Prone?

    1.3 FAQs on Software Engineering

    1.4 Professional and Ethical Responsibility

    1.5 Summary

  • 8/12/2019 ser_ch1

    41/51

    2005 IAS, Universitt Stuttgart 41

    SER

    Professional and ethical responsibility

    1.4 Professional and Ethical Responsibility

    Software engineering involves wider responsibilities than simply the

    application of technical skills

    Software engineers must behave in an honest and ethically responsible

    way if they are to be respected as professionals

    Ethical behaviour is more than simply upholding the law.

  • 8/12/2019 ser_ch1

    42/51

    2005 IAS, Universitt Stuttgart 42

    SER

    Issues of professional responsibility

    1.4 Professional and Ethical Responsibility

    Confidentiality

    Engineers should normally respect the confidentiality of their

    employers or clients irrespective of whether or not a formal

    confidentiality agreement has been signed.

    Competence Engineers should not misrepresent their level of competence.

    They should not knowingly accept work which is out with their

    competence.

  • 8/12/2019 ser_ch1

    43/51

    2005 IAS, Universitt Stuttgart 43

    SER

    Issues of professional responsibility

    1.4 Professional and Ethical Responsibility

    Intellectual property rights Engineers should be aware of local laws governing the use of

    intellectual property such as patents, copyright, etc. They should

    be careful to ensure that the intellectual property of employers

    and clients is protected.

    Computer misuse Software engineers should not use their technical skills to misuse

    other peoples computers. Computer misuse ranges from relatively

    trivial (game playing on an employers machine, say) to extremely

    serious (dissemination of viruses).

  • 8/12/2019 ser_ch1

    44/51

    2005 IAS, Universitt Stuttgart 44

    SER

    ACM/IEEE Code of Ethics

    1.4 Professional and Ethical Responsibility

    The professional societies have cooperated to produce a code ofethical practice.

    Members of these organisations sign up to the code of practice when

    they join.

    The Code contains eight Principles related to the behaviour of and

    decisions made by professional software engineers, including practitioners,educators, managers, supervisors and policy makers,

    as well as trainees and students of the profession.

  • 8/12/2019 ser_ch1

    45/51

    2005 IAS, Universitt Stuttgart 45

    SER

    Code of ethics - principles (1)

    1.4 Professional and Ethical Responsibility

    1. PUBLIC Software engineers shall act consistently with the public interest.

    2. CLIENT AND EMPLOYER

    Software engineers shall act in a manner that is in the best interests

    of their client and employer consistent with the public interest.

    3. PRODUCT

    Software engineers shall ensure that their products and related

    modifications meet the highest professional standards possible.

  • 8/12/2019 ser_ch1

    46/51

    2005 IAS, Universitt Stuttgart 46

    SER

    Code of ethics - principles (2)

    1.4 Professional and Ethical Responsibility

    4. JUDGMENT Software engineers shall maintain integrity and independence in their

    professional judgment.

    5. MANAGEMENT

    Software engineering managers and leaders shall subscribe to and

    promote an ethical approach to the management of softwaredevelopment and maintenance.

    6. PROFESSION

    Software engineers shall advance the integrity and reputation of the

    profession consistent with the public interest.

  • 8/12/2019 ser_ch1

    47/51

    2005 IAS, Universitt Stuttgart 47

    SER

    Code of ethics - principles (3)

    1.4 Professional and Ethical Responsibility

    7. COLLEAGUES

    Software engineers shall be fair to and supportive of their colleagues.

    8. SELF

    Software engineers shall participate in lifelong learning regarding the

    practice of their profession and shall promote an ethical approach tothe practice of the profession.

  • 8/12/2019 ser_ch1

    48/51

    2005 IAS, Universitt Stuttgart 48

    SER

    Ethical dilemmas

    1.4 Professional and Ethical Responsibility

    Disagreement in principle with the policies of senior management

    Your employer acts in an unethical way and releases a safety-critical

    system without finishing the testing of the system

    Participation in the development of military weapons systems or

    nuclear systems

    These dilemmas depend on ones own values which might differ

    from the clients or employers values

  • 8/12/2019 ser_ch1

    49/51

    2005 IAS, Universitt Stuttgart 49

    SER

    1 Introduction and Motivation

    Software Engineering for Real-Time Systems

    1.1 Why is Software Engineering Important?

    1.2 Why is Software Engineering Error-Prone?

    1.3 FAQs on Software Engineering

    1.4 Professional and Ethical Responsibility1.5 Summary

  • 8/12/2019 ser_ch1

    50/51

    2005 IAS, Universitt Stuttgart 50

    SER1.5 Summary

    Summary

    Software engineering is an engineering discipline which is concernedwith all aspects of software production.

    Software products consist of developed programs and associated

    documentation. Essential product attributes are maintainability,

    dependability, efficiency and usability.

    The software process consists of activities which are involved indeveloping software products. Basic activities are software specification,

    development, validation and evolution.

    Methods are organised ways of producing software. They include

    suggestions for the process to be followed, the notations to be used,

    rules governing the system descriptions which are produced anddesign guidelines.

  • 8/12/2019 ser_ch1

    51/51

    2005 IAS, Universitt Stuttgart 51

    SER

    Further Information

    1.5 Summary

    Ian Sommerville: Software

    Engineering

    Addison Wesley, 20016. Edition

    ISBN: 3827370019

    Software Engineering Body ofKnowledge

    http://www.swebok.org/