Software Engineering

Similar documents
Computer Science: Who Cares? Computer Science: It Matters. Computer Science: Disciplines

Nancy G. Leveson and Clark S. Turner, An Investigation of the Therac-25 Accidents. Computer 26(7), pp , Jul Presented by Dror Feitelson

Software Life Cycle Models

IS 525 Chapter 2. Methodology Dr. Nesrine Zemirli

Computer Science: Disciplines. What is Software Engineering and why does it matter? Software Disasters

An introduction to software development. Dr. C. Constantinides, P.Eng. Computer Science and Software Engineering Concordia University

Information Systemss and Software Engineering. Computer Science & Information Technology (CS)

Service-Oriented Software Engineering - SOSE (Academic Year 2015/2016)

Automated Software Engineering Writing Code to Help You Write Code. Gregory Gay CSCE Computing in the Modern World October 27, 2015

Code Complete 2: A Decade of Advances in Software Construction Construx Software Builders, Inc. All Rights Reserved.

Lecture 13: Requirements Analysis

Ethics. Paul Jackson. School of Informatics University of Edinburgh

Analysis of Software Artifacts

Object-oriented Analysis and Design

ACCELERATE SOFTWARE DEVELOPMENT WITH CONTINUOUS INTEGRATION AND SIMULATION

8.2.1 Therac-25 Radiation Overdoses

About Software Engineering.

Requirements Gathering using Object- Oriented Models

Unit 24: Controlling Systems Using IT

Requirements Gathering using Object- Oriented Models

Software Engineering Design & Construction

1. Historical Development of SSDMs

Robot Olympics: Programming Robots to Perform Tasks in the Real World

F. Tip and M. Weintraub REQUIREMENTS

Software processes, quality, and standards Static analysis

Implementing BIM for infrastructure: a guide to the essential steps

Debugging a Boundary-Scan I 2 C Script Test with the BusPro - I and I2C Exerciser Software: A Case Study

A FRAMEWORK FOR PERFORMING V&V WITHIN REUSE-BASED SOFTWARE ENGINEERING

Course Introduction and Overview of Software Engineering. Richard N. Taylor Informatics 211 Fall 2007

Software Maintenance Cycles with the RUP

KUMU A O CUBESAT: THERMAL SENSORS ON A CUBESAT

Heading back to Mars with a thermal control system developed using NX

UNIT IV SOFTWARE PROCESSES & TESTING SOFTWARE PROCESS - DEFINITION AND IMPLEMENTATION

JPL. Heading back to Mars with thermal control system developed using NX. Aerospace. Product NX

Automated Test Summit 2005 Keynote

HOWARD A. LANDMAN HOWARDL11

Introduction to Software Engineering

Designing for recovery New challenges for large-scale, complex IT systems

Industrial Experience with SPARK. Praxis Critical Systems

Design and Operation of Micro-Gravity Dynamics and Controls Laboratories

Introduction to adoption of lean canvas in software test architecture design

The Use of SPARK in a Complex Spacecraft CubeSat Developer s Workshop - Copyright 2017 Carl Brandon & Peter Chapin

Dental Water Treatment System

Code Complete 2: Realities of Modern Software Construction

FPGA Design Process Checklist

ISO ISO is the standard for procedures and methods on User Centered Design of interactive systems.

USER S MANUAL. This manual must be considered an integral part of the projector. The user must read this manual before using the projector

CSE - Annual Research Review. From Informal WinWin Agreements to Formalized Requirements

Systems Engineering Overview. Axel Claudio Alex Gonzalez

Introduction to Real-time software systems Draft Edition

Scope of OOSE. A. Starts. CMPSC 487 Lecture 01 Topics: Schach - Chap 1. The Scope of Object-Oriented Software Engineering

JROTCDL.com CADET 105 Time Management 1

Human Factors Points to Consider for IDE Devices

EE307. Frogger. Project #2. Zach Miller & John Tooker. Lab Work: 11/11/ /23/2008 Report: 11/25/2008

Domain Understanding and Requirements Elicitation

UNIT-III LIFE-CYCLE PHASES

UNIT VIII SYSTEM METHODOLOGY 2014

A New - Knot Model for Component Based Software Development

Operation PolarEye. Polar bear habitats are melting! Practice coding without computers, and then code a drone to map polar bear habitat.

