Towards Global and Local Types for Adaptation Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mario Bravetti,

Slides:



Advertisements
Similar presentations
Construction process lasts until coding and testing is completed consists of design and implementation reasons for this phase –analysis model is not sufficiently.
Advertisements

1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
Inference of progress properties for (multi party) sessions Mario Coppo (Universita’ di Torino) joint work with Mariangiola Dezani, Nobuko Yoshida Lisbon,
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
Modeling Insider Attacks on Group Key Exchange Protocols Jonathan Katz Ji Sun Shin University of Maryland.
1 The SOCK SAGA Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro.
1 Synchronization strategies for global computing models Ivan Lanese Computer Science Department University of Bologna.
CS 290C: Formal Models for Web Software Lecture 10: Language Based Modeling and Analysis of Navigation Errors Instructor: Tevfik Bultan.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
1 SOCK and JOLIE from the formal basis to a service oriented programming language Ivan Lanese Computer Science Department University of Bologna Italy Joint.
1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins,
1 Ivan Lanese Computer Science Department University of Bologna Italy Evolvable systems: some ideas for modelling With input from Davide Sangiorgi, Fabrizio.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio.
Bridging the gap between Interaction- and Process-Oriented Choreographies Talk by Ivan Lanese Joint work with Claudio Guidi, Fabrizio Montesi and Gianluigi.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Fault in the Future Joint work with Gianluigi Zavattaro and Einar Broch Johnsen.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the expressive power of primitives for compensation handling Joint work with Catia.
1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory at Work: Program Transformations in a Service-centred Calculus.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
System-Level Types for Component-Based Design Paper by: Edward A. Lee and Yuhong Xiong Presentation by: Dan Patterson.
1 Ivan Lanese Computer Science Department University of Bologna Italy Streaming Services in SSCC Joint work with Francisco Martins, Vasco Vasconcelos and.
1 FM Overview of Adaptation. 2 FM RAPIDware: Component-Based Design of Adaptive and Dependable Middleware Project Investigators: Philip McKinley, Kurt.
Models of Computation as Program Transformations Chris Chang
Systems Analysis I Data Flow Diagrams
1 Joint work with Antonio Bucchiarone (Fondazione Bruno Kessler - IRST, Trento) and Fabrizio Montesi (University of Bologna/INRIA, Bologna) A Framework.
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Why Analysis Process Refer to earlier chapters Models what the system will do makes it easier for understanding no environment considered (hence, system.
C++ Code Analysis: an Open Architecture for the Verification of Coding Rules Paolo Tonella ITC-irst, Centro per la Ricerca Scientifica e Tecnologica
The Structured Specification. Why a Structured Specification? System analyst communicates the user requirements to the designer with a document called.
Investigating System Requirements
CS 360 Lecture 3.  The software process is a structured set of activities required to develop a software system.  Fundamental Assumption:  Good software.
Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Composing Adaptive Software Authors Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten, Betty H.C. Cheng Presented by Ana Rodriguez June 21, 2006.
DISTRIBUTED SYSTEMS RESEARCH GROUP CHARLES UNIVERSITY PRAGUE Faculty of Mathematics and Physics Behavior Composition in Component.
(Business) Process Centric Exchanges
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Amending Choreographies Joint work with Fabrizio Montesi and Gianluigi Zavattaro.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Language Joint work with Elena.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
I Power Higher Computing Software Development The Software Development Process.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Lyra – A service-oriented and component-based method for the development of communicating systems (by Sari Leppänen, Nokia/NRC) Traditionally, the design,
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
1 Capturing Requirements As Use Cases To be discussed –Artifacts created in the requirements workflow –Workers participating in the requirements workflow.
“Dynamic fault handling mechanisms for service-oriented applications” Fabrizio Montesi, Claudio Guidi, Ivan Lanese and Gianluigi Zavattaro Department of.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Decidability Results for Dynamic Installation of Compensation Handlers Joint.
BPEL Business Process Engineering Language A technology used to build programs in SOA architecture.
1 Joint work with Claudio Antares Mezzina and Jean-Bernard Stefani Controlled Reversibility and Compensations Ivan Lanese Focus research group Computer.
Course: COMS-E6125 Professor: Gail E. Kaiser Student: Shanghao Li (sl2967)
A Mediated Approach towards Web Service Choreography Michael Stollberg, Dumitru Roman, Juan Miguel Gomez DERI – Digital Enterprise Research Institute
Dr. Rebhi S. Baraka Advanced Topics in Information Technology (SICT 4310) Department of Computer Science Faculty of Information Technology.
Review of Parnas’ Criteria for Decomposing Systems into Modules Zheng Wang, Yuan Zhang Michigan State University 04/19/2002.
UML - Development Process 1 Software Development Process Using UML.
CS223: Software Engineering Lecture 13: Software Architecture.
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Software Development Process CS 360 Lecture 3. Software Process The software process is a structured set of activities required to develop a software.
Observing the Current System Benefits Can see how the system actually works in practice Can ask people to explain what they are doing – to gain a clear.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Adaptive Choreographies Joint work with Mila Dalla Preda, Jacopo Mauro and Maurizio.
Compositional Choreographies By Fabrizio Montesi and Nobuko Yoshida
Regression Testing with its types
Deadlock Freedom by Construction
Requirements: Use Case Models and Narratives
Choreographies: the idea
Information Systems Development
Internet of Things A Process Calculus Approach
Chapter 20 Object-Oriented Analysis and Design
From Use Cases to Implementation
Presentation transcript:

Towards Global and Local Types for Adaptation Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mario Bravetti, Marco Carbone, Thomas Hildebrandt, Jacopo Mauro, Jorge A. Perez and Gianluigi Zavattaro

Many distributed participants

Complex multiparty interactions l Jacopo and Ivan were working on adaptive choreographies (with others) l Marco was working on multiparty session types (with others) l Mario, Jorge and Gianluigi were working on adaptable calculi (with others) l Thomas was working on adaptable case management systems (with others) l Mario, Marco, Thomas, Ivan, Jacopo, Jorge and Gianluigi wanted to start a collaboration on multiparty session types and adaptation

Message-based communication ( ) CaseStudy: Thomas → Mario Thomas sends a proposal for a case study to Mario CommentsReq: Mario → Ivan Mario asks Ivan for comments on the syntax WriteConcl: Gianluigi → Jorge Gianluigi asks Jorge to write conclusions Cut: Mario → Jacopo Mario asks Jacopo to cut the paper to respect the page limit

Participants act according to the choreography CommentsReq: Mario → Ivan; Comments: Ivan → Mario l Ivan behavior should follow the type: CommentsReq Mario ;Comments Mario l Ivan code interleaves different sessions: k : CommentsReq Mario (x); k’ : BuyBread Wife ; k’ : Bread Wife ; k : Comments Mario l Each session respects a given type

Unexpected adaptation needs l External adaptation need: –Simon Gay announces BEAT II: the choreography is adapted to submit a work-in-progress to it –Marco notices that most of us will attend DisCoTec 2013: the choreography is adapted to exploit this occasion to work together »Marco is a participant of the choreography, but »DisCoTec attendance is not mentioned in the choreography »It may be part of another choreography Marco is participating to l Internal adaptation need: –Mario finds a bug in the definition of traces: the choreography is adapted by adding interactions to fix it

Our plan l Write choreographies to describe complex multiparty interactions l Derive a description of the behavior of each participant l Type the code of each participant according to its local description(s) –The code may involve many interleaved sessions l Typing ensures good properties –The code follows the expected protocol(s) –No deadlock

Our plan l Write choreographies to describe complex multiparty interactions l Derive a description of the behavior of each participant l Type the code of each participant according to its local description(s) –The code may involve many interleaved sessions l Typing ensures good properties –The code follows the expected protocol –No deadlock

Adaptation l Systems should live for long periods of time l Systems should adapt to –Changes in the environment (new technologies, protocols, unexpected workload) –Changes in users minds (new requirements, changing business rules) l Adaptation happens at runtime l The system should be adapted with minimal disruption of functionalities –No shut down, recompile, and restart

How to face the unexpected? l Adaptation details (frequently) not known when the system has been designed or even started l To face those unexpected challenges something should come from outside –New code –Exploiting the new technology, defining the new business rule,... l The system should provide an interface to –Interact with an adaptation middleware –Get new code –Combine it with the existing code

Internal vs external updates l External updates –New code from the environment »A participant of another choreography »The human user via some interface –Fundamental to deal with unexpected events l Internal updates –New code from a participant of the choreography –Towards another area of the same choreography –Useful as a programming construct, e.g., for error handling –Enhances compositionality –Specifying the choreographies and the updates in the same language useful for refinement

Adaptation and multiparty session types l Lots of works on adaptation exist –Our main contribution is not an innovative way of doing adaptation l Formal approaches emerging only very recently –Our main contribution is in guaranteeing desirable properties l Trade off between –Allowing substantial adaptations »One would be able to change everything –Preserving good properties »Easier if one changes very little »Easier if one knows in advance what is changing and how l Adaptive multiparty session types provide a good trade off

Adaptation constructs l Impossible to guarentee good properties if adaptations can happen everywhere –We need a construct to specify where adaptation can happen –We call it a scope –A scope contains code, to be executed if no adaptation occurs –Running scopes can be adapted too (also from inside) l A construct is needed for internal update –Should provide the new code for a given scope l Similar constructs at the level of choreographies, endpoints and code

Constructs for external update l None l External updates come from outside –Not specified in the choreography –The system does not know how things will change l We add external updates to the semantics, extending the notion of traces l External updates are updates coming from a parallel (unspecified) choreography

Choreography language Composed by interactions of the form CommentsReq: Mario → Ivan l Standard composition operators: sequence ; parallel | choice + Kleene star * l Two operators for adaptation –X:T[C] scope with name X executing choreography C with set of roles (at most) T –X r {C} internal update of a scope done by role r, inserting in the scope with name X the new choreography C

Endpoint language l Processes composed by inputs and outputs of the form CommentsReq Ivan CommentsReq Mario l The same composition operators as before: sequence ; parallel | choice + Kleene star * l Two operators for adaptation –X[P] scope with name X executing process P –X (r1,...,rn) {P 1,...,P n } update of a scope X sending process P i to endpoint r i »A single update involves multiple endpoints l A system description is a parallel composition of endpoints –Each endpoint has a name and executes a process

Projection l Allows one to automatically derive from a choreography the description of each endpoint l Distributing the behavior among participants Op: r → s | r = Op s Op: r → s | s = Op r Op: r → s | r’ = 1 l X:T[C] | r = X[C|r] if r in T X:T[C] | r = 1 otherwise l X s {C} | r = X (r1,...,rn) {C|r 1,...,C|r n } if r=s, type(X)={r 1,...,r n } X s {C} | r = 1 otherwise l Other operators are projected homomorphically

Expected result l The traces of the projected system are included in the traces of the choreography –For all possible adaptations l Holds only for well formed choreographies and adaptations l Key challenge: ensuring that all the participants agree on where we are in the choreography –Which branch has been taken in a choice –Whether a given scope should be adapted or not –Which is the new code for a given scope –When one should stop executing the old code and start executing the new one l Semantics carefully crafted to ensure this

Adapting a scope, graphically X X→X→ X

X X→X→ X proj

Adapting a scope, graphically X X→X→ X X→X→ proj

Adapting a scope, graphically X X→X→ X X→X→ proj

And now the foggy part

Typing a concrete language l We see endpoint processes as protocol types for programs written in a more concrete language l A program will execute different sessions in interleaving –Ivan program will execute the ‘Working on adaptive session types’ session, the ‘Take care of family’ session,... l Each participant in each session follows a protocol –Obtained by projecting the corresponding choreography on the chosen participant l This ensures that the good properties of the protocols are reflected in the program –More troubles come from the interleaving of sessions

Adapting interleaved sessions l To adapt the code of a participant –All the protocols executed by the code should allow for the adaptation »They should all feature a scope with the given name –The adaptation may come from one of them or from outside l Adapting one participant requires to update the other participants too –May be involved in other protocols –More participants may need to be considered

Current state l This is a work in (very slow) progress l What we have –Syntax and semantics for choreographies and endpoints –Projection –A more serious example l What we have still to do –Correctness proof, concrete language, typing rules, correctness of typing

Introducing next talk l This work is very related to the work on adaptive choreographies presented in next talk –This work is at the level of types, the other one at the level of language –The other work only considers external updates –The other work is at a more advanced stage (currently submitted)

Future work l Complete the current work l Fully understand the interplay between interleaved sessions and adaptation l Refinement –This was our original motivation –Having internal updates motivated (also) by this

End of talk