Deriving formal specifications (almost) automatically Glenn Ammons and Ras Bodik and James R. Larus.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

EECE 310: Software Engineering Modular Decomposition, Abstraction and Specifications.
Acceptance Testing.
Mining Specifications Glenn Ammons, Dept. Computer Science University of Wisconsin Rastislav Bodik, Computer Science Division University of California,
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Technology of Test Case Generation Levi Lúcio University of Geneva Marko Samer Vienna University of Technology.
Testing and Quality Assurance
Xiushan Feng* ASIC Verification Nvidia Corporation Automatic Verification of Dependency 1 TM Jayanta Bhadra
Background for “KISS: Keep It Simple and Sequential” cs264 Ras Bodik spring 2005.
1 Thorough Static Analysis of Device Drivers Byron Cook – Microsoft Research Joint work with: Tom Ball, Vladimir Levin, Jakob Lichtenberg,
David Brumley, Pongsin Poosankam, Dawn Song and Jiang Zheng Presented by Nimrod Partush.
Thomas Ball, Rupak Majumdar, Todd Millstein, Sriram K. Rajamani Presented by Yifan Li November 22nd In PLDI 01: Programming Language.
Using Programmer-Written Compiler Extensions to Catch Security Holes Authors: Ken Ashcraft and Dawson Engler Presented by : Hong Chen CS590F 2/7/2007.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
Automatically Validating Temporal Safety Properties of Interfaces Thomas Ball and Sriram K. Rajamani Software Productivity Tools, Microsoft Research Presented.
Transaction Ordering Verification using Trace Inclusion Refinement Mike Jones 11 January 2000.
Software Reliability Methods Sorin Lerner. Software reliability methods: issues What are the issues?
MULTIVIE W Checking System Rules Using System-Specific, Program-Written Compiler Extensions Paper: Dawson Engler, Benjamin Chelf, Andy Chou, and Seth Hallem.
Software Testing. “Software and Cathedrals are much the same: First we build them, then we pray!!!” -Sam Redwine, Jr.
Applied Software Project Management Andrew Stellman & Jennifer Greene Applied Software Project Management Applied Software.
Principle of Functional Verification Chapter 1~3 Presenter : Fu-Ching Yang.
Source Code Management Or Configuration Management: How I learned to Stop Worrying and Hate My Co-workers Less.
Methods for checking simulation correctness How do you know if your testcase passed or failed?
Terms: Test (Case) vs. Test Suite
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
Introduction to Software Testing Chapter 9.4 Model-Based Grammars Paul Ammann & Jeff Offutt
Towards Scalable Modular Checking of User-defined Properties Thomas Ball, MSR Brian Hackett, Mozilla Shuvendu Lahiri, MSR Shaz Qadeer, MSR Julien Vanegue,
Designing For Testability. Incorporate design features that facilitate testing Include features to: –Support test automation at all levels (unit, integration,
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
A Simple Method for Extracting Models from Protocol Code David Lie, Andy Chou, Dawson Engler and David Dill Computer Systems Laboratory Stanford University.
Testing : A Roadmap Mary Jean Harrold Georgia Institute of Technology Presented by : Navpreet Bawa.
Computer Programming I An Introduction to the art and science of programming with C++
Model Based Conformance Testing for Extensible Internet Protocols Anastasia Tugaenko Scientific Adviser: Nikolay Pakulin, PhD.
What is software testing? 1 What are the problems of software testing? 2 Time is limited Applications are complex Requirements are fluid.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Inferring Specifications to Detect Errors in Code Mana Taghdiri Presented by: Robert Seater MIT Computer Science & AI Lab.
Testing. 2 Overview Testing and debugging are important activities in software development. Techniques and tools are introduced. Material borrowed here.
Strauss: A Specification Miner Glenn Ammons Department of Computer Sciences University of Wisconsin-Madison.
Software Testing and Maintenance 1 Code Review  Introduction  How to Conduct Code Review  Practical Tips  Tool Support  Summary.
Glenn Ammons Ras Bodík Jim Larus Univ. of Wisconsin Univ. of Wisconsin Microsoft Research Mining Specifications (lots of) code  specifications.
1 Introduction to Software Testing. Reading Assignment P. Ammann and J. Offutt “Introduction to Software Testing” ◦ Chapter 1 2.
1 Chapter 26 Cleanroom Software Engineering Cleanroom Developed in early 80’s by Harlan Mills Reported very good results –reliable, high-quality.
Software Engineering Emphasis for Engineering Computing Courses William Hankley Computing & Information Sciences Kansas State University.
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
Lecture 9-1 : Intro. to UML (Unified Modeling Language)
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Presentation Title Test-driven development (TDD) Overview David Wu.
September 1999Compaq Computer CorporationSlide 1 of 16 Verification of cache-coherence protocols with TLA+ Homayoon Akhiani, Damien Doligez, Paul Harter,
Testing Overview Software Reliability Techniques Testing Concepts CEN 4010 Class 24 – 11/17.
Writing, Verifying and Exploiting Formal Specifications for Hardware Designs Chapter 3: Verifying a Specification Presenter: Scott Crosby.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Copyright 1999 G.v. Bochmann ELG 7186C ch.1 1 Course Notes ELG 7186C Formal Methods for the Development of Real-Time System Applications Gregor v. Bochmann.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Levels of Verification Figure 2.2 p 37 Verification is applied at all different abstraction levels Mostly bottom up, some top down.
Rekayasa Perangkat Lunak Part-13
UT-Assert Library Presented by Charles Zogby, NASA-GSFC
runtime verification Brief Overview Grigore Rosu
CodePeer Update Arnaud Charlet CodePeer Update Arnaud Charlet
Design and Programming
CodePeer Update Arnaud Charlet CodePeer Update Arnaud Charlet
Software Engineering Lecture #12.
CS240: Advanced Programming Concepts
CSE 303 Concepts and Tools for Software Development
Department of Computer Science Abdul Wali Khan University Mardan
Applying Use Cases (Chapters 25,26)
Hongyu Zhang, Jeremy S. Bradbury, James R. Cordy, Juergen Dingel
Overview Activities from additional UP disciplines are needed to bring a system into being Implementation Testing Deployment Configuration and change management.
Chapter 10: Testing and Quality Assurance
Presentation transcript:

Deriving formal specifications (almost) automatically Glenn Ammons and Ras Bodik and James R. Larus

Three pillars of formal verification Model checkers and other verifiers –well automated (SLAM, Spin, type checkers, Vault) Program abstractors –getting there (SLAM, Engler’s metacompiler) Formal specifications –Written by hand –Our goal: bring automation to writing formal specifications

Deriving specs is feasible Well-debugged software exists –Good code obeys the rules, but doesn’t state them clearly Common behavior is good behavior –Because testing exposes common behavior Programmers exist –But they don’t want to write specs!

Rules describe good behavior A rule is a nondeterministic finite automaton: S T = XNextEventXSetSelectionOwner(T) XGetSelectionOwner F

Rules are derived from traces, with user guidance XtAppNextEvent() = event(type = 5, window = 22, time = 3:15) XtDispatchEvent(type = 5, window = 22, time = 3:15) XtFree(NULL) XtMalloc(size = 8) = 0x10 XmuInternStrings(names = 0x20, count = 2, atoms_return = 0x10) XtOwnSelection(widget = 0x30, selection = 1, time = 3:15) And so on: the more traces the better

Overview Traces Bugs ! Programs or traces (buggy?) Rule learner Matcher Program abstractor Seeds Abstraction prescription Rules Abstract programs or traces

Case study: selections in X11 The rule: SetSelectionOwner must be passed a timestamp from an Xevent 25 programs from the X11 distribution and the contrib directories (all used selections) Verification done over traces (not statically) Found two bugs in 29 static uses Found three benign violations

To do Static checking: typestates Better simplifier Better user interaction What else can we learn? –Protocols like socket/bind/accept/close –Operations on data structures

Power What else can we do with this stuff? Compare with Ernst

Detailed figure?

Running example

Testing vs. verification Examines the complete programs Examines some inputs For better coverage, write more test cases Examines only some aspects of programs Examines all inputs For better coverage, write more specs The practice sees writing test cases as easier than writing formal models and specifications, so testing dominates.