Counterexample-guided Design of Property-based Dynamic Software Updates



Similar documents
Introduction to Software Verification

Algorithmic Software Verification

Formal Verification and Linear-time Model Checking

Fabio Patrizi DIS Sapienza - University of Rome

Model Checking II Temporal Logic Model Checking

Software Modeling and Verification

Testing LTL Formula Translation into Büchi Automata

Formal Verification by Model Checking

Development of the Incorporating System of Automatic Contrast Injector and Radiology Information System (RIS) for Contrast-enhanced CT Examination

T Reactive Systems: Introduction and Finite State Automata

Model Checking: An Introduction

Journal of Mathematics Volume 1, Number 1, Summer 2006 pp

Linux Foundation Automotive Summit - Yokohama, Japan

Static Program Transformations for Efficient Software Model Checking

Iterated Dynamic Belief Revision. Sonja Smets, University of Groningen. website:

Runtime Verification for Real-Time Automotive Embedded Software

Software Verification and Testing. Lecture Notes: Temporal Logics

Temporal Logics. Computation Tree Logic

The Role of Automation Systems in Management of Change

logic language, static/dynamic models SAT solvers Verified Software Systems 1 How can we model check of a program or system?

Agenda. About Gengo. Our PostgreSQL usage. pgpool-ii. Lessons

Tohoku University and the Great East Japan Earthquake Our Role, Responsibility and Mission. Susumu SATOMI President, Tohoku University

Formal Verification of Software

Model Checking based Software Verification

レッドハット 製 品 プライスリスト Red Hat Enterprise Linux 製 品 (RHEL for HPC) 更 新 :2015 年 4 22

Development of dynamically evolving and self-adaptive software. 1. Background

Verifying Specifications with Proof Scores in CafeOBJ

Automata-based Verification - I

INF5140: Specification and Verification of Parallel Systems

CS510 Software Engineering

Fundamentals of Software Engineering

Software Engineering using Formal Methods

= 注 意 = 更 新 型 番 (RN) 複 数 年 型 番 (F3 F5)も 対 象 に 含 みます 改 訂 日 付 SKU Description No.

What the EU -Japan Centre for Industrial Cooperation can offer to the EU and Japanese Companies? Silviu Jora, General Manager (EU side)

On the Modeling and Verification of Security-Aware and Process-Aware Information Systems

Copyright 2015 NTT corp. All Rights Reserved.

Software safety - DEF-STAN 00-55

Model checking test models. Author: Kevin de Berk Supervisors: Prof. dr. Wan Fokkink, dr. ir. Machiel van der Bijl

The Model Checker SPIN

Introduction to Promela and SPIN. LACL, Université Paris 12

CSC 492 The Practice of Software Engineering. Lecture 3 University of Mount Union Software Life Cycle Models

INF5140: Specification and Verification of Parallel Systems

Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification

Data Mining for Risk Management in Hospital Information Systems

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL

Panasonic AC-DC Power Supply Design Support Service

The Leader Election Protocol of IEEE 1394 in Maude

[Refer Slide Time: 05:10]

Summit Public Schools Summit, New Jersey Grade Level / Content Area: Mathematics Length of Course: 1 Academic Year Curriculum: AP Computer Science A

Specification and Analysis of Contracts Lecture 1 Introduction

Model Checking LTL Properties over C Programs with Bounded Traces

IV. Software Lifecycles

Translating Stochastic CLS into Maude

Runtime Verification of Concurrent Haskell Programs

IP Litigation in Europe and in Germany

SQL INJECTION ATTACKS By Zelinski Radu, Technical University of Moldova

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

My experience of Ruby Education in Taiwan

レッドハット 製 品 プライスリスト 標 準 価 格. Red Hat Enterprise Linux 製 品 (RHEL Server)

Today s Agenda. Automata and Logic. Quiz 4 Temporal Logic. Introduction Buchi Automata Linear Time Logic Summary

Module 10. Coding and Testing. Version 2 CSE IIT, Kharagpur

Product: DQ Order Manager Release Notes

6.080/6.089 GITCS Feb 12, Lecture 3

Copyright. Network and Protocol Simulation. What is simulation? What is simulation? What is simulation? What is simulation?

Loop Invariants and Binary Search

How To Handle A Power Outage On A Server Farm (For A Small Business)

Cost Accounting 1. B r e a k e v e n A n a l y s i s. S t r a t e g y I m p l e m e n t a t i o n B a l a n c e d S c o r e c a r d s

Digital Design Verification

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

Software Tender for Voice over IP Telephony SuperTel Incorporated

VDM vs. Programming Language Extensions or their Integration

Formal Verification Coverage: Computing the Coverage Gap between Temporal Specifications

Software quality engineering. Quality assurance. Testing

AE64 TELECOMMUNICATION SWITCHING SYSTEMS

Homework 1 (Time, Synchronization and Global State) Points

Maintenance Training Concepts for the Wind Industry. BZEE Academy GmbH. 26 th of February, 2013, Tokyo

Automated Route Planning for Milk-Run Transport Logistics with the NuSMV Model Checker

tutorial: hardware and software model checking

INTRODUCTION TO DATABASE SYSTEMS

Software Verification: Infinite-State Model Checking and Static Program

Advanced Systems Security: Retrofitting Commercial Systems

2) What is the structure of an organization? Explain how IT support at different organizational levels.

Alok Gupta. Dmitry Zhdanov

An Overview of the Runtime Verification Tool Java PathExplorer

Transcription:

Counterexample-guided Design of Property-based Dynamic Software Updates Min Zhang 20141015 Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [1/45]

Contents 1 Dynamic Software Updating (DSU) Instantaneous DSU Incremental DSU 2 Formalization and verification of instantaneous DSU 3 A case study Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [2/45]

About DSU Dynamic Software Updating An updating technique for updating software systems that are running without incurring downtime Q: Why do we need DSU? A: Two main reasons: 1 Software systems are inevitably subject to update 2 For some software systems, shutting them down is expensive! Example (How much is an hour of downtime worth to you?) According to a Yankee Group report, banks can lose as much as US $26 million per hour and Research brokerages Center as much for Software as US $45 Verification million per hour from downtime Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [3/45]

Existing works on DSU More than 40 approaches have been proposed and prototypes have been implemented (H Seifzadeh, et al, A survey of dynamic software updating J of Software, Evolution, and Process 25:535-568, 2013) Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [4/45]

Motivation of the work Three features of dynamic updating: 1 Doing dynamic update to a running system is dangerous! Lose the baton! 2 Target systems are usually safety/mission-critical systems, while crashing them is expensive! Lose the golden medal! 3 Designing a correct dynamic update is challenging! We do not even Research knowcenter what correctness for Softwaremeans Verification Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [5/45]

Studying dynamic updating at two levels 1 code-level: implementing a dynamic updating correctly the code differences between old and new systems how code is managed in memory by updating how code is executed after updating, eg, whether a function refers to the data of correct type, whether a function calls another of the correct version 2 design-level (this talk): designing a dynamic updating correctly static differences, eg, system structures/states dynamic differences, eg, system behaviors the behaviors during updating Software is built on abstractions Pick the right ones, and programming will flow naturally from Research design; Center for Software Verification Japan Advanced Institute of Science and Daniel Technology Jackson Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [6/45]

Instantaneous and incremental DSU At the design level, we classify DSU into two classes according to update duration Instantaneous DSU (this talk) Incremental DSU Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [7/45]

Five requirements to design an instantaneous dynamic updating 1 a running software system (old system) 2 a new version of the running system (new system) 3 a set of updating points (a subset of old states where updates will be applied) 4 an (optional) update bringing forward mechanism, which is used to bring the running system to an update point as soon as possible 5 a state transformation function, a (partial) function from old states to new states Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [8/45]

