INVARIANTS EEN 417 Fall 2013. When is a Design of a System “Correct”? A design is correct when it meets its specification (requirements) in its operating.

Slides:



Advertisements
Similar presentations
Testing and Inspecting to Ensure High Quality
Advertisements

Chapter 16: Recovery System
50.530: Software Engineering
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development 2.
1. Software in our lives, then and now  Medical (processing and analysis, Computer Aided Surgery, other various equipment)  Financial and business (banking,
CSC 4250 Computer Architectures September 12, 2006 Appendix H. Computer Arithmetic.
Ethics in a Computing Culture
23/05/2015Dr Andy Brooks1 FOR0383 Software Quality Assurance Lecture 2 ESA Ariane 5 Rocket Flight 501.
1 Basic Definitions: Testing What is software testing? Running a program In order to find faults a.k.a. defects a.k.a. errors a.k.a. flaws a.k.a. faults.
CSE 1301 Lecture 6B More Repetition Figures from Lewis, “C# Software Solutions”, Addison Wesley Briana B. Morrison.
Software Development Methodology for Robotic and Embedded Systems (from drawing to coding) Presented by Iwan Setiawan for Robot and Technology Fair ( )-
©Ian Sommerville 2000CS 365 Ariane 5 launcher failureSlide 1 The Ariane 5 Launcher Failure June 4th 1996 Total failure of the Ariane 5 launcher on its.
Bellevue University CIS 205: Introduction to Programming Using C++ Lecture 3: Primitive Data Types.
Software Engineering: Where are we? And where do we go from here? V Software Engineering Lecture 23 Clark Barrett New York University 4/17/2006.
ARIANE 5 FAILURE ► BACKGROUND:- ► European space agency’s re-useable launch vehicle. ► Ariane-4 was a major success ► Ariane -5 was developed for the larger.
Moving To Code 3 More on the Problem-Solving Process §The final step in the problem-solving process is to evaluate and modify (if necessary) the program.
Formal verification Marco A. Peña Universitat Politècnica de Catalunya.
©Ian Sommerville 2004Software Engineering Case Studies Slide 1 The Ariane 5 Launcher Failure June 4th 1996 Total failure of the Ariane 5 launcher on its.
Data Types. Every program must deal with data The data is usually described as a certain type This type determines what you can do with the data and how.
CPSC 372 John D. McGregor Module 0 Session 1 Introduction.
Software design and development Marcus Hunt. Application and limits of procedural programming Procedural programming is a powerful language, typically.
Scientific Computing Algorithm Convergence and Root Finding Methods.
Chapter Introduction to Computers and Programming 1.
USS Yorktown (1998) A crew member of the guided-missile cruiser USS Yorktown mistakenly entered a zero for a data value, which resulted in a division by.
The Ariane 5 Launcher Failure
CRASH AND BURN ARIANE 5 Kristen Hieronymus SYSM6309 Advanced Requirements Engineering
CRASH AND BURN ARIANE 5 Kristen Hieronymus SYSM6309 Advanced Requirements Engineering
CPSC 871 John D. McGregor Module 0 Session 1 Introduction.
Lecture 16: Electrical Engineering II EEN 112: Introduction to Electrical and Computer Engineering Professor Eric Rozier, 4/10/13.
Introduction to Software Quality Assurance
Verification and Validation Overview References: Shach, Object Oriented and Classical Software Engineering Pressman, Software Engineering: a Practitioner’s.
Lecture 13: Broader Engineering Perspectives EEN 112: Introduction to Electrical and Computer Engineering Professor Eric Rozier, 4/8/13.
The Ariane 5 Launcher Failure June 4th 1996 Total failure of the Ariane 5 launcher on its maiden flight.
2.2 Software Myths 2.2 Software Myths Myth 1. The cost of computers is lower than that of analog or electromechanical devices. –Hardware is cheap compared.
B. Todd AB/CO/MI 30 th January 2008 Safety in Mind…
Programming Lifecycle
Digitaalsüsteemide verifitseerimise kursus1 Digitaalsüsteemide verifitseerimine IAF0620, 5.0 AP, E Jaan Raik IT-208,
Lecture 7: Multiplication and Floating Point EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering.
MATSEC Past Papers May 2010 Paper 1 Paper 2A. What is the difference between each of the following pairs of items? Syntax Error Caused by forgetting certain.
Testing -- Part II. Testing The role of testing is to: w Locate errors that can then be fixed to produce a more reliable product w Design tests that systematically.
Software Errors. There’s a bug in our code [Probably] The first software bug Harvard Mark II – Electromechanical machine Moth found in relay Found by.
Lecture 12: Integer Arithmetic and Floating Point CS 2011 Fall 2014, Dr. Rozier.
Lecture 08 – Documentation, debugging.  docstring  A special kind of string (text) used to provide documentation  Appears at the top of a module 
CPS120: Introduction to Computer Science Operations Lecture 9.
Introduction to Mathematical techniques Formal Methods Limits of Formal Methods.
(1) A beginners guide to testing Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Software Defects.
More on Correctness. Prime Factorization Problem: Write a program that computes all the prime factors of a given number Solution (Idea): Factors are less.
SEN 460 Software Quality Assurance. Bahria University Karachi Campus Waseem Akhtar Mufti B.E(UIT), M.S(S.E) AAU Denmark Assistant Professor Department.
1 Software Quality Assurance COMP 4004 Notes Adapted from S. Som é, A. Williams.
1 IAF0620, 5.0 AP, Exam Jaan Raik ICT-524, , Digital systems verification.
Chapter 1 The Requirements Problem
Introduction to Software Analysis CS Why Take This Course? Learn methods to improve software quality – reliability, security, performance, etc.
Brief Version of Starting Out with C++ Chapter 1 Introduction to Computers and Programming.
Announcements Assignment 2 Out Today Quiz today - so I need to shut up at 4:25 1.
Design by Contract. The Goal Ensure the correctness of our software (correctness) Recover when it is not correct anyway (robustness) Correctness: Assertions.
1 Chapter 1- Introduction How Bugs affect our lives What is a Bug? What software testers do?
Safety Critical Systems
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
BASIC PROGRAMMING C SCP1103 (02)
BASIC PROGRAMMING C SCP1103 (02)
Samuel Hishmeh EE 585: Fault Tolerant Computing October 12th 2006
ADVANTAGES OF SIMULATION
Fault Tolerant Computing
Ariane 5 Software error Integer overflow.
Introduction to the C Language
The Top 10 bugs
Software Engineering Lecture #12.
Algorithm and Ambiguity
(some of) My Research Engineering is about getting technology to do what it does well so humans can do what they do well Jeff Offutt Professor of Software.
Presentation transcript:

INVARIANTS EEN 417 Fall 2013

When is a Design of a System “Correct”? A design is correct when it meets its specification (requirements) in its operating environment “A design without specification cannot be right or wrong, it can only be surprising!” Simply running a few tests is not enough! Many embedded systems are deployed in safety-critical applications (avionics, automotive, medical, …)

Ariane disaster, 1996 $500 million software failure FDIV error, 1994 $500 million Estimated worst-case worm cost: > $50 billion

Ariane 5 Flight June 1996, the first test flight of the Ariane 5 rocket system Rocket self-destructed 37 seconds after launch.

Ariane 5 Flight 501 What caused the disaster? A data conversion from 64-bit floating point to 16-bit signed integer

Ariane 5 Flight 501 Max value for 16-bit signed integer – 32,768 Max value for a 64-bit floating point? – 1.79*10^308

Ariane 5 Flight 501 Software had been written and tested for the Ariane 4, where the variables had been protected by a handler. Code was include in Ariane 5 for reuse, despite the fact that the software was not required for the Ariane 5.

Pentium FDIV Bug Intel’s Pentium 5 – Professor Thomas Nicely noticed inconsistencies in calculations when adding Pentiums to his cluster – Floating-point division operations didn’t quite come out right. Off by 61 parts per million

Pentium FDIV Bug Intel acknowledged the flaw, but claimed it wasn’t serious. Wouldn’t affect most users. Byte magazine estimated only 1 in 9 billion floating point operations would suffer the error.

Pentium FDIV Bug Total cost to Intel? $450 million

Korean Air Flight 801 Air Traffic Control Minimum Safe Altitude Warning system – lets pilots know when they are too close to the ground. System in Guam had been giving off spurious alarms, and prevented the airport’s other systems from detecting aircrafts approaching below minimum safe altitude Engineers modified the system to limit alarms.

200 Deaths

High Frequency Trading Algorithmic trading, seeks to exploit small differences in prices, millions of programs running How do they interact? How does something written by Company A affect something written by Company B?

High Frequency Trading 2010 Flash Crash – largest intraday point loss – Losses recovered in minutes, but scared regulatory bodies US SEC and CFTC consluded that HFT contributed to the volatility.

High Frequency Trading SEC and FTC stated – “market makers and other liquidity providers widened their quote spreads, reduced liquidity, and withdrew from the market” Some signal set off their algorithms, caused a joint movement which helped cause the crash

HOW DO WE PREVENT THESE PROBLEMS?

Specification, Verification, and Control Specification A mathematical statement of the design objective (desired properties of the system) Verification Does the designed system achieve its objective in the operating environment? Controller Synthesis Given an incomplete design, synthesize a strategy to complete the system so that it achieves its objective in the operating environment

Propositional Logic Atomic formulas: Statements about an input, output, or state of a state machine. Examples: These are propositions (true or false statements) about a state machine with input or output x and state s. formulameaning x x is present x = 1 x is present and has value 1 s machine is in state s

Propositional Logic Propositional logic formulas: More elaborate statements about an input, output, or state of a state machine. Examples: Here, p 1 and p 2 are either atomic formulas or propositional logic formulas. formulameaning

Execution Trace of a State Machine

Propositional Logic on Traces

Example: Specification of the SpaceWire Protocol (European Space Agency standard)

The problem with most specifications Specifications tend to be written by non- engineers, and tend to be written in English. Why is this a problem?

WRAP UP

For next time Read Chapter 12 – Invariants and Temporal Logic