Introduction to Software Engineering

TELEMETRY SOFTWARE DEVELOPMENT LIFE CYCLE

The Need for Gate-Level CDC

By the end of this chapter, you should: Understand what is meant by engineering design. Understand the phases of the engineering design process.

Object-Oriented Design

A New Approach to the Design and Verification of Complex Systems

IBM Software Group. Mastering Requirements Management with Use Cases Module 2: Introduction to RMUC

A HARDWARE DC MOTOR EMULATOR VAGNER S. ROSA 1, VITOR I. GERVINI 2, SEBASTIÃO C. P. GOMES 3, SERGIO BAMPI 4

A CASE STUDY OF TWO ENGINEERING STUDENT DESIGN TEAMS

Purpose and Difficulty of Software Testing

Towards Integrated System and Software Modeling for Embedded Systems

TDD Making sure everything works. Agile Transformation Summit May, 2015

CSE 110 Software Engineering A view from the research university

Software Eng. 2F03: Logic For Software Engineering

Directions: Read the following passage and answer the questions that follow. Seven Minutes of Terror, Eight Years of Ingenuity

William Milam Ford Motor Co

Dan Dvorak and Lorraine Fesq Jet Propulsion Laboratory, California Institute of Technology. Jonathan Wilmot NASA Goddard Space Flight Center

Practical issues. Why Software Engineering in general? Practical issues. Examen: Schriftelijk examen (70%) Materiaal: artikelen

GameSalad Basics. by J. Matthew Griffis

Introduction to Software Engineering (Week 1 Session 2)

Test and Evaluation of Autonomous Systems & The Role of the T&E Community in the Requirements Process

DESIGN THINKING AND THE ENTERPRISE

Israel Railways No Fault Liability Renewal The Implementation of New Technological Safety Devices at Level Crossings. Amos Gellert, Nataly Kats

ULTRASONIC SIGNAL PROCESSING TOOLBOX User Manual v1.0

Game Design Methods. Lasse Seppänen Specialist, Games Applications Forum Nokia

CHAPTER 1: INTRODUCTION TO SOFTWARE ENGINEERING DESIGN

Block Delete techniques (also called optional block skip)

R&D PROJECT MANAGEMENT IS IT AGILE?

Test & Measurement Technology goes Embedded

Introduction. How are games similar/different from other software engineering projects? Common software engineering models & game development

Prototype to product the difficult transition

White paper on professional practice in software engineering. Canadian Engineering Qualifications Board Software Engineering Task Force.

UML and Patterns.book Page 52 Thursday, September 16, :48 PM

VALLIAMMAI ENGNIEERING COLLEGE SRM Nagar, Kattankulathur DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING

The Real Secret Of Making Passive Income By Using Internet At Your Spare Time!

Technology & Manufacturing Readiness RMS

CSE 435: Software Engineering

in the New Zealand Curriculum

A New Approach to Safety in Software-Intensive Systems

Applying Open Architecture Concepts to Mission and Ship Systems

Testing in the Lifecycle

Transcription:

Introduction to Software Engineering and the Software Lifecycle CS401 Software Engineering Theories and practices used to construct high-quality large-scale software How you may have created many programs: 1

Code and Test Works fine for small problems Undesirable for larger problems No well defined phases How do you know you re building the right thing? Little/No time to test Success achieved by hacking skills and luck Difficult/Impossible to repeat successes Future maintenance Large Systems Software Engineering Present day applications are big Curiosity Rover: 2 MLOC Ubuntu Linux Kernel: 14 MLOC Windows 7: 50 MLOC Are generally not developed by their users Relying on programming ability alone is not adequate Scope too large, too many people, modules, processes, ill-defined requirements and perspectives This class is not about how to program Software engineering is still considered an art rather than a craft 2

Software in the 60 s Increasingly large software systems, increasing problems (and still today!) Delivered late Did not behave as expected Not adaptable Have maintenance problems This became known as the Software Crisis Solution Develop software using a more theoretical, sound, and proven basis, like engineers Hence Software Engineering Building software should be done like building bridges or automobiles? What is Software Engineering? First NATO Conference, 1968 Software engineering is the establishment and use of sound principles in order to obtain economically software that is reliable and works efficiently on real machines. IEEE Std Glossary of Software Eng. Terminology Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation and maintenance of software; that is the application of engineering to software. 3

