Rigorous Software Development An introduction



Similar documents
Rigorous Software Development CSCI-GA

Rigorous Software Engineering Hoare Logic and Design by Contracts

How To Write A Program Verification And Programming Book

Rigorous Methods for Software Engineering (F21RS1) High Integrity Software Development

Testing of safety-critical software some principles

Computer Science Information Sheet for entry in What is Computer Science?

CSE4213 Lecture Notes

CS4507 Advanced Software Engineering

Software Life Cycle. Management of what to do in what order

Software Process for QA

CHAPTER 01 THE SCOPE OF SOFTWARE ENGINEERING

How To Improve Software Quality

Basic Testing Concepts and Terminology

Software Engineering. Objectives. Designing, building and maintaining large software systems

Quality Management. Lecture 12 Software quality management

Introduction to Formal Methods. Các Phương Pháp Hình Thức Cho Phát Triển Phần Mềm

SOFTWARE QUALITY MODELS: A COMPARATIVE STUDY

Outline. Definitions. Course schedule

Lecture 03 ( ) Quality of the Software Development Process

Software Engineering Introduction & Background. Complaints. General Problems. Department of Computer Science Kent State University

What Is School Mathematics?

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

Prof. Paolo Nesi. Lab: DISIT, Sistemi Distribuiti e Tecnologie Internet

Introduction to Software Engineering

MAP-I Programa Doutoral em Informática. Rigorous Software Development

Engineering Process Software Qualities Software Architectural Design

An Agile Formal Development Methodology

SOFTWARE PERFORMANCE TESTING SERVICE

Software Verification and System Assurance

Introduction to Software Project Management. CITS3220 Software Requirements & Project Management

Systems Engineering Essentials (in Aerospace)

Software Engineering. Christopher Simpkins Chris Simpkins (Georgia Tech) CS 2340 Objects and Design CS / 16

Software testing. Objectives

Acknowledgement. Software Engineering. CS 3141: Team Software Project Introduction

Formal Methods for Software Engineering

Testing Introduction. IEEE Definitions

ISO/IEC 90003:2004 covers all aspects

Software Engineering

Why process models? Topic 3 Software process models. 3. Process models. What is a process model?

ISOLATING UNTRUSTED SOFTWARE ON SECURE SYSTEMS HYPERVISOR CASE STUDY

Software Verification/Validation Methods and Tools... or Practical Formal Methods

Compositional Security Evaluation: The MILS approach

The Role of Information Technology Studies in Software Product Quality Improvement

Lecture Objectives. Software Life Cycle. Software Engineering Layers. Software Process. Common Process Framework. Umbrella Activities

New Challenges In Certification For Aircraft Software

How To Improve Software Quality

Formal Methods for Software Development

Karunya University Dept. of Information Technology

Modellistica Medica. Maria Grazia Pia, INFN Genova. Scuola di Specializzazione in Fisica Sanitaria Genova Anno Accademico

The Role of Modelling in Teaching Formal Methods for Software Engineering

How To Write Software

The Software Process. The Unified Process (Cont.) The Unified Process (Cont.)

Object-Oriented Software Engineering

Secure Software Programming and Vulnerability Analysis

Automated Theorem Proving - summary of lecture 1

Ingegneria del Software. Gabriele Monfardini - Corso di Ingegneria del Software

INF5140: Specification and Verification of Parallel Systems

The Software Development Process

Software Engineering. Introduction. Lecturer: Giuseppe Santucci

Reflections about Mobile Agents and Software Engineering

Overview Component-based Software Engineering State of the Art Report

Foundations of software engineering

Impact of user satisfaction on Software quality in use

User and Client Satisfaction in Agile Development

Anwendung von Polyspace im Software Entwicklungsprozess nach IEC München, , Dr.-Ing. Jörg Barrho

Fundamental Principles of Software Safety Assurance

Project Risk Management: Independent Software QA Ensures Success

Applying 50 years of Aerospace Systems Engineering Lessons Learned to the Oil Field Technical Challenges of Today

