Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer (Nadia Polikarpova) Verification tools.

Slides:



Advertisements
Similar presentations
Chapter 17 Failures and exceptions. This chapter discusses n Failure. n The meaning of system failure. n Causes of failure. n Handling failure. n Exception.
Advertisements

Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 5.
Copyright W. Howden1 Programming by Contract CSE 111 6/4/2014.
Building Bug-Free O-O Software: An Introduction to Design By Contract A presentation about Design By Contract and the Eiffel software development tool.
Exceptions CSE301 University of Sunderland Harry Erwin, PhD.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Exercise Session 1: Eiffel Introduction.
Practical Testing Techniques. Verification and Validation Validation –does the software do what was wanted? “Are we building the right system?” –This.
Data Abstraction II SWE 619 Software Construction Last Modified, Spring 2009 Paul Ammann.
1 Semantic Description of Programming languages. 2 Static versus Dynamic Semantics n Static Semantics represents legal forms of programs that cannot be.
Chapter 4: Security Policies Overview The nature of policies What they cover Policy languages The nature of mechanisms Types Secure vs. precise Underlying.
1 Software Testing and Quality Assurance Lecture 21 – Class Testing Basics (Chapter 5, A Practical Guide to Testing Object- Oriented Software)
Cleanroom Engineering and the B-Method: A Comparison Drew Connelly.
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Chair of Software Engineering OOSC - Summer Semester Object-Oriented Software Construction Bertrand Meyer Lecture 10: Project Presentation Ilinca.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 6: Object Creation.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 4: The Interface of a Class.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 9.
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
Karlstad University Computer Science Design Contracts and Error Management Design Contracts and Errors A Software Development Strategy (anpassad för PUMA)
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Chair of Software Engineering Concurrent Object-Oriented Programming Prof. Dr. Bertrand Meyer Lecture 9: Contracts and Inheritance (based on work with.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 10.
Dr. Muhammed Al-Mulhem 1ICS ICS 535 Design and Implementation of Programming Languages Part 1 Fundamentals (Chapter 4) Axiomatic Semantics ICS 535.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Lecture 6: Object Creation.
1 Advanced Material The following slides contain advanced material and are optional.
Chair of Software Engineering Automatic Verification of Computer Programs.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 10.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 9.
Computer Literacy PowerPoint Dustin Llanes Comm. 165.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 3.
Computer Science 340 Software Design & Testing Design By Contract.
Dr. Pedro Mejia Alvarez Software Testing Slide 1 Software Testing: Building Test Cases.
PRAGMATIC PARANOIA Steven Hadfield & Anthony Rice.
Chair of Software Engineering 1 Doing more with contracts Bertrand Meyer, Ilinca Ciupa, Andreas Leitner, Lisa Liu SOFSEM, Harrachov, January 2007 ETH Zurich,
Software Engineering Prof. Dr. Bertrand Meyer March 2007 – June 2007 Chair of Software Engineering Static program checking and verification Slides: Based.
Contract based programming Using pre- and post-conditions, and object invariants Contract based programming1.
Freefinement Stephan van Staden, Cristiano Calcagno, Bertrand Meyer Chair of Software Engineering.
An Introduction to Visual Basic.NET. What is.NET.Net is a new framework for developing windows-based and web-based applications within the Microsoft environment.
Engineering 5895: Software Design 9/11/01Class Diagrams 1.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 9.
1 Cloud-Based Science? Bertrand Meyer Chair of Software Engineering, ETH Zurich Eiffel Software, Santa Barbara Cloud Futures panel.
What is Testing? Testing is the process of finding errors in the system implementation. –The intent of testing is to find problems with the system.
1 Chapter 26 Cleanroom Software Engineering Cleanroom Developed in early 80’s by Harlan Mills Reported very good results –reliable, high-quality.
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
Software Engineering Prof. Dr. Bertrand Meyer Dr. Manuel Oriol Dr. Bernd Schoeller Chair of Software Engineering Lectures 22: Legacy Software.
Welcome to CS 477 Formal Methods in Software Development Spring 2011 Madhusudan Parthasarathy ( Madhu )
Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer Exercise Session 3.
ANU COMP2110 Software Design in 2003 Lecture 10Slide 1 COMP2110 Software Design in 2004 Lecture 12 Documenting Detailed Design How to write down detailed.
Defensive Programming CNS 3370 Copyright 2003, Fresh Sources, Inc.
Object-Oriented Design Concepts University of Sunderland.
DBC NOTES. Design By Contract l A contract carries mutual obligations and benefits. l The client should only call a routine when the routine’s pre-condition.
© Bertrand Meyer and Yishai Feldman Notice Some of the material is taken from Object-Oriented Software Construction, 2nd edition, by Bertrand Meyer (Prentice.
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Topics: jGRASP editor ideosyncrasies assert debugger.
Design by Contract in Python: Present and Future Aaron Bingham
Formal Methods in Software Engineering 1
Einführung in die Programmierung Introduction to Programming Prof. Dr
Aspect Validation: Connecting Aspects and Formal Methods
Programming Languages 2nd edition Tucker and Noonan
Design by contract Object-Oriented Software Construction by Bertrand Meyer, Prentice Hall The presence of a precondition or postcondition in a routine.
Einführung in die Programmierung Introduction to Programming Prof. Dr
Design by contract Object-Oriented Software Construction by Bertrand Meyer, Prentice Hall The presence of a precondition or postcondition in a routine.
Assertions References: internet notes; Bertrand Meyer, Object-Oriented Software Construction; 4/25/2019.
CSE 1020:Software Development
Programming Languages 2nd edition Tucker and Noonan
COP4020 Programming Languages
Formal Methods Lecture 16 March 22, 2011 CS 315 Spring 2011
Presentation transcript:

Chair of Software Engineering Einführung in die Programmierung Introduction to Programming Prof. Dr. Bertrand Meyer (Nadia Polikarpova) Verification tools demo

2 Verification Tools for Eiffel AutoTest: Automated contract-based testing EveProofs: Automated proofs

3 Contract-based testing Test case execution Result validationInput generation PreconditionsPostconditions Contracts

4 Contract-based testing As long as we know what the software is supposed to do, we do not need any human intervention to test it. When testing a certain routine:  We try to satisfy its precondition (so that we can execute it).  We hope it will not fulfill its postcondition. For every test case 3 possible outcomes:  Pass – all ok  Fail – postcondition/invariant violation or other exception  Invalid – precondition violation BUG

5 Inputs generation Random input generation:  Primitive values: random + selection 25% probability: select from 0, ±1, ±2, … 75% probability: randomly choose a value  Objects: constructor calls + other (state-changing) methods 20% probability: create a new instance 80% probability: reuse old objects

6 Random testing strategy Workflow of the random testing strategy Sample test cases Select next routine to test Select objects randomly Invoke routine create {LINKED_LIST [INTEGER ] } v1.make v2 := 1 v3 := 125 v4 := v1.has (v3) v1.wipe_out v5 := v1.count v1.extend (v2) v1 v2 v3 v4 v5 Object pool

7 Testing vs. proofs  Testing helps us find and correct bugs, but cannot guarantee that there are no more bugs  We would like to prove formally that our programs are faultless  Proofs can give us a guarantee, but they  either require human intervention  or will sometimes say “I don’t know”  Note that both testing and proofs require a specification (contracts)  you can ask whether your code is correct with respect to some requirements, not by itself

8 EveProofs  Fully automatic proof tool for Eiffel  Uses Microsoft Boogie program verifier  Workflow:  Translate Eiffel code and contracts into Boogie programming language  Run Boogie tool  Interpret Boogie output in terms of original classes and routines