Challenges to the design of correct dynamic update 1 What does correct mean? 2 How to identify a set of updating points? 3 How to design an update bringing forward mechanism? 4 How to define a state transformation function? Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [9/45]

Contributions of our work 1 We define the correctness in terms of the properties of the old and new systems 2 We propose a counterexample-guided approach to designing correct dynamic updates by 1 identifying a set of safe updating points 2 defining a correct a state transformation function 3 designing a correct update bringing forward mechanism Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [10/45]

Formalization of instantaneous dynamic updates (I) Formalization of software systems as Kripke structures Definition (Kripke structure) A Kripke structure K is a four-tuple (S, I, T, L) over a set AP of atomic propositions, where S: a finite set of states I: a set I S of initial states T: a transition relation T S S, and T must be total, ie, for any s S, there exists s S, st (s, s ) T L: a labeling function S 2 AP We assume that both the old and the new systems are finite-state systems Let K 1 = (S 1, I 1, T 1, L 1 ) and K 2 = (S 2, I 2, T 2, L 2 ) be two Kripke structures over two sets of atomic Research propositions Center for APSoftware 1 and APVerification 2 such that K 1 and K 2 model the old and Japan the newadvanced systems Institute respectively of Science and Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [11/45]

Formalization of instantaneous dynamic updates (II) A set S of update points such that S S 1 A state transformation function f : S S 2 Updating bringing forward mechanism: T (S 1 S 1 ) Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [12/45]

Formalization of update request (I) Update request (generally update request can be made at any moment when the old system is running): Front layer: old system Back layer: update bringing forward mechanism From the front layer to the back layer: update request Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [13/45]

Formalization of update request (II) Let S 1 be a mirror set of S 1, ie, S 1 S 1 = and there exists a bijection ψ : S 1 S 1 Let L : S 1 S 1 2AP 1 {req,upd} L 1 (s) if s S 1 L (s) = L 1 (φ 1 (s)) {req} if s S 1 and φ 1 (s) / S L 1 (φ 1 (s)) {req, upd} if s S 1 and φ 1 (s) S req AP 1 : states Japan where Advanced updateinstitute request has of Science been made; and Technology upd AP 1 : update points Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [14/45]

Formalization of update request (III) Let T S 1 S 1 st T = {(s 1, s 2 ) s 1 S 1, s 2 S 1, (φ 1 (s 1 ), φ 1 (s 2 )) T } Let T = T 1 T {(s, s ) s S 1, s S 1, s = φ(s)} Let S = S 1 S Research 1 Center for Software Verification We obtain a KripkeJapan structure Advanced K = (S Institute, I 1, T of, L Science ) over AP and 1 Technology {req, upd} Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [15/45]

Formalization of updating (I) Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [16/45]

Formalization of updating (II) Some assumptions: 1 S 2 S 1 =, S 2 S 1 = 2 AP 2 AP 1 = 3 new is an atomic proposition such that new AP Japan Advanced Institute of Science 1 and new AP and Technology 2 Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [17/45]