Evaluation of the Iceland State Financial and Human Resource System REPORT OF THE INDIVIDUAL EVALUATOR. Annex 2 SYSTEM AND SOFTWARE QUALITY

Introducing Formal Methods. Software Engineering and Formal Methods

Metrics, Methods and Tools to Measure Security and Trustworthiness. Measuring trustworthiness

The Course.

Chapter 24 - Quality Management. Lecture 1. Chapter 24 Quality management

Dependable (Safe/Reliable) Systems. ARO Reliability Workshop Software Intensive Systems

Introduction to Software Engineering

Multidisciplinary Engineering Systems Graduate Education: Master of Engineering in Mechatronics

How To Write Software

CSCI-485: Software Design

Requirements engineering

Lecture 9: Requirements Modelling

Chapter 1 Introduction

Software Process Training

A Framework for the Semantics of Behavioral Contracts

Lecture 03 ( ) The Software Development Process. Software Development Models. Where are we? Your Daily Menu.

Performance evaluation of large-scale data processing systems

Course Goals. Solve Non-Technical Customer problem Server side: Ruby on Rails Client side: HTML, CSS, AJAX, JavaScript Deploy using cloud computing

University of Calgary Schulich School of Engineering Department of Electrical and Computer Engineering

F-22 Raptor. Agenda. 1. Motivation

ISSUES OF STRUCTURED VS. OBJECT-ORIENTED METHODOLOGY OF SYSTEMS ANALYSIS AND DESIGN

The Helicoidal Life Cycle as a Tool for Software Development and Enhancement

Understanding the Differences between Proprietary & Free and Open Source Software

Good afternoon how address / ask translators It is my privilege today to share with you perspectives of systems engineering for safety critical

An integrated life cycle quality model for general public market software products

Chapter 1: Introduction

The most suitable system methodology for the proposed system is drawn out.

Module 1. Introduction to Software Engineering. Version 2 CSE IIT, Kharagpur

Safety critical software and development productivity

Requirements engineering and quality attributes

Transcription:

Rigorous Software Development An introduction Simão Melo de Sousa RELEASE (UBI), LIACC (Porto), CCTC (Minho) Computer Science Department University of Beira Interior, Portugal October 2011 S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 1 / 26

Outline 1 Context and Motivations 2 Formal Software Engineering and Software Verification S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 2 / 26

Context and Motivations Table of Contents 1 Context and Motivations 2 Formal Software Engineering and Software Verification S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 3 / 26

An appetizer Context and Motivations Software and cathedrals are much the same. First we build them, then we pray. Sam Redwine, at the 4th International Software Process Workshop - 1988 The Formal Methods Approach: Aide toi, et le ciel t aidera! Jean de La Fontaine - Le chartier embourbé. Livre VI - Fable 18.... That is what this short introduction is about. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 4 / 26

Context and Motivations Main reference for this lecture Rigorous Software Development, A Practical Introduction to Program Verification Series: Undergraduate Topics in Computer Science. Almeida, J.B., Frade, M.J., Pinto, J.S., Melo de Sousa, S., Springer Verlag, 1st Edition., 2011, XIII, 307 p. 52 illus. Softcover, ISBN 978-0-85729-017-5 S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 5 / 26

Our Focus Context and Motivations Reliability as Fault Avoidance and not Fault Tolerance Introduction to the methods and tools that provide means to design Information and Computer Systems (ICS) that are functionally and logically correct. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 6 / 26

Context and Motivations Some contextual facts modern ICS = new challenges reliability correctness security safety robustness etc... as a central challenge to the design of modern ICS. was and still is a central issue in the design of safety critical systems. The reliability quest lies at the foundations of Computer Science. Establishing its rigorous and complete foundations is a debate as old as Computer Science itself, indeed older... (but Computer Science is a very young discipline). S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 7 / 26

Context and Motivations Some contextual facts facts from classical software engineering Dysfunctions are expensive ICS maintenance = 2 3 of total costs; Dealing with dysfunctions or bugs = 20 times more expensive after than before production. Apart from these software life cycle considerations, it is well known that bugs can have deep impact in the customers trust (e.g Pentium bug) or financial losses (IBM vs FAA), letting aside human life losses (e.g. Therac 25) or ICS where bugs are simply unacceptable. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 8 / 26