Simple Lifecycle Model Requirements Engineering Objective: a description of the problem to be solved, the requirements posed by the environment Requirements Functional (What the system should do) Non-functional (Hardware, users, etc) The description includes: functionalities, future extensions, amount/type of required documentation, performance and response time Part can be a Feasibility study The more careful the requirements engineering phase, the larger the chance that the ultimate system will meet expectations All people must collaborate intensively Resulting document is the Requirements Specification 4

Design A model of the whole system is developed Not programmed yet, but when programmed would solve the user s problem Decomposed into modules, components, interfaces Global description of the system captured in the architecture May be evaluated, serve as template for similar system, reusable components Separate the what from the how Annoying preamble to the real work?? End of the design phase can include pseudocode Implementation Concentrates on individual modules Adheres to the software architecture and specifications from the design phase First goal should be well-documented, reliable, easy to read, correct program not one full of tricks! Result of the implementation phase is an executable program Often eased by use of pseudocode during the design phase 5

Testing Testing should actually be performed throughout all phases, not only after implementation is finished Cheaper to correct errors the earlier they are detected; errors can occur in requirements, design, and implementation Testing at phase boundaries Verification: transition between subsequent phases is correct Validation: on track meeting system requirements Maintenance Manage changes after delivery Perfective (changes in user requirements) Adaptive (changes in the environment) Corrective (removal of faults) Preventive (for future maintenance of the system) 6

Spanning All Phases Project Management Planning, team organization, quality issues, cost, schedule estimation, etc. to ensure the project is delivered on time and on budget Documentation Must start early Often a balancing item; tends to be pushed back for other items Software not well documented has higher costs later when changes occur Typical Effort for Each Activity 40-20-40 rule: Only 20% of the effort is spent on actual coding 7

Maintenance Activities Not shown in previous chart Over lifetime of systems, maintenance grows to 50% Typical percentages for maintenance Perfective 50% Adaptive 25 % Corrective 21% Preventive 4 % Spectacular Failures Need for SW Engineering Therac-25 Radiation treatment machine malfunction Delivers small doses of radiation through filters to treat cancers, tumors Six deaths due to lethal dose of radiation before fixed 8

Therac-25 Updated version of Therac-20 Hardware interlocks stopped machine if errors occurred Therac-25 designers thought the software was good since techs never reported any problems with Therac-20 Software errors resulted with no ill effect, so many errors on screen they were ignored Therac-25 : hardware interlocks replaced with software Flag: when no errors in setup, flag set to zero But only 1 byte for errors, if 256 errors there was overflow back to 0 Machine thought tests passed when they really failed Therac-25 That means that on every 256th pass through Set-Up Test, the upper collimator will not be checked and an upper collimator fault will not be detected. The overexposure occurred when the operator hit the "set" button at the precise moment that Class3 rolled over to zero. Thus Chkcol was not executed, and F$mal was not set to indicate the upper collimator was still in field-light position. The software turned on the full 25 MeV without the target in place and without scanning. AECL described the technical "fix" implemented for this software flaw as simple: The program is changed so that the Class3 variable is set to some fixed nonzero value each time through Set-Up Test instead of being incremented. An Investigation of the Therac-25 Accidents Leveson & Turner 9

Therac-25 Two errors here: human process and accuracy Took two years to diagnose and fix Lesson: Can t separate software process from hardware Need for robust software testing Mars Climate Observer Observer lost 9/99 Lockheed Martin provided thrust data in pounds, JPL entered data in Newtons Ground control lost contact trying to settle observer into orbit Process/Communications/Human error, not really a software problem 10

Real-Time Anomaly Example: Mars Pathfinder Lander/relay for Sojourner robot Onboard computer would spontaneously reset itself Reported by the media as a software glitch Used embedded real-time operating system, vxworks Pathfinder Problem Priority Inversion Pathfinder contained an information bus Data from Pathfinder s sensors, Sojourner went on bus toward earth Commands from earth send along the bus to sensors Must schedule the bus to avoid conflicts Used semaphores If high-priority thread was about to block waiting for a low priority thread, there was a split-second where a medium-priority thread could jump in Long-running medium priority thread kept low priority thread from running which kept the high-priority thread from running Good news: watchdog timer noticed thread did not finish on time, rebooted the whole system Noticed during testing, but assumed to be hardware glitches. The actual data rate from Mars made the glitch rate much higher than in testing 11