Formalization of updating (III) Let S = S 1 S 1 S 2 AP = AP 1 AP 2 {new, req, upd} L : S { 2 AP st L L (s) = (s) if s S L 2 (s) {new} if s S 2 S S 1 st S = {φ(s) s S } f : S S 2 st f (s) = f(φ 1 (s)), and T = T T 2 {(s, f (s)) s S } Finally, we obtain K Research = (S, Center I 1, T, L for ) over Software the set Verification AP Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [18/45]

Property-based Correctness of dynamic updating Definition (Property-based correctness) Ạ dynamic update is correct if it satisfies a set P of given properties We classify the properties in P into three kinds: 1 common properties which should be satisfied by all the dynamic updates 2 dependent properties: which specify the relation between the old system and the new system 3 independent properties: the properties of the new system which are independent from those of the old system Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [19/45]

Common properties Definition (Updatability) Once an update request is made, the running system must eventually reach an update point LTL formula of updatability: (( req req) upd) : Globally : Next : Finally Updatability is a property Japan Advanced of update Institute bringing of forward Science mechanism and Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [20/45]

Dependent properties Given two LTL properties p 1 and p 2 which are built out of the atomic propositions in AP 1 and AP 2, if p 1 holds in the old system, then p 2 holds in the running system after it is updated Example (Connection preservation) For a dynamic update to an FTP server a property that the update should satisfy is that all the connections should be preserved, ie, if the number of connections in the old system is n, so is the number of connections after update A dependent property with p 1 and p 2 can be formalized as an LTL formula wrt K, ie, (p 1 U req) (( new new) p 2 ) Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [21/45]

Independent properties The properties of the new systems which are independent from those in the old systems Example (Dynamic update for bug-fixing) Some properties are supposed to hold after the update, regardless of the situation when the update is applied Let p be an LTL property of the new property which is independent from the properties of the old one, its corresponding LTL formula wrt K is ( new new) p Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [22/45]

P-Correctness of a dynamic update Definition (P-Correctness) Suppose that K is a Kripke structure of a dynamic update and P is a set of LTL formulas for a given set P of properties The dynamic update is called P-correct iff for each p in P, K = p Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [23/45]

An algorithm of designing a P-correct dynamic update input : K1, K2, T, f, P output : A set S of update points, a refined update bringing forward mechanism T and a refined state transformation function f 1 S := S1; f := f; T := T ; 2 while true do 3 Synthesize a Kripke structure K with K1, K2, S, T, f ; 4 if K = (( req req) upd) then /* Check the updatability */ 5 Refine S and T based on the counterexample; 6 else 7 Construct LTL formulas P for P with respect to K ; hasce := false; 8 foreach p in P do 9 if K = p then /* Check if the counterexample is real for p */ 10 if p = ((p1 U req) (( new new) p2)) then 11 if K1 = p1 K2 = p2 then { hasce:= true; break;} else return null ; /* The counterexample is real for p */ 12 else if p = (( new new) p ) then 13 if K2 = p then { hasce:= true; break; } else return null; /* If p is not satisfied by K2 */ 14 if hasce then /* A real counterexample is found */ 15 Refine S and f based on the counterexample; 16 else 17 break; 18 return S, T and f ; /* The algorithm terminates here */ Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [24/45]

A Case Study The Railcab system: a conceptual driverless rail-bound transportation system proposed at the University of Paderborn Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [25/45]

A buggy crossing mechanism in the Railcab system 1 At endofts, a Railcab sends a message to the controller to request for passing 2 The controller replies a message to approve (if the gate is open) and reject (if the gate is closed) the request 3 If the request is Research approved, Center the controller for Software then Verification closes the gate When a Railcab is crossing the gate, the gate may be still open Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [26/45]

A modification 1 A new signal trigger approchcrossing is added 2 At approchcrossing, the Railcab sends a message to the controller to check the status of the gate 3 If the messageresearch replied bycenter the controller for Software saysverification the gate is close, it will pass, otherwise, Japan it stops Advanced Institute of Science and Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [27/45]

To design a dynamic update to the buggy mechanism Some requirements to the update: 1 After update, the bug should be fixed, ie, whenever the Railcab is passing the crossing, the gate must be closed 2 The update should be transparent to the Railcab, ie, not affecting the running Railcabs To design such an update: 1 What should be done to achieve the update, ie, state transformation? 2 When is it safe to apply, ie, update points? 3 How to apply as soon as possible, ie, update bringing forward mechanism? Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [28/45]

The Railcab system as a Distributed system RailCab s 6 brake s 7 recrespr s 0 sendreq s 1 s 2 s 4 recrespg move2leb move2nr s 5 sendp ass s 10 move2leb recrespg ebrake s 3 recrespr s 8 ebrake s 9 Controller opengate closegate s 3 sendrespg s 1 getreq s 0 s 2 getp ass sendrespr Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [29/45]

Specification of the buggy crossing mechanism in Maude (I) Maude: an algebraic specification language based on rewriting logic We choose Maude because it supports LTL model checking A system state is represented as a multiset of sort OldState (gate:_)(conloc:_)(cabloc:_)(chan1:_)(chan2:_) (cabsta:_)(pass:_) gate: the status of gate, ie, open or close conloc: the state of the controller cabloc: the location of the Railcab chan1: the sequence of the messages sent from the Railcab to the controller chan2: the sequence of the messages sent from the controller to the Railcab cabsta: the status Research of the Center Railcab, for Software ie, running Verification or braked pass: the request Japan result: Advanced ie, approved Institute or of rejected Science and Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [30/45]

Specification of the buggy crossing mechanism in Maude (II) Specification of the transitions as rewrite rules: Example (sending a request message) The Railcab sends a request to the controller when it is at the endofts location rl [ sendreq]:( cabloc: endofts) ( chan1: SQ) => ( cabloc: lastbrake)( chan1: ( reqmsg & SQ)) SQ: a variable of MsgSeq (sort of sequences of messages) Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [31/45]

sendchk recrespr Formalization of the new crossing mechanism New RailCab s 6 brake s 7 s 12 move2leb s 13 recgateo recgatec recgatec move2nr s 0 recrespg move2leb s1 s 2 s 4 s 5 sendp ass s 10 sendreq move2leb s 11 s 3 New controller opengate recrespg recrespr closegate s 8 recgateo ebrake s 3 ebrake ebrake s 9 sendrespg s 1 getp ass getreq s 0 s 2 sendgatec/ Research Center getchk for Software Verification sendrespr sendgateo s 4 Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [32/45]

Specification of the new crossing mechanism in Maude Let NewState be the sort of states of the new mechanism (gate ':_)(conloc ':_)(cabloc ':_)(chan1 ':_)(chan2 ':_) (cabsta ':_)(pass ':_)(appres:_) appres: to record the result of the gate status learned from the message replied by the controller, unknown, open or close Transitions in the new crossing mechanism can be formalized similarly Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [33/45]

An initial design of a dynamic update Update points: we simply assume that the update can take place at any moment State transformation: simply copy the old state to the new one and initialize appres by unknown Update bringing forward: no, because the update is expected to be transparent to the Railcab Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [34/45]

Formalization of the initial design Formalization of the state transformation: op f : OldState -> NewState eq f(( gate: B)( conloc: L1)( cabloc: L2)( chan1: CH1) ( chan2: CH2)( cabsta: S)( pass: P)) = (gate ': B)( conloc ': L1)( cabloc ': L2)(chan1 ': CH1) (chan2 ': CH2)( cabsta ': S)(pass ': P)(appRes: unknown) Formalization of the update request and update application: rl [ request]: ( req: false) => ( req: true) rl [ apply]: ( req: true) OS: OldState => f(os) We declare a super sort State, ie, OldState NewState < State We add a new field (req:_) to the old state to formalize the update request Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [35/45]

Formalization of the expected properties of the dynamic update Crossing property After updating, when the Railcab is at the noreturn point, the gate must be closed Passability If the gate is open and the Railcab wants to pass the crossing, it must finally pass it @noret: the RailCab is at the noreturn point passed: the RailCab has already passed the crossing gateclose: the gate is closed gateopen: the gate is open Crossing property: Research Center p 1 (@noret for Software Verification gateclose) Passability: Japan p 2 Advanced (gateopen Institute passed of Science and @noret) Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [36/45]

Verification by model checking The LTL formulas to be model checked: Updatability : (( req req) upd) (1) Crossing property : (( new new) p 1 ) (2) Passability : (( new new) p 2 ) (3) Verification result of Formula 1: no counterexample Maude found a counterexample for Formula 2 The snippet of the counterexample: {(loc: noreturn)(gate: false),update} {(loc ': noreturn)(gate ': false),closegate} Update takes placeresearch when thecenter RailCab forissoftware at noreturn Verification point Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [37/45]

Refinement of the dynamic update (I) Exclude the states where the RailCab is at the noreturn point from the update points: crl [ apply]: ( req: true) ( cabloc : L) OS: OldState => f(( cabloc : L) OS) if L =/= noreturn Model checking result with the refined dynamic update: Formula 1: no counterexample Formula 2: no counterexample A counterexample is found for Formula 3: {(loc: lastbrake)(gate:false),update}{(loc ':lastbrake) ( gate ': false)( appres: unknown),move2leb} {loc ': lastemergencybrake)(appres: Research Center for Software unknown),ebrake} Verification {,deadlock} Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [38/45]

Refinement of the dynamic update (II) Exclude the states where the RailCab is at the lastbrake point from the update points: crl [ apply]: ( req: true) ( cabloc : L) OS: OldState => f(( cabloc : L) OS) if L =/= noreturn and L =/= lastbrake Model checking result with the refined dynamic update: Formula 1: no counterexample Formula 2: no counterexample A counterexample is found for Formula 3: {(loc: lastemergencybrake)(gate:false),update}{(loc ': lastemergencybrake)( Research Center gate for ': Software false)( appres: Verification unknown), ebrake} {,deadlock} Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [39/45]

Refinement of the dynamic update (III) Exclude the states where the RailCab is at the lastbrake point from the update points: crl [ apply]: ( req: true) ( cabloc : L) OS: OldState => f(( cabloc : L) OS) if L =/= noreturn and L =/= lastbrake and L =/= lastemergencybrake Model checking result with the refined dynamic update: Formula 1: no counterexample Formula 2: no counterexample Formula 3: no counterexample Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [40/45]

Another refinement The reason for the counterexample is that when the RailCab is at lastbrake or lastemergencybrake location, the value of appres is initialized to be unknown, regardless of the status of gate No chance for the RailCab to send the second message to check the status We can initialize appres according to the status of the gate when the RailCab is at the lastbrake or lastemergencybrake op f' : OldState -> NewState ceq f'(( gate: B)( conloc: L1)( cabloc: L2)( chan1: CH1) ( chan2: CH2)( cabsta: S)( pass: P)) = (gate ': B)( conloc ': L1)( cabloc ': L2)(chan1 ': CH1) (chan2 ': CH2)( cabsta ': S)(pass ': P) (appres: if B then close else unknown) if L2 = lastbrake or L2 = lastemergencybrake No counterexample Research is found Center for the for three Software formulas Verification even if the update takes update when the RailCab Japan Advanced is at lastbrake Institute or of lastemergencybrake Science and Technology Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [41/45]

Lessons learned from the case study With the proposed formal approach, we can design a dynamic update 1 identifying a set of update points 2 defining an appropriate state transformation function 3 the dynamic update is verified to satisfy a set of desired properties 4 state transformation and update points depend on each other Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [42/45]

Some limitations and possible extensions The proposed approach is suited 1 to systems with finite state space 2 to closed systems (no interaction with environment) 3 to instantaneous dynamic update Some possible extensions 1 for infinite-state system: abstraction or narrowing-based model checking 2 for open systems which need to interact the environment: Labeled Kripke structure 3 to incremental dynamic update: to formalize the synchronization mechanism between Research the Center old and for new Software systems Verification during updating Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [43/45]

Conclusion and future work A formal approach to the design of dynamic update: 1 Instantaneous and incremental dynamic update 2 Property-based correctness of dynamic update 3 Counterexample-guided design of dynamic update 4 The dependency between update points and state transformation Future work: to extend the proposed approach 1 for infinite-state system 2 for open systems which need to interact the environment 3 for incremental dynamic update Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [44/45]

Q&A ありがとうございました! Min Zhang (JAIST) Counterexample-guided Design of Property-based Dynamic Software Updates 20141015 [45/45]