more facts... Context and Motivations Some contextual facts About 16 years ago, W. Gibbs said: Despite 50 years of progress, the software industry remains years perhaps decades short of the mature engineering discipline required to meet the needs of an information-age society. in: Trends in Computing: Software s Chronic Crisis - Scientific American - 1994. Past? Provocation? Unfortunately no. See for instance the usual software equation: Software in the market = bug report channel S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 9 / 26

Solution? Context and Motivations Some contextual facts Unfortunately, There is no definite solution! Nevertheless, there are satisfactory solutions: Reshape and Adapt the software life cycle in order to include reliability as a central requirement. Common Criteria (EAL 5-7), Cenelec / IEC 61508 (Safety Integrity Level 3 and 4), DO-178B (Design Assurance Level A and B). S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 10 / 26

Solution? Context and Motivations Some contextual facts Unfortunately, There is no definite solution! Nevertheless, there are satisfactory solutions: integration and use of: Tests and Simulation Formal Methods S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 10 / 26

Tests and Simulation Context and Motivations Tests and Simulation Main Principle For a given model of the target ICS, provide a set of input data that are representative and compare the output answer with the expected result. But, good tests are rare: exhaustiveness: in the general case, impossible (the set of possible values is possibly infinite) representativeness: in the general case, problems occur when unexpected values are given as input. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 11 / 26

Tests and Simulation Context and Motivations Tests and Simulation An illustrative example (From J. Harrison Lectures): Littlewood proved, in 1914 a surprising result: the function π(n) li(n) where li(n) = n 0 du ln(u) and π(n) = number of primes n changes its sign infinitely. Surprising? yes, because despite intensive (manual) tests (up to 10 10, before the computer era), no sign changes were detected until this proof. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 12 / 26

Context and Motivations A first approach to Formal Methods A general definition The term Formal Methods (FM) refers to the use of mathematical modelling, calculation and prediction in the specification, design, analysis and assurance of computer systems and software. The reason it is called formal methods rather than mathematical modelling of software is to highlight the character of the mathematics involved. J. Rushby, Formal Methods and their Role in the Certification of Critical Systems - SRI - 1995. The use of formal methods for software and hardware design is motivated by the expectation that, as in other engineering disciplines, performing appropriate mathematical analyses can contribute to the reliability and robustness of a design. from wikipedia. In a broad sense, FM is intended to be for ICS engineering what physics is already for aerospace engineering. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 13 / 26

Formal Methods Context and Motivations A first approach to Formal Methods Some properties exhaustiveness: Formal reasoning over the possibly infinite set of values. rigour: well established mathematical foundations adequacy: provided tools and techniques are evaluated as adequate means for providing evidences of reliability (see for instance the ISO standard Common Criteria for the security of ICS) S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 14 / 26

Some considerations Context and Motivations A first approach to Formal Methods Tests vs. FM (Edsger W. Dijkstra): Program testing can be a very effective way to show the presence of bugs, but is hopelessly inadequate for showing their absence. But, Formal Methods only prove what can be (indeed, what is) carefully stated (D. Knuth): Beware of bugs in the above code; I have only proved it correct, not tried it. Thus, (D. Syme & A. Gordon): if you specify you must test. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 15 / 26

Formal Software Engineering and Software Verification Table of Contents 1 Context and Motivations 2 Formal Software Engineering and Software Verification S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 16 / 26

Formal Software Engineering and Software Verification The main issue Formal Methods intend to provide means to: ensure that a given ICS has a given (adequate) behaviour S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 17 / 26