Pathfinder Fortunate that JPL engineers left debugging code that enabled the problem to be found and remotely invoke patch Patch: Priority Inheritance Have the low priority thread inherit the priority of the high priority thread while holding the mutex, allowing it to execute over the medium priority thread Such race conditions hard to find, similar problem existed with the Therac-25 Reeves, JPL s/w engineer: Even when you think you ve tested everything that you can possibly imagine, you re wrong. Mars Rover : Spirit Spirit began acting up last week, when it stopped sending data and began rebooting its computer, resetting it roughly 130 times. At one point, the rover thought it was 2053. Bug Description Engineers found that the rover's 256 megabyte flash memory had retained hundreds of files containing flight data and was still juggling them along with the daily flood of new data from its activities in Mars' Gusev Crater. 12

Spirit Workaround By commanding Spirit each morning into a mode that avoids using the flash memory, engineers plan to begin deleting hundreds of unneeded files to make the memory more manageable for the rover's RAM. WHY WASN'T THIS CAUGHT IN TEST? The bug had not been detected in operational tests of the rover on Earth because the longest tests lasted only eight or nine days. Approximation/Accuracy Patriot Missile Example More embedded software Fault in the guidance software Cumulative timing fault Radar detects missile, calculates where the Scud will be within its range gate Requires accurate determination of velocity 13

Patriot Missile Patriot s internal clock: 100 ms Time: 24 bit integer Velocity: 24 bit float Loss of precision converting from integer to float! Precision loss proportional to target s velocity and the length of time that the system is running When running for over 100 hours, range gate shifted by a whopping 687 meters Perhaps just even worse: bug known beforehand, not fixed until after incident due to lack of procedures for wartime bug fixes Failures These could have been caught by: Software environments to detect errors Better requirements and specifications Better design Better testing Closer involvement between programmers and stakeholders 14

Lifecycle Models Simple Model Document Driven Next phase reached as documents are produced Problems Feedback lacking Maintenance is often really evolution Other models are available We will focus on a different model, Agile Programming, in this class Waterfall Model Slight variation of simple model Verification (meets specs) and Validation (meets user requirements) Emphasis on a careful analysis before the system is actually built 15

Waterfall Model Verification and Validation after each step Attempts to find and fix errors early Like building a house Ensure a solid foundation, frame, build your way up from there Problems Too rigid, developers cannot move between phases User might not be able to express what they want Imagine putting in an order for a software system upon entering the store; no opportunity to look around, try things out, customize, etc. Prototyping Motivation: Requirements elicitation is difficult Software is developed because the present situation is unsatisfactory However, the desirable new situation may be as yet unknown Aspects Prototyping is used to obtain the requirements of some aspects of the system Prototyping should be a relatively cheap process Use rapid prototyping languages and tools Not all functionality needs to be implemented Production quality is not required 16

Prototyping as a Tool for Requirements Engineering Types of Prototyping Throwaway prototyping The n th prototype is followed by a waterfall-like process (as shown on the previous slide) Recommended but rarely used; difficult to discard a (partly) working system Evolutionary prototyping The n th prototype is delivered More common Pro s and Con s of both approaches? 17

Prototyping Advantages The resulting system is easier to use User needs are better accommodated The resulting system has fewer features Problems are detected earlier The design is of higher quality The resulting system is easier to maintain The development incurs less effort Prototyping Disadvantages The resulting system has more features The performance of the resulting system is worse The design is of less quality The resulting system is harder to maintain The prototyping approach requires more experienced team members 18

Prototyping Recommendations Use prototyping when the requirements are unclear or ambiguous. Good way to clarify the requirements. Particularly useful for systems with emphasis on the user interface. The users and the designers must be well aware of the approach and its pitfalls. Users must realize the prototype is not production-quality. Prototyping needs to be planned and controlled to avoid limitless iterations. Incremental Development A software system is delivered in small increments E.g. a few features at a time Avoids the big bang effect The waterfall model is employed in each phase The user is closely involved in directing the next steps additional functionality is added if and when it is really needed; this prevents over-functionality 19