1
play

1 Mars Climate Orbiter The 125 million dollar Mars Climate Orbiter - PDF document

(1) 1. Introduction & Course Overview How software is built & software defects Dataflow analysis fundamentals 2. Testing


  1. Σύνοψη Μαθήματος (1) 1. Introduction & Course Overview • How software is built & software defects • Dataflow analysis fundamentals Ερευνητικά Θέματα Ανάπτυξης Λογισμικού 2. Testing • Testing practice • Coverage • Automatic test generation Korat, JUnit 3. Debugging • Debuggers • Debugging without debuggers Delta debugging • Simplifying failure inducing input 4. Runtime Monitoring • Detecting data races Eraser • Virtual machine simulation • Fault isolation Valgrind Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 1 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 2 Σύνοψη Μαθήματος (2) Σύνοψη Μαθήματος (3) 5. Static Analysis 9. Extended Static Checking – Basic principles ESC/Java, Houdini, ESC/Java2, ESC/Haskell – Dataflow analysis 10. Model Checking 6. Static Bug Detection I Slam, BLAST – Heuristics-based methods 11. Memory Management & Safety – Annotations & dataflow analysis Lint, LClint – Regions: an alternative to garbage collection 7. Static Bug Detection II – Cyclone – Bug Patterns FindBugs 12. Fixing C – Scalable analyses Prefast, Prefix – CCured 8. Static Bug Detection III 13. Fixing Java – Metacompilation Metal – FindBugs – Statistical ranking – Type-based race detection for Java – Dynamic atomicity checker Atomizer 3 4 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 French Guyana, June 4, 1996 Mars, July 4, 1997 $800 million software failure Lost contact due to real-time priority inversion bug Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 5 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 6 1

  2. Mars Climate Orbiter – The 125 million dollar Mars Climate Orbiter is assumed lost by officials at NASA. The failure responsible for loss of the orbiter is attributed to a failure of NASA’s system engineer process. The process did not specify the system of measurement to be used on the project. As a result, one of the development teams used Imperial measurement while the other used the metric system of measurement. When parameters from one module were passed to another during orbit navigation correct, no conversion was performed, resulting in the loss of the craft. $4 billion development effort > 50% system integration & validation cost Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 7 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 8 400 horses 100 microprocessors 9 10 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 More Blue Screen The Blue Screen Embarrassments Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 11 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 12 2

  3. Economic Impact • NIST study – On CNN.com - April 27, 2003 http://www.nist.gov/director/prog-ofc/report02-3.pdf Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 13 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 14 Course Overview Analysis vs. Validation • Analysis Program Analysis Model Checking optimizing – figure out what properties a program satisfies finite-state compilers hardware • Validation – does a program satisfy a particular property or Software “specification” Validation Testing Theorem Proving unit, integration, expensive proofs purify , etc of small programs (automation) Type Systems small theorems about big programs. values (behaviors) 15 16 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Software Validation Software Validation Specification Specification Program Program Validation Tool Validation Tool Proof Proof Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 17 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 18 3

  4. Waterfall Model Software Validation Program Specification Requirements Can have formal artifacts definition and validation at multiple stages during development System and software design Validation Tool Implementation and unit testing Integration and Proof system testing Operation and maintenance Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 19 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 20 Specifications For Sequential Programs • Safety • Safety – something “bad” will never happen – the program will never produce a wrong result – finds most bugs • “partial correctness” • Liveness • Liveness – something “good” will eventually happen – the program will produce a result – (we don’t know when) • “termination” 21 22 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Example Specifications Example Specifications Basic specifications • Data invariants – no null dereference – shape properties (L is an acyclic list) – no bounds errors • Security – no segmentation faults – integrity, confidentiality Resource management – no memory leaks • API Usage rules Concurrency – files – no race conditions – UNIX sockets – no deadlock Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 23 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 24 4

  5. Software Validation Undecidability • Does a program P satisfy a specification S ? Program Specification – everything interesting about infinite-state programs is undecidable • consequence of halting problem – no sound, complete, terminating algorithm Validation Tool Proof Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 25 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 26 Avoiding Undecidability • Finite state systems – model checking – automatic Program Analysis Fundamentals – effective for small systems • Miss errors (unsound) – testing, bounded model checking – test coverage problem • False alarms (incomplete) – program analysis, type systems – only consider certain proofs 27 28 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Uses of Program Analysis Culture • Historically: Optimizing compilers • Emphasis on low-complexity techniques – Because of emphasis on usage in tools – High-complexity techniques also studied, but • More recently: Finding bugs often don’t survive • Emphasis on complete automation • Driven by language features – Particular languages and features give rise to their own sub-disciplines Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 29 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 30 5

  6. Control-Flow Graphs x := a + b; y := a * b; x := a + b while y > a + b { a := a + 1; Introduction to Dataflow Analysis y := a * b x := a + b } if y > a + b a := a + 1 x := a + b Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 31 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 32 Notation Available Expressions s is a statement • For each program point p, finds which expressions succ(s) = { successor statements of s } x := a + b must have already been pred(s) = { predecessor statements of s } computed, and not later modified, on all paths to p. write(s) = { variables written by s } y := a * b read(s) = { variables read by s } a+b is if y > a + b available here • Optimization: Where Note: In literature write = kill and read = gen available, expressions a := a + 1 need not be recomputed. x := a + b 33 34 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 Dataflow Equations Example if pred s ( ) ⎧ ∅ = ∅ x := a + b ⎪ a+b A ( ) s = ⎨ A ( s ′ ) otherwise I in y := a * b out ⎪ ⎩ s pred s ( ) a+b, a*b ′∈ a+b if y > a + b a+b, a*b, y > a+b a+b, y > a+b { } A ( ) s ( A ( ) s a S write s | ( ) V a ( ) ) = − ∈ ∩ ≠ ∅ out in a := a + 1 { } s |if write s ( ) read s ( ) ∪ ∩ = ∅ x := a + b a+b Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 35 Ερευνητικά Θέματα Ανάπτυξης Λογισμικού - Μάθημα 01 36 6

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend