©Ian Sommerville 2000Software Engineering. Chapter 22Slide 1 Chapter 22 Verification and Validation.

Slides:



Advertisements
Similar presentations
Software Engineering COMP 201
Advertisements

Software Testing and Analysis. Ultimate goal for software testing Quality Assurance.
Verification and Validation
Verification and Validation
Software Engineering-II Sir zubair sajid. What’s the difference? Verification – Are you building the product right? – Software must conform to its specification.
Software Engineering COMP 201
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
1 / 28 CS 425/625 Software Engineering Verification and Validation Based on Chapter 19 of the textbook [SE-6] Ian Sommerville, Software Engineering, 6.
Verification and Validation
1 Software Testing and Quality Assurance Lecture 1 Software Verification & Validation.
Session VII: Verification and Validation / Testing
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Verification and Validation CIS 376 Bruce R. Maxim UM-Dearborn.
Verification and Validation
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 22Slide 1 Verification and Validation u Assuring that a software system meets a user's.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
Adaptive Processes © Adaptive Processes Simpler, Faster, Better Verification and Validation Assuring that a software system meets a user's needs.
Dr. Tom WayCSC Code Reviews & Inspections CSC 4700 Software Engineering.
Verification and Validation Chapter 22 of Ian Sommerville’s Software Engineering.
Verification and Validation Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation Slightly adapted by Anders Børjesson.
Software testing techniques 2.Verification and validation From I. Sommerville textbook Kaunas University of Technology.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
Software Testing Testing types Testing strategy Testing principles.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
CS.436 Software Engineering By Ajarn..Sutapart Sappajak,METC,MSIT Chapter 13 Verification and validation Slide 1 1 Chapter 13 Verification and Validation.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
SoftwareVerification and Validation
This chapter is extracted from Sommerville’s slides. Textbook chapter
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Chapter 19 Verification and Validation.
Verification and Validation
Ch 22 Verification and Validation
Anton Krbaťa Ján Budáč  Verification: "Are we building the product right ?„  Validation: "Are we building the right product ?"
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Bzupages.com Verification and Validation.
CHAPTER 9: VERIFICATION AND VALIDATION 1. Objectives  To introduce software verification and validation and to discuss the distinction between them 
Verification and Validation Assuring that a software system meets a user's needs.
Chapter 12: Software Inspection Omar Meqdadi SE 3860 Lecture 12 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
Software Engineering, 8th edition Chapter 22 1 Courtesy: ©Ian Somerville 2006 April 27 th, 2009 Lecture # 19 Verification and Validation.
Verification and Validation Assuring that a software system meets a user's needs.
Formal Methods in SE Software Verification Using Formal Methods By: Qaisar Javaid, Assistant Professor Formal Methods1.
©Ian Sommerville Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck Coming up: Objectives.
The Software Development Life Cycle: An Overview Presented by Maxwell Drew and Dan Kaiser Southwest State University Computer Science Program.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation with edits by Dan Fleck.
This chapter is extracted from Sommerville’s slides. Textbook chapter 22 1 Chapter 8 Validation and Verification 1.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Software inspections l Involve people examining the source representation with.
References & User group Reference: Software Testing and Analysis Mauro Pezze Software Engineering Ian Sommerville Eight Edition (2007) User group:
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Pradeep Konduri Niranjan Rao Julapelly.  Introduction and Overview  Verification Vs Validation  Process  Goals  Confidence  Role of V&V in different.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 22 Slide 1 Verification and Validation.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini XVII. Verification and Validation.
Verification and Validation. Topics covered l Verification and validation planning l Program Testing l Software inspections.
Verification and Validation
Verification and Validation
CSC 480 Software Engineering
Verification and Validation
Verification & Validation
Verification and Validation
Verification and Validation
Verification and Validation
Verification and Validation Unit Testing
Verification & Validation
Verification and Validation
Chapter 7 Software Testing.
Presentation transcript:

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 1 Chapter 22 Verification and Validation

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 2 Objectives l To introduce software verification and validation and to discuss the distinction between them. l To describe the program inspection / review process and its role in V&V. l To describe the role of formal methods in V&V. l To describe the Cleanroom software development process.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 3 Topics covered l V & V l Software inspections / reviews l Verification and formal methods l Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 4 Topics / sections we will skip l 22.1 Planning verification and validation l 22.3 Automated static analysis

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 5 l Verification:  “Are we building the product right?”  The software should conform to its specification. l Validation:  “Are we building the right product?”  The software should do what the user really needs / wants. Verification vs. validation

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 6 l Software inspections / reviews: analyze static system representations such as requirements, design, source code, etc. (static V&V) a.k.a. human-based testing l Software testing: executing an implemen- tation of the software to examine outputs and operational behavior (dynamic V&V) a.k.a. machine-based testing Static and dynamic V&V

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 7 Static and dynamic V&V

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 8 l Defect testing: Tests designed to discover system defects. Sometimes referred to as coverage testing. l Statistical testing: Tests designed to assess system reliability and performance under operational conditions. Makes use of an operational profile. Program testing

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 9 V&V goals l Verification and validation should establish confidence that the software is “fit for purpose”. l This does NOT usually mean that the software must be completely free of defects. l The level of confidence required depends on at least three factors…

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 10 Factors affecting level of confidence required 1.Software function / purpose: Safety- critical systems, for example, require a much higher level of confidence than demonstration- of-concept prototypes. 2.User expectations: Users may tolerate shortcomings when the benefits of use are high. 3.Marketing environment: Getting a product to market early may be more important than finding additional defects.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 11 l V&V and debugging are distinct processes.  V&V is concerned with establishing the existence of defects in a program.  Debugging is concerned with locating and repairing these defects. l Defect locating is analogous to detective work and medical diagnosis. V&V versus debugging

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 12 Topics covered l V & V l Software inspections / reviews l Verification and formal methods l Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 13 Software inspections / reviews l Involve people examining a system representation (requirements, design, source code, etc.) with the aim of discovering anomalies and defects. l Do not require execution so may be used before system implementation. l Can be more effective than testing after system implementation. (As demonstrated in many studies.)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 14 Why code inspections can be so effective l Many different defects may be discovered in a single inspection. (In testing, one defect may mask others so several executions may be required.) l They reuse domain and programming language knowledge. (Reviewers are likely to have seen the types of error that commonly occur.)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 15 Inspections and testing are complementary l Inspections can be used early with non- executable entities and with source code at the module and component levels. l Testing can validate dynamic behaviour and is the only effective technique at the sub-system and system (code) levels. l Inspections cannot directly check non- functional requirements such as perfor- mance, usability, etc.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 16 Program inspections / reviews l Formalised approach to document walk- throughs or desk-checking. l Intended exclusively for defect DETEC- TION (not correction). l Defects may be logical errors, anomalies in the code that might indicate an erroneous condition, or non-compliance with standards.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 17 Inspection pre-conditions (“entry criteria”) l A precise specification must be available. l Team members must be familiar with the organization standards. l Syntactically correct code must be available (for code inspections). (Cont’d)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 18 Inspection pre-conditions (cont.) l An error checklist should be prepared. l Management must accept the fact that inspection will increase costs early in the software process. (payoff comes later) l Management must not use inspections results for staff (i.e., element owner) appraisals. (“Don’t kill the goose that lays the golden eggs.”)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 19 The inspection process

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 20 Inspection procedure l System overview presented to inspection team. l Code and associated documents are distributed to inspection team in advance for individual preparation. l Inspection (“logging”) meeting takes place and discovered errors are noted. l Modifications are made to repair discovered errors (by owner). l Re-inspection may or may not be required.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 21 Inspection teams l Typically made up of 4-7 members. l Author (owner) of the element being inspected. l Inspectors who find errors, omissions and inconsistencies. l Reader who steps through the element being reviewed with the team. (NOT the author…) l Moderator who chairs the meeting and (in the absence of a scribe) notes discovered errors. l Other roles are Scribe and Chief moderator.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 22 Code inspection checklists l Checklist of common errors should be used to drive individual preparation. l Error checklist for source code is programming language dependent. l The “weaker” the type checking (by the compiler), the larger the checklist. l Examples: checks of initialization, constant naming, loop termination, array bounds, etc.

