1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins,

Slides:



Advertisements
Similar presentations
CommUnity, Tiles and Connectors joint work with Roberto Bruni José Luiz Fiadeiro Antónia Lopes Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
Advertisements

1 Ivan Lanese Computer Science Department University of Bologna Italy Types for deadlock avoidance in SSCC.
1 Ivan Lanese Computer Science Department University of Bologna Italy Managing faults and compensations in SOCK Joint work with Claudio Guidi, Fabrizio.
1 Reversibility for Recoverability Ivan Lanese Computer Science Department FOCUS research group University of Bologna/INRIA Bologna, Italy.
ISBN Chapter 3 Describing Syntax and Semantics.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
Adding Organizations and Roles as Primitives to the JADE Framework NORMAS’08 Normative Multi Agent Systems, Matteo Baldoni 1, Valerio Genovese 1, Roberto.
1 Ivan Lanese Computer Science Department University of Bologna Italy On the Interplay between Fault Handling and Request-response Service Invocations.
1 Ivan Lanese Computer Science Department University of Bologna Italy Towards a Unifying Theory for Web Services Composition Manuel Mazzara Faculty of.
1 Ivan Lanese Computer Science Department University of Bologna Italy Exploiting user-definable synchronizations in graph transformation.
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.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy On the Expressive Power of Primitives for Compensation Handling Joint work with.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
1 Ivan Lanese Computer Science Department University of Bologna Italy Error Handling in Service Oriented Computing Joint work with Claudio Guidi, Fabrizio.
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 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 Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Error Handling: From Theory to Practice Joint work with Fabrizio Montesi italianaSoftware.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
1 Joint work with Claudio Antares Mezzina (INRIA), Jean-Bernard Stefani (INRIA) and Alan Schmitt (INRIA) Controlling Reversibility in Rhopi Ivan Lanese.
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
Operational Semantics Semantics with Applications Chapter 2 H. Nielson and F. Nielson
1 Programming SAGAs in SOCK Ivan Lanese Computer Science Department University of Bologna Italy Joint work with Gianluigi Zavattaro The SOCK saga.
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.
Describing Syntax and Semantics
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
1 Ivan Lanese Computer Science Department University of Bologna Italy Streaming Services in SSCC Joint work with Francisco Martins, Vasco Vasconcelos and.
1 Ivan Lanese Computer Science Department University of Bologna Italy Towards a Unifying Theory for Web Services Composition Manuel Mazzara Faculty of.
Complete Axioms for Stateless Connectors joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
SE-565 Software System Requirements More UML Diagrams.
Web Services Glossary Summary of Holger Lausen
Dynamic Choreographies Safe Runtime Updates of Distributed Applications Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint.
Architecture styles Pipes and filters Object-oriented design Implicit invocation Layering Repositories.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Towards Global and Local Types for Adaptation Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Joint work with Mario Bravetti,
Advanced Topics in SE Spring Process Algebra Hossein Hojjat Formal Methods Lab University of Tehran.
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Amending Choreographies Joint work with Fabrizio Montesi and Gianluigi Zavattaro.
1 Causal-Consistent Reversible Debugging Ivan Lanese Focus research group Computer Science and Engineering Department University of Bologna/INRIA Bologna,
Ivan Lanese Computer Science Department University of Bologna/INRIA Italy Causal-Consistent Reversibility in a Tuple-Based Language Joint work with Elena.
CS5204 – Operating Systems 1  -Calculus Reasoning about concurrency and communication (Part 1).
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
Mario Bravetti Department of Computer Science University of Bologna INRIA research team FOCUS Choreography Projection and.
Asynchronous Components with Futures: Semantics, Specification, and Proofs in a Theorem Prover Components (Distributed) Futures Formalisations (and proofs)
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
“Dynamic fault handling mechanisms for service-oriented applications” Fabrizio Montesi, Claudio Guidi, Ivan Lanese and Gianluigi Zavattaro Department of.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Programming Languages and Design Lecture 3 Semantic Specifications of Programming Languages Instructor: Li Ma Department of Computer Science Texas Southern.
ASPfun: A Distributed Object Calculus and its Formalization in Isabelle Work realized in collaboration with Florian Kammüller and Henry Sudhof (Technische.
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.
Weak Bisimilarity Coalgebraically Andrei Popescu Department of Computer Science University of Illinois.
2004 Hawaii Inter Conf Comp Sci1 Specifying and Proving Object- Oriented Programs Arthur C. Fleck Computer Science Department University of Iowa.
Properties as Processes : FORTE slide Properties as Processes: their Specification and Verification Joel Kelso and George Milne School of Computer.
Duminda WijesekeraSWSE 623: Introduction1 Introduction to Formal and Semi- formal Methods Based on A Specifier's Introduction to Formal Methods (J. Wing)
T. Gregory BandyInteraction Machines SeminarFebruary 21, Union College - Computer Science Graduate Program Interaction Machines Are they more.
Presented by: Belgi Amir Seminar in Distributed Algorithms Designing correct concurrent algorithms Spring 2013.
Francesco Tiezzi IMT Advanced Studies Lucca Causal-Consistent Reversibility in a Tuple-Based Distributed Language Joint work with Elena Giachino, Ivan.
Process Algebra (2IF45) Basic Process Algebra Dr. Suzana Andova.
1 Theoretical Foundations of Concurrency A formal study of concurrency enables: understanding the essential nature of concurrency reasoning about the behavior.
Types and Programming Languages Lecture 16 Simon Gay Department of Computing Science University of Glasgow 2006/07.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Web Service Modeling Ontology (WSMO)
Internet of Things A Process Calculus Approach
Presentation transcript:

1 Ivan Lanese Computer Science Department University of Bologna Italy Behavioural Theory for SSCC Joint work with Luis Cruz-Filipe, Francisco Martins, Antonio Ravara and Vasco Vasconcelos Univerisities of Lisbon, Portugal

Roadmap l SSCC l Behavioural theory l Program transformations l Conclusions

Roadmap l SSCC l Behavioural theory l Program transformations l Conclusions

Stream-based Service Centred Calculus l SSCC is a calculus for modelling services based on sessions and streams l One of the Sensoria core calculi –Follows the same thread of SCC and CaSPiS l SSCC provides operators for –Defining and invoking services –Describing conversations (sessions) between services –Orchestrating complex service systems

SSCC syntax P :: = P j Q ( ºa ) P 0 rec X : P X 9 > > > > = > > > > ; S t an d ar d opera t ors a ) P a ( P ¾ S erv i ces v : P ( x ) P ¾ C onversa t i ons s t ream P as f i n Q f ee d v : P f ( x ) : P 9 = ; O rc h es t ra t i on

SSCC services l Services are defined by their name a and their protocol P l Service definition and service invocation are symmetric l Invocations and definitions interact creating two session endpoints executing their respective protocols l Sessions are not available when programming –Only runtime construct a ) P j a ( Q ! ( ºr )( r B P j r C Q )

SSCC conversations l Sessions can exchange information via input and output l We can imagine to extend conversations with all the typical session constructs (e.g., choice) ( ºr )( r B v : P j r C ( x ) Q ) ! ( ºr )( r B P j r C Q [ v = x ])

Orchestrating SSCC services l We propose the stream construct –Induces a clear style of programming –Good tradeoff between expressive power and structured communication l P and Q are concurrently executing l f is a communication stream (i.e., a queue) from P to Q l P can feed values inside f (feed v.P’) –Non blocking –Values stored in the nearest stream l Q can read values from f (f(x).Q’) –Blocking –Reads from stream f s t ream P as f i n Q

A stream at work s t ream f ee d v : P as f = hi i n f ( x ) : Q ! s t ream P as f = h v i i n f ( x ) : Q ! s t ream P as f = hi i n Q [ v = x ]

Orchestrating 3 services l Invoke services a and b and use their results to invoke c s t ream ( a ( ( x ) f ee d x ) j ( b ( ( y ) f ee d y ) as f = hi i n f ( z ) : f ( w ) : c ( z : w : ( t ) f ee d t

Useful macros l Direct communications b * v : P, s t ream b ( v : f ee d ² as f i n f ( z ) : P b + ( x ) P, s t ream b ) ( z ) : f ee d z as f i n f ( x ) : P

Roadmap l SSCC l Behavioural theory l Program transformations l Conclusions

Why a behavioural theory? l To understand the relationships between the different operators l To be able to reason axiomatically on systems l To be able to prove the correctness of program transformations and optimizations

Which behavioural theory? l We consider the classic bisimilarity approach –Processes should be able to mimik each other labelled transitions l We have labels for session communications, service invocations, feeds, reads from stream, internal actions… l We choose full (substitution-closed) bisimilarity –Strong bisimilarity ~ f for more basic transformations –Weak bisimilarity ≈ f allows optimizations »Abstracts away internal actions ≈ ≡ '

A compositionality result l Strong and weak full bisimilarity are congruences –Capture the corresponding contextual equivalences –Axioms can be applied to subterms –Transformations can be applied to arbitrarily complex systems l The congruence result does not hold for strong/weak plain bisimilarity l We will present some useful axioms –We are not interested in a complete axiomatization

Structural congruence is a bisimulation r./ ( ºa ) P ´ ( ºa )( r./ P ) l Standard rules for parallel composition, restriction and recursion l Additional scope extension rules

Session axioms l Different sessions are independent l Terminated sessions can be garbage collected ( º r ) D [[ r. 0 ; r / 0 ]] » f D [[ 0 ; 0 ]] i f D d oesno t b i n d rr./ ( s./ Q j P ) » f s./ Q j r./ P i f s 6 = r

Stream axioms (1) l Stream = parallel composition + communication l Terminated streams can be garbage collected s t ream P as f i n Q » f P j Q i ff = 2 f n ( Q ) an d P d oesno t con t a i n f ee d s t ream 0 as f i n P » f P i ffd oesno t occur i n P s t ream P as f i n ( Q j Q 0 ) » f ( s t ream P as f i n Q ) j Q 0 i ff = 2 f n ( Q 0 )

Stream axioms (2) l Uncatched feeds are τ steps l Different streams are independent s t ream P as f i ns t ream P 0 as g i n Q » f s t ream P 0 as g i ns t ream P as f i n Q i ff 6 = g s t ream P as f i n 0 ¼ f P f f ee d v : Q ! Q g

Sessions vs streams l Feeds are unaffected by sessions l Session outputs are unaffected by streams l More in general r./ ( f ee d v j P ) » f f ee d v j r./ P s t ream v j P as f i n Q » f v j s t ream P as f i n Q r./ ( Q j P ) » f Q j r./ P i f Q con t a i nsnosess i on i npu t / ou t pu t s t ream R j P as f i n Q » f R j s t ream P as f i n Q i f R con t a i nsno f ee d s

Roadmap l SSCC l Behavioural theory l Program transformations l Conclusions

Object-oriented interaction pattern l UML sequence diagrams show the exchange of messages among components of a complex system… l …but have no session information

Session-oriented interaction pattern l There are two sessions: –r between A and B –s between B and C l There are local communications in B

The session-oriented pattern in SSCC l The pattern can be implemented in SSCC l Communications between different sessions in B exploit auxiliary services SC, ( º b ; c )( A j B j C ) A, b ( w : ( y ) P B, ( º b 1 ; b 2 )( B 1 j B 2 ) C, c ) ( x ) v : S B 1, b ) ( x ) b 1 * x : b 2 + ( y ) y : Q B 2, c ( b 1 + ( x ) x : ( y ) b 2 * y : R :

Optimization: using a subsession

The subsession pattern in SSCC l Now the SSCC implementation is: l A and C are as before l Two auxiliary communications have been eliminated l Two are still used E, b ) ( x )( º b 1 )( c ( x : ( y ) b 1 * y : R j b 1 + ( y ) y : Q ) SC 0, ( º b ; c )( A j E j C )

Is the program transformation correct? l The two diagrams can be proved full weak bisimilar l The proof exploits: –Standard coinductive techniques –Congruence –Some axioms (session independence, garbage collection) l Since full weak bisimilarity is a congruence the optimization can be applied in any context

Introducing streams l We can use a stream to avoid the remaining auxiliary communications l Correctness proof similar to the previous one SC 0, ( º b ; c )( A j G j C ) G, b ) ( x ) s t ream c ( x : ( y ) f ee d y : R as f i n f ( y ) : y : Q

Breaking sessions l Current technologies does not provide sessions –Only request and request/response primitives –Correspond to sessions with fixed protocol l Useful to break sessions in smaller pieces –A long session may correspond to a sequence of request/responses –Next request/response name sent as continuation l Arbitrary sessions can not be broken preserving the semantics –Correct for all sequential sessions –Sequentiality can be proved using a type system

Roadmap l SSCC l Behavioural theory l Program transformations l Conclusions

Conclusions l SSCC can model session-based communication patterns l Behavioural theory allows to work axiomatically on patterns l Complex program transformations can be specified and proved correct

Future work l On program transformations –Develop a methodology to drive the application of transformations –Apply to other case studies l On SSCC –Further understanding its behavioral theory –Add kill and compensation primitives l On types –Type systems for deadlock freedom –Type systems for termination

End of talk s t ream i van ( ques t i on : ( x ) : f ee d x as f i n f ( x ) : t h i n k