Quentin Ochem AdaCore.  Complex software are filled with bugs  OS (windows, linux, macosx…)  Webservers  Office suites  Video games  …  And in.

Slides:



Advertisements
Similar presentations
Abstraction and Modular Reasoning for the Verification of Software Corina Pasareanu NASA Ames Research Center.
Advertisements

SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Annoucements  Next labs 9 and 10 are paired for everyone. So don’t miss the lab.  There is a review session for the quiz on Monday, November 4, at 8:00.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 20 Slide 1 Critical systems development.
CMSC 345, Version 11/07 SD Vick from S. Mitchell Software Testing.
Building Reliable Software Requirements and Methods.
Reasons to study concepts of PL
OOP #10: Correctness Fritz Henglein. Wrap-up: Types A type is a collection of objects with common behavior (operations and properties). (Abstract) types.
1 CMSC 132: Object-Oriented Programming II Nelson Padua-Perez William Pugh Department of Computer Science University of Maryland, College Park.
1 Security Architecture and Analysis Software Inspections and Verification Software Testing and Certification.
Describing Syntax and Semantics
CS4723 Software Validation and Quality Assurance Lecture 02 Overview of Software Testing.
Scalable and Flexible Static Analysis of Flight-Critical Software Guillaume P. Brat Arnaud J. Venet Carnegie.
Data Structures and Programming.  John Edgar2.
Industrial practice on mixed-criticality engineering and certification in the aerospace industry DATE 2013 / WICERT 2013.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
A Pragmatic View of Formal Methods The Hi-Lite Project Robert B K Dewar SSS ‘11 President & CEO, AdaCore Emeritus Professor of Computer.
Language Evaluation Criteria
System/Software Testing
Testing. Definition From the dictionary- the means by which the presence, quality, or genuineness of anything is determined; a means of trial. For software.
Assurance techniques for code generators Ewen Denney USRA/RIACS, NASA Ames Bernd Fischer ECS, U Southampton.
© 2012 IBM Corporation Rational Insight | Back to Basis Series Chao Zhang Unit Testing.
CS 501: Software Engineering Fall 1999 Lecture 16 Verification and Validation.
CMSC 345 Fall 2000 Unit Testing. The testing process.
CS4311 Spring 2011 Unit Testing Dr. Guoqiang Hu Department of Computer Science UTEP.
1 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Types for Programs and Proofs Lecture 1. What are types? int, float, char, …, arrays types of procedures, functions, references, records, objects,...
Testing : A Roadmap Mary Jean Harrold Georgia Institute of Technology Presented by : Navpreet Bawa.
CSC3315 (Spring 2009)1 CSC 3315 Programming Languages Hamid Harroud School of Science and Engineering, Akhawayn University
Names Variables Type Checking Strong Typing Type Compatibility 1.
Computer Security and Penetration Testing
1 New Development Techniques: New Challenges for Verification and Validation Mats Heimdahl Critical Systems Research Group Department of Computer Science.
CSE403 Software Engineering Autumn 2001 More Testing Gary Kimura Lecture #10 October 22, 2001.
Unit Testing 101 Black Box v. White Box. Definition of V&V Verification - is the product correct Validation - is it the correct product.
16 October Reminder Types of Testing: Purpose  Functional testing  Usability testing  Conformance testing  Performance testing  Acceptance.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
Lecture by: Prof. Pooja Vaishnav.  Language Processor implementations are highly influenced by the kind of storage structure used for program variables.
Scientific Debugging. Errors in Software Errors are unexpected behaviors or outputs in programs As long as software is developed by humans, it will contain.
Bindings. Typical stages of program execution First, the program is compiled Then everything is loaded into memory Then it is linked to any library routines.
SOFTWARE TESTING. Introduction Software Testing is the process of executing a program or system with the intent of finding errors. It involves any activity.
Winter 2006CISC121 - Prof. McLeod1 Stuff No stuff today!
Formal Methods in Software Engineering1 Today’s Agenda  Mailing list  Syllabus  Introduction.
Dynamic Testing.
Winter 2007SEG2101 Chapter 121 Chapter 12 Verification and Validation.
1 Phase Testing. Janice Regan, For each group of units Overview of Implementation phase Create Class Skeletons Define Implementation Plan (+ determine.
Software Systems Division (TEC-SW) ASSERT process & toolchain Maxime Perrotin, ESA.
Chapter 10 Chapter 10 Implementing Subprograms. Implementing Subprograms  The subprogram call and return operations are together called subprogram linkage.
Where Testing Fails …. Problem Areas Stack Overflow Race Conditions Deadlock Timing Reentrancy.
Chapter 1: Preliminaries Lecture # 2. Chapter 1: Preliminaries Reasons for Studying Concepts of Programming Languages Programming Domains Language Evaluation.
TTCN-3 Testing and Test Control Notation Version 3.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
SOFTWARE TESTING Date: 29-Dec-2016 By: Ram Karthick.
Data Types In Text: Chapter 6.
Software Development and Safety Critical Decisions
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Types for Programs and Proofs
CS1101X Programming Methodology
CS5123 Software Validation and Quality Assurance
Introduction Edited by Enas Naffar using the following textbooks: - A concise introduction to Software Engineering - Software Engineering for students-
Introduction to Software Testing
Design and Programming
QGen and TQL-1 Qualification
AdaCore Technologies for Cyber Security
AdaCore C/C++ Offering
Yes, we do those languages too.
QGen and TQL Qualification
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
CSE 1020:Software Development
Yes, we do those languages too.
Presentation transcript:

Quentin Ochem AdaCore

 Complex software are filled with bugs  OS (windows, linux, macosx…)  Webservers  Office suites  Video games  …  And in most cases, bugs are OK  Reboot the system  Get an updated version  Workaround  Live with it

 In certain cases, bugs are not OK  They may kill people (aircraft, train, missile, medical devices…)  They may lose money (bank…)  They may fail to achieve a critical mission (secure a top secret facility…)  When bugs are detected, it’s often too late  People die  Money is lost  Security is breached

 Every Industry has its own standard  “Framework”IEC  Avionics ED 12B / DO 178B  MilitaryDEF STAN  Railroad EN  Automotive ISO  SpaceECCS-Q-ST-80C  Medical DevicesIEC  They rely on similar principles

 The activities to be performed depend on the SW criticality level  DO-178C – level A(Catastrophic)  Failures will likely cause multiple casualties, or crash the airplane  DO-178C – level B(Hazardous/Severe)  Failure will largely reduce the plane safety margin, or cause casualties to people other than the flight crew  DO-178C – level C(Major)  Failure will significantly reduce the plane safety margin, or cause distress to people other than the flight crew  DO-178C – level D(Minor)  Failure will slightly reduce the plane safety or discomfort to passengers of cabin crew  DO-178C – Level E(No Effect)  Failure will have no effect for safety

 The development is organized through processes  Each process describes  Objectives  Activites ObjectiveActivityApplicabilityOutputControl Category ABCDABCD Test coverage of Software Structure Is achieved a b d Software Verification Results 222

 “Just” reasonable development process…  Specify requirements  Implement only requirements  Test  Verify tests  Reviews  Control the development process  … but now this process is checked and validated  That’s the certification process

 Certify the process (e.g. DO-178B)  We can’t prove how good is the software  Let’s show how hard we tried  Certify the product (e.g. DEF-STAN 00-56)  Through “safety cases”  Demonstrate absence of identified vulnerabilities

 Certifying is expensive  Proof must be written for all activities  The software must be tested entirely with regards to  Functionalities  Robustness  All development artifact must be traceable (justifiable, explainable)

 Certification authorities are responsible for checking that the process is followed  They’re not checking directly the quality of the software  The applicant and the authorities iterates and discuss various solutions followed to implement the standard  Things are not fixed – new techniques can be used

 The code is smaller and more expensive to write  A typical engineer write 1 line of code per day on average  Not everything can be certified  Non-deteministic behaviors are out of the scope  Not everything needs to be certified  On a system, certain parts of the software are critical, others aren’t (e.g. entertainment system)

 Is the OS certified?  Is the Run-Time certified?  What guarantees on the compiler?  What guarantees on the tools?  What else runs on the platform?

 Defines and refines what the system should do  High Level Requirements (close to the « human » understanding)  Low Level Requirements (close to the code)  As of today, this is the part that is the most error prone

 Implements requirements  Must be verifiable  “Easy” part  Some (very rough) statistics  1 line of code per day per developer  1 line of code per 10 lines of test

 Manual Reviews  Unit and Functional Testing  Dynamic analysis  Static analysis

Test procedures Code / Test Cases Low level Requirements High Level Requirements HR1LL1C1C2TC1TP1TP2LL2

DesignReviewReview CheckRequirementsReviewReview CheckCodeReviewReview CheckVerificationReviewReview Check

DesignReviewReview CheckRequirementsReviewReview CheckCodeReviewReview CheckVerificationReviewReview Check

 Integration Testing  Test the software in the final environment  Functional Testing - “Black Box”  Test high level functionalities  Unit Testing “White Box”  Test software entities without considering the final purpose

 “High level errors”  Design Errors  Algorithmic errors  “Low level errors”  Non-initialized variables  Infinite loops  Dead code  Stack overflow  Race conditions  Any kind of Run-Time errors (exceptions)

 How to ensure that all the code is actually tested?  How to ensure that all the code is testing the requirements?  Coverage verifications checks that all the code is exercised, and that no unintended function is left

 Statement Coverage  Decision Coverage  Condition Coverage if A = 0 or else B = 0 then P1; end if; else null;

 Coverage by code instrumentation  The code tested is not the code deployed  Needs memory on the board to store results  Coverage by target single-stepping  Very slow  Coverage by emulator instrumentation  Do not test the real board

 Embedded software may have a limited amount of memory  Need to check the appropriate stack usage  By testing (if it crashes, let’s double it)  By post-mortem introspection (if it’s close to crash, let’s double it)  By static analysis

 Computes the tree of calls  Can’t handle recursively  Can’t handle external calls  Can’t handle indirect calls  Computes the size of each frame  Can’t handle dynamic frames  Combine both information for determining the worst stack consumption

 Worst time execution timing must be computed …  … but is extremely hard to prove  Done by testing  Done by model checking  Requires predictable architecture (no cache, no branch heuristic…)

 Concurrent behavior must be deterministic  Concurrent programming tends to be non- deterministic  Needs  Modeling technologies  Deterministic models (Ravenscar)

 Constant naming / formatting  Avoid ambiguous features  Force comments

 Pointers  Recursivity  Indirect calls  Exceptions

float * compute (int * tab, int size) { float tab2 [size]; float * result; for (int j = 0; j <= size; ++j) { tab [j] = tab2 [j] / 10; } result = tab2; return result; }

type Int_Array is array (Integer range <>) of Integer; type Float_Array is array (Integer range <>) of Float; function Compute (Tab : Int_Array) return Float_Array is Tab2 : Float_Array (Tab’Range); begin for J in Tab’Range loop Tab (J) := Tab2 (J) / 10; end loop; declare Result : Float_Array := Tab2; begin return Result; end; end Compute;

 Formal Methods  Object Orientation  Modeling  Outsourcing

 Cover various areas  Static analysis  Dynamic analysis  Test support  Requirement management  Traceability management  Version control systems  Code generators  Typically two different kind  Verification tools  Development tools  Tool Qualification or certification often required

 Determines the complexity of the tools to write  Programming languages  Ada  Java  C/C++  Domain specific languages (DSL)  SCADE  Simulink  MARTE

 Certifying SW is expensive  … but Certifying SW is necessary  Tools developed for certification can be pragmatically used for “regular” SW