Inspection checks

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 24 Approximate inspection rate l 500 statements/hour during overview. l 125 source statement/hour during individual preparation. l statements/hour during inspection meeting l Inspecting 500 lines costs about 40 person/hours (assuming 4 participants). l Inspection is therefore an expensive process.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 25 Topics covered l V & V l Software inspections / reviews l Verification and formal methods l Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 26 l The development of critical systems is one of the “success stories” for formal methods. l Formal methods are mandated in Britain for the development of some types of safety- critical defence applications. Verification and formal methods

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 27 Formal methods may be used at two levels 1.Specification analysis and validation: d eveloping a formal model of a system requirements specification  Forces a rigorous analysis of the specification  Facilitates discovery of specification problems

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 28 Formal methods may be used at two levels 2.Formal verification: mathematical arguments (at varying degrees of rigour) are used to demonstrate that a program or a design is consistent with its formal specification.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 29 Problems with formal V&V l Many developers are not convinced that formal methods are cost effective, and even feel they may reduce dependability.  The argument is that formal specification models cannot be understood by most domain experts.  Thus, problems with requirements may be concealed by formality.  A mathematically consistent but wrong specification is not very useful! (Cont’d)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 30 Problems with formal V&V (cont’d) l Others point out that verification does not scale-up. They claim:  Verification is complex, error-prone, and requires the use of systems such as theorem provers.  The cost of verification increases dispro- portionately as system size increases.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 31 Sommerville’s conclusions l There is no doubt that a formal system speci- fication is less likely to contain anomalies that must be resolved by the system designer. l But formal specification and proof cannot guarantee reliability because:  The specification may not reflect the real requirements;  The proof may contain errors; and  An incorrect usage pattern may be assumed. (Cont’d)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 32 Sommerville’s conclusions (cont’d) l Formality does not provide guarantees, but it helps to increase confidence in a system by demonstrating that some classes of error are not present. l Formal verification is only likely to be used for small, critical system components. (About 5-6K lines of code seems to be the upper limit for practical verification.)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 33 Topics covered l V & V l Software inspections / reviews l Verification and formal methods l Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 34 l The name is derived from the “Cleanroom” process in semiconductor fabrication. l The philosophy is: defect avoidance rather than defect removal. Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 35 A software development process based on:  Incremental delivery (if appropriate)  Formal specification  Static verification using correctness arguments  Statistical testing to certify program reliability  NO defect testing! Cleanroom software development

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 36 The Cleanroom process Next increment / END done not done

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 37 l Specification team: responsible for developing and maintaining the system specification l Development team: responsible for developing and verifying the software. The software is NOT executed or even compiled during this process. l Certification team: responsible for developing a set of statistical tests to measure reliability after development. Cleanroom process teams

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 38 l Results at IBM and elsewhere have been very impressive with very few discovered faults in delivered systems. l Independent assessment shows that the process is no more expensive than other approaches. l Not clear how this approach can be transferred to an environment with less skilled engineers. Cleanroom process evaluation

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 39 Key points l Verification and validation are not the same. Verification concerns conformance with a specification; validation concerns conformance with customer’s needs / desires. l Static verification techniques involve examination and analysis of software elements for error detection. (Cont’d)

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 40 Key points (cont’d) l Program inspections are very effective in discovering errors. l The Cleanroom development process depends on formal specification, static verification, and statistical testing.

©Ian Sommerville 2000Software Engineering. Chapter 22Slide 41 Chapter 22 Verification and Validation