Formal Software Engineering and Software Verification The main issue Formal Methods intend to provide means to: ensure that a given ICS has a given (adequate) behaviour { model Central notion of specification mathematics (logic, algebra, etc...). to bring the object under study to S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 17 / 26

Formal Software Engineering and Software Verification The main issue Formal Methods intend to provide means to: ensure that a given ICS has a given (adequate) behaviour In practice: this central issue is divided into two sub-problems evidences of behaviour: How to ensure/verify the expected behaviour at the specification level. model against code: 1 How to obtain, from a well behaved model, a program with the same behaviour? 2 or, provided code and specification, how to ensure that both share the same behaviour/properties? S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 17 / 26

Formal Software Engineering and Software Verification Classical vs. Formal Software Engineering Software Life Cycle: The classics... Waterfall (Boehm, 1977) V, Spiral, etc... Semi-formal Methods: SA, SADT, SSADM, MERISE, UML, etc... Deep System Analysis, but do not provide strong evidence w.r.t. reliability requirements Nevertheless, positive contributions. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 18 / 26

Formal Software Engineering and Software Verification Classical vs. Formal Software Engineering Development Process and Requirements Design: Each step: a more finely grained look at the system than the previous step. Requirements of the previous step must be refined. The new requirements should reflect the upper stage requirements. Each stage: should produce reports/outputs that form the basis of the next stage and of corresponding validation step. Validation: Should give an answer (hopefully positive) to the challenges stated by the related design stage reports. Essentially based on tests and simulation in a controlled environment S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 19 / 26

Formal Software Engineering and Software Verification Classical vs. Formal Software Engineering Development Process and Requirements Several (safety/reliability/security based) software standard highly recommend the use of mathematically based tools and methodologies to ensure the absence of determined errors: DO-178B, EN 50128 (see figure), GalileoSW, IEC 61508. The ISO/IEC-15408 Common Criteria (for the security of IT) indeed requires the use of such tools for the highest certifications. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 20 / 26

Formal Software Engineering and Software Verification Formal Software Development in a picture Balzer Software Life cycle S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 21 / 26

Formal Software Engineering and Software Verification Formal Software Development vs Formal Modeling At this point we should stress that one can roughly divide the formal methods tools into two main families: 1 System Validation/Verification Tools: Horizontal application of the Balzer Life Cycle 2 Correct by Construction approach: Downward application of the Balzer Life Cycle The former clearly provide means to address only the first sub-problem (with very specialized techniques and tools), while the second intend cover the whole issue. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 22 / 26

Formal Software Engineering and Software Verification Formal Software Development in a picture Applied Balzer Software Life cycle S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 23 / 26

Formal Software Engineering and Software Verification Pragmatical considerations on the application of FM Are the FM tools ready to be used by the ICS industry? Tools maturity and usability: from my own experience, there is a real (and constant) improvement Does a software company need to have FM experts in order to use FM? yes, at least one. Does the FM expert need to have a PhD in order to successfully apply FM? No (personal experience). FM tools still have problems to cope with modularity and scalability (size, etc...)... But, Formal Verification tours de force (e.g. works from Leroy, Barthe, Klein, Cousot, Nipkow,...) are increasingly frequent... 1000000 of Verified lines of code: You can t say any more it can t be done! Here, we ve done it! (Jim Woodcok - Formal Verification of Software) S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 24 / 26

Formal Software Engineering and Software Verification Pragmatical considerations on the application of FM Is the ICS industry ready to use FM? First. ICS industry should realize that FM are not a product (as anti-viruses). (This is in fact happening (or already the case) in several ICS key area) But ICS industry already has ICS development process and does not want to lose it. Thus, adopting FM implies reshape and adapt the in-house ICS design savoir-faire. = FM tools should take the Balzer life-cycle into consideration ICS standards about security and reliability recommend nowadays the use of FM for the highest levels of certification. Shift paradigm: next versions of these standard (that really rule Critical system industry ) are willing to require the use of FM. notable exception : Common Criteria, that already requires. lack of specialists, IVV is a emerging market. S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 25 / 26

Formal Software Engineering and Software Verification Pragmatical considerations on the application of FM What is to be formally specified and verified? Formal Specification and Verification are far from easy (and are not cheap, but the real cost has to be considered in the long term) General practice: determine the critical parts of the ICS to be verified. Apply FM on these parts S. Melo de Sousa (LIACC/DIUBI) Rigorous Software Development 2011 26 / 26