SPADEase: The Good, the Bad and the Ugly Bill J Ellis Dependable Systems Group School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh.

Slides:



Advertisements
Similar presentations
1 jNIK IT tool for electronic audit papers 17th meeting of the INTOSAI Working Group on IT Audit (WGITA) SAI POLAND (the Supreme Chamber of Control)
Advertisements

Verification and Validation
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Software Engineering Session 14 INFM 603. Software Software represents an aspect of reality –Input and output represent the state of the world –Software.
1 Mechanical Verification of Timed Automata Myla Archer and Constance Heitmeyer Presented by Rasa Bonyadlou 24 October 2002.
Alternate Software Development Methodologies
ISBN Chapter 3 Describing Syntax and Semantics.
An Integration of Program Analysis and Automated Theorem Proving Bill J. Ellis & Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt.
Formal Methods in Software Engineering Credit Hours: 3+0 By: Qaisar Javaid Assistant Professor Formal Methods in Software Engineering1.
July 11 th, 2005 Software Engineering with Reusable Components RiSE’s Seminars Sametinger’s book :: Chapters 16, 17 and 18 Fred Durão.
Presenter : Shih-Tung Huang Tsung-Cheng Lin Kuan-Fu Kuo 2015/6/15 EICE team Model-Level Debugging of Embedded Real-Time Systems Wolfgang Haberl, Markus.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 19Slide 1 Verification and Validation l Assuring that a software system meets a user's.
PDDL: A Language with a Purpose? Lee McCluskey Department of Computing and Mathematical Sciences, The University of Huddersfield.
MSIS 110: Introduction to Computers; Instructor: S. Mathiyalakan1 Systems Design, Implementation, Maintenance, and Review Chapter 13.
Fundamentals of Information Systems, Second Edition
Chapter 1 Principles of Programming and Software Engineering.
Iterative development and The Unified process
Describing Syntax and Semantics
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Methods For The Prevention, Detection And Removal Of Software Security Vulnerabilities Jay-Evan J. Tevis Department of Computer Science and Software Engineering.
Introduction to Systems Analysis and Design
Introduction to Software Testing
State coverage: an empirical analysis based on a user study Dries Vanoverberghe, Emma Eyckmans, and Frank Piessens.
Introduction to Computer Technology
Advanced Research Methodology
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 23 Slide 1 Software testing.
1.Database plan 2.Information systems plan 3.Technology plan 4.Business strategy plan 5.Enterprise analysis Which of the following serves as a road map.
Software Testing Verification and validation planning Software inspections Software Inspection vs. Testing Automated static analysis Cleanroom software.
S/W Project Management Software Process Models. Objectives To understand  Software process and process models, including the main characteristics of.
Introduction to RUP Spring Sharif Univ. of Tech.2 Outlines What is RUP? RUP Phases –Inception –Elaboration –Construction –Transition.
Chapter 2 The process Process, Methods, and Tools
Copyright 2002 Prentice-Hall, Inc. Chapter 1 The Systems Development Environment 1.1 Modern Systems Analysis and Design.
1 Chapter 2 The Process. 2 Process  What is it?  Who does it?  Why is it important?  What are the steps?  What is the work product?  How to ensure.
© Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew Ireland Computing & Electrical Engineering.
© Andrew IrelandDependable Systems Group. © Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew.
© Andrew IrelandDependable Systems Group Cooperative Reasoning for Automatic Software Verification Andrew Ireland School of Mathematical & Computer Sciences.
© Andrew IrelandDependable Systems Group ITI Techmedia and Technology Transfer Andrew Ireland Dependable Systems Group School of Mathematical & Computer.
(On secondment at) Praxis High Integrity Systems Bath Dependable Systems Group School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh.
Proof Carrying Code Zhiwei Lin. Outline Proof-Carrying Code The Design and Implementation of a Certifying Compiler A Proof – Carrying Code Architecture.
WSMX Execution Semantics Executable Software Specification Eyal Oren DERI
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Software Verification, Validation and Testing.
1 Introduction to Software Engineering Lecture 1.
© Andrew IrelandDependable Systems Group Cooperative Reasoning for Automatic Software Verification Andrew Ireland School of Mathematical & Computer Sciences.
© Andrew IrelandDependable Systems Group On the Scalability of Proof Carrying Code for Software Certification Andrew Ireland School of Mathematical & Computer.
© Gudmund Grov & Andrew Ireland Dependable Systems Group Planning for System Development Gudmund Grov & Andrew Ireland Dependable Systems Group School.
CS Data Structures I Chapter 2 Principles of Programming & Software Engineering.
Bill J. Ellis Dependable Systems Group Heriot-Watt University (Project page: Proving Exception.
© Andrew IrelandDependable Systems Group Static Analysis and Program Proof Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt University.
Fundamentals of Information Systems, Second Edition 1 Systems Development.
© Andrew IrelandDependable Systems Group Invariant Patterns for Program Reasoning Andrew Ireland Dependable Systems Group School of Mathematical & Computer.
Experiences from Representing Software Architecture in a Large Industrial Project Using Model Driven Development Andres Mattsson 1 Björn Lundell 2 Brian.
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.
Chapter 6 CASE Tools Software Engineering Chapter 6-- CASE TOOLS
© Andrew IrelandDependable Systems Group Proof Automation for the SPARK Approach to High Integrity Ada Andrew Ireland Computing & Electrical Engineering.
Software Development Problem Analysis and Specification Design Implementation (Coding) Testing, Execution and Debugging Maintenance.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Software Quality Assurance SOFTWARE DEFECT. Defect Repair Defect Repair is a process of repairing the defective part or replacing it, as needed. For example,
(1) Test Driven Development Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of Hawaii Honolulu.
Formal Verification. Background Information Formal verification methods based on theorem proving techniques and model­checking –To prove the absence of.
Artificial Intelligence: Research and Collaborative Possibilities a presentation by: Dr. Ernest L. McDuffie, Assistant Professor Department of Computer.
© Andrew IrelandDependable Systems Group The Use of Patterns to Guide Code Certification: A Proposal Andrew Ireland School of Mathematical & Computer Sciences.
CS223: Software Engineering Lecture 18: The XP. Recap Introduction to Agile Methodology Customer centric approach Issues of Agile methodology Where to.
© Andrew IrelandDependable Systems Group Increasing Automation for Exception Freedom Proofs Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt.
Bill J. Ellis Dependable Systems Group Heriot-Watt University (Project page: Proving Exception.
Principles of Programming and Software Engineering
Introduction to Software Testing
Cooperative Reasoning for Automatic Software Verification
Need for the subject.
Proof Automation for the SPARK Approach to High Integrity Ada
Presentation transcript:

SPADEase: The Good, the Bad and the Ugly Bill J Ellis Dependable Systems Group School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh (On secondment at) Praxis High Integrity Systems Bath

Introduction Overview Introduction –Context –Objectives Background –Program proof in SPARK –Proof Planning SPADEase features –Good, Bad, and Ugly Ongoing Work Conclusions

Introduction NuSPADE Duration: 2001  2004 Funding: EPSRC critical systems programme (GR/R24081) Aim: Investigate the role of proof planning within the SPARK approach to high integrity software Nature: Traditional research project Research associate: Bill Ellis Principle investigator: Andrew Ireland Collaboration: Praxis

Introduction SPADEase Duration: Jan 2005  July 2005 Funding: EPSRC research assistant industrial secondment scheme (RAIS) (GR/T11289/01) Context: Builds upon the NuSPADE project Aim: Towards increased verification automation for high integrity software engineering Nature: Knowledge transfer, industrial secondment Research associate: Bill Ellis (Seconded to Praxis) Principle investigator: Andrew Ireland Collaboration: Praxis

Introduction SPADEase Objectives Key RAIS Goals: –Transfer knowledge from original research project: Demonstrate viable industrial system Implement this system as an extension to the SPARK approach Evaluate and publish –Training in an industrial environment: Seek out industrial training within Praxis Work in the SPARK corner for six months

Background Program proof in SPARK SPARK Examiner: Takes SPARK, Generates Verification Conditions (VCs) Proving the VCs true proves the code correct SPADE Simplifier: Tries to prove that VCs are true SPADE Proof Checker: Allows the user to prove any remaining VCs SPADE Simplifier VCGSPARK SPARK Examiner VCG SPADE Proof Checker Proof? SIV CMD

Traditional automated theorem proves combine: –Searching for a proof –Checking a discovered proof Proof planning decouples proof search and proof checking: Supports: –Flexible searching (Not burdened with observing strict soundness) –Strong checking (Focus entirely on logic and soundness) Search + Check Background Proof planning (Decouple searching and checking) Prover Goal Proof? Search Proof Planner Goal Proof? Check Proof Checker Proof plan

Traditional automated theorem proves have internal, fixed, proof heuristics: Proof planning has external, configurable, heuristics: –Methods: Describe available proof steps –Critics: Describe how to patch otherwise failed methods Supports: –Understanding of proof heuristics –Reuse of proof heuristics –Rapid development of proof heuristics Background Proof planning (External heuristics) Prover Goal Proof? Heuristics Proof planner Goal Proof plan MethodsCritics

NuSPADE: –Automatically proves SPARK VCs Proof planning –Automatically discovers invariants Program analysis SPADEase: –Focus on automatically proving SPARK VCs As only a six month project… –Some invariant discovery may be explored By accepting manual encoding of examples for analysis SPADEase Summary

Goal: Integrate effectively with the SPARK tools Problem: –NuSPADE is a research system with a very ad-hoc architecture Solution: –Total overhaul of the NuSPADE Architecture! SPADEase Features High level architecture (Good!)

SPADEase Features High Level Architecture (Good!) SPADE Simplifier SIV SPADEase SPADE Proof Checker Proof? VCG Parser Planner Verifier Finalizer SIV CMD RulesMethodsCriticsStrategyCache PropGen

Goal: Eliminate hand crafted initialisation files Problem: –NuSPADE initialisation files selects the top level proof strategy Solution: –Automatically select proof strategy based on VC kind –Invoke exception freedom proof strategy –Invoke invariant proof strategy SPADEase Features Streamlined initialisation (Good!) For path(s) from start to run-time check associated with statement of line 9: For path(s) from assertion of line 11 to assertion of line 11:

Problem: –NuSPADE initialisation files filter the available rules Solution: –Do not perform any rule filtering Problem: –Every visible rule requires time consuming pre-processing –No rule filtering creates a lengthy initialisation phase… Solution: –Rule processing is cached Takes a few hours to generate the rule cache Takes a few seconds to load the rule cache SPADEase Features Streamlined initialisation (Good!)

M2 SPADEase Features Configurable strategies (Good!) Goal: Provide more control over proof strategies In proof search methods are applied to goals –Successful methods: Prove a goal is true Create sub-goals (which are hopefully easier to prove true) Goal 1 Goal 2 Goal 1 Goal 2 M1 Goal 1 Proof! G GG GG P Strategies control which methods are applied to which goals and when G

SPADEase Features Configurable strategies (Good!) Proof search can create many goals before finding a proof! So controlling the application of methods is important A real example…

StrategyMethod… Ma SPADEase Features Configurable strategies (Good!) StrategyMethod Goal 1 MdMcMbMa Goal 1 … Begin with a strategy Mb Goal 1 Md NuSPADE: –Adopt the same strategy for all goals –Always considers every method application to every goal before terminating S1 MdMcMbS1 McS1 Goal 1 MdMcS1 Goal 2 MdMcMbMaS1 Method fails Method succeeds Strategies in NuSPADE:

SPADEase Features Configurable strategies (Good!) Problem: –Some sub-goals are (heuristically) better than their parents So do not always want to search alternative methods at the parent –Some sub-goals are (heuristically) best tackled with particular methods So do not always want to adopt the same strategy as for the parent Solution: –Replace list of methods with a list of method callers, that: Select which method to call If the method is successful: –What strategy to adopt at any sub-goals –If remaining methods at the parent should be removed (cut) StrategyCaller… StrategyCaller… MethodStrategyCut

StrategyCaller… SPADEase Features Configurable strategies (Good!) StrategyCaller… MethodStrategyCut Cb MbS2Yes Ca MaS2no Ma Goal 1 CdCcCbCa Goal 1 Mb Goal 1 Cd S1 CdCcCbS1 CcS1 Goal 1 Begin with a strategy Method fails Method succeeds Goal 2 CzCyCxS2 SPADEase: –Can select strategy for sub-goals (improved control) –Can chose to cut remaining method applications (more efficient) Strategies in SPADEase: S1

SPADEase Features Initial simplification methods (Good!) Goal: Improve SPADEase Performance Problem: –NuSPADE avoids some key simplifications Solution: –New simplification methods Applied only at the beginning of a proof search Made possible by new strategy mechanism –Simplifications considered are: Delete duplicate hypotheses (Ignored in NuSPADE) Replace all named constants in one step (Done incrementally in NuSPADE) Normalise inequality hypotheses (Ignored in NuSPADE)

SPADEase Features Poor performance? (Ugly!) Goal: Improve SPADEase Performance Problem: –Despite enhancements, SPADEase is slower than the Simplifier Reasons: –All discovered proofs are explicitly checked Need to record all proof actions –Complex heuristics are considered in SPADEase Rippling Middle-out-reasoning

SPADEase Features Poor performance? (Ugly!) However: –SPADEase is invoked on the problems not proved by the Simplifier –Perhaps difficult problems warrant a more thorough search? Observations: –For industrial proof Use a fast/light proof strategy Followed by a slow/deep proof strategy –Both of these strategies may be achieved in the proof planning paradigm!

SPADEase Features Simplification explodes (Ugly!) Goal: Support term simplification Problem: –Rules are not manually filtered in SPADEase –Many more rules are visible in SPADEase than in NuSPADE –Leads to a search explosion in NuSPADE’s term simplification method… Solution: –Introduce a new term simplification method –Exploit the heuristic of bringing together related terms –This method exists on paper… but not in code

SPADEase Features Modifying the Proof Checker (Bad!) Goal: Check plans in the SPADE Proof Checker Problem: –The Checker’s behaviour is not (realistically) predictable Solution: –NuSPADE: Many small changes to the Checker Complex CMD Files Does not address all areas of unpredictably –SPADEase: One large change to the Checker Clear CMD files Fully predictable Checker But is it sound?! –Ideally: Proof Checker should be predictable out-of-the-box

Ongoing Work Complete SPADEase: –Create new term simplification method –Improve/finish critics –Finish the finalizer Evaluation: –Explore the behaviour of SPADEase on real examples –Compare SPADEase and NuSPADE PropGen: –Explore a light weight version of PropGen

Conclusions Proof planning: –Is a coherent component based system (Methods / Critics / Strategies) –Demonstrates soundness through explicitly checked proofs SPADEase addresses various problems in NuSPADE –To create an industrially viable proof planning system Proof planning is applicable within the Spark Approach –Although more control of the SPADE Proof Checker is desired…