1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.

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

Connectors and Concurrency joint work with Ugo Montanari Roberto Bruni Dipartimento di Informatica Università di Pisa Dagstuhl Seminar #04241, September.
Design of a biomolecular Device that executes process Algebra Urmi Majumder and John Reif Department of Computer Science Duke University DNA15, JUNE 10,
1 Programming Languages (CS 550) Lecture Summary Functional Programming and Operational Semantics for Scheme Jeremy R. Johnson.
On the Dynamics of PB Systems with Volatile Membranes Giorgio Delzanno* and Laurent Van Begin** * Università di Genova, Italy ** Universitè Libre de Bruxelles,
/ PSWLAB Efficient Decentralized Monitoring of Safety in Distributed System K Sen, A Vardhan, G Agha, G Rosu 20 th July 2007 Presented by.
1 Formal Models for Distributed Negotiations The 2PC in an Extended Pi-Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Course on Probabilistic Methods in Concurrency (Concurrent Languages for Probabilistic Asynchronous Communication) Lecture 1 The pi-calculus and the asynchronous.
1 Flexible Subtyping Relations for Component- Oriented Formalisms and their Verification David Hurzeler PhD Examination, 9/11/2004.
Dynamic Graph Transformation Systems Hernán Melgratti IMT Lucca Institute for Advance Studies Joint Work with Roberto Bruni Dipartimento di Informatica,
Petri net modeling of biological networks Claudine Chaouiya.
10. Petri Nets Prof. O. Nierstrasz. Roadmap  Definition: —places, transitions, inputs, outputs —firing enabled transitions  Modelling: —concurrency.
1 Nominal Calculi for Transactions: CJOIN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
Tiling Transactions in Rewriting Logic Roberto Bruni (Pisa/Illinois) José Meseguer (Illinois) Ugo Montanari (Pisa) WRLA 2002 Pisa, Italia, Sept.
1 Nominal Calculi for Transactions: JOIN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and Orchestration.
1 Ivan Lanese Computer Science Department University of Bologna Roberto Bruni Computer Science Department University of Pisa A mobile calculus with parametric.
1 Formal Models for Distributed Negotiations Description Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations Zero-Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Synchronization Algebras with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese.
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
1 Formal Models for Distributed Negotiations Workflows, BizTalk and ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Transactions in Linda Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 Formal Models for Distributed Negotiations Concurrent Languages Translation Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela.
Hernán Melgratti joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica - Università di Pisa Flat Committed Join in Join.
1 Formal Models for Distributed Negotiations Committed Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
1 GT-VC 2005, San Francisco, August 22, 2005 Ugo Montanari Università di Pisa Ivan Lanese Università di Pisa Hoare vs. Milner: Comparing Synchronizations.
1 Formal Models for Distributed Negotiations Petri Nets Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Formal Models for Distributed Negotiations Exercises Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
1 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari From Graph Rewriting to Logic Programming joint work with.
CS 536 Spring Code Generation II Lecture 21.
1 Mapping Fusion and Synchronized Hyperedge Replacement into Logic Programming joint work with Ugo Montanari Ivan Lanese Dipartimento di Informatica Università.
PML: Toward a High-Level Formal Language for Biological Systems Bor-Yuh Evan Chang and Manu Sridharan July 24, 2003.
1 Static vs dynamic SAGAs Ivan Lanese Computer Science Department University of Bologna/INRIA Italy.
1 Formal Models for Transactions: Zero Safe Nets Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
Pre-nets, (read arcs) and unfolding: A functorial presentation Paolo Baldan (Venezia) Roberto Bruni (Pisa/Illinois) Ugo Montanari (Pisa) WADT Frauenchiemsee,
1 Ivan Lanese Computer Science Department University of Bologna Italy Concurrent and located synchronizations in π-calculus.
1 CoMeta, final workshop, /12/2003 Ivan Lanese Dipartimento di Informatica Università di Pisa Ugo Montanari A graphical Fusion Calculus Joint work.
Translating Orc Features into Petri Nets and the Join Calculus Hernán Melgratti IMT Lucca Institute for Advance Studies Joint Work with Roberto Bruni and.
An algebra of Connectors for modeling CommUnity with Tiles joint work with Roberto Bruni Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan.
1 Formal Models for Transactions: BizTalk as ZSN Roberto Bruni Dipartimento di Informatica Università di Pisa Models and Languages for Coordination and.
1 Formal Models for Distributed Negotiations A Calculus of Compensations Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias.
Calculi for Committed Choices and Compensations Roberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with Gianluigi Ferrari Hernán.
Dipartimento di Informatica Università di Pisa Nested Commits for Mobile Calculi: Extending Join Roberto Bruni, Hernán Melgratti and Ugo Montanari.
1 Formal Models for Distributed Negotiations Introduction Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas.
Complete Axioms for Stateless Connectors joint work with Roberto Bruni and Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
Synchronizations with Mobility for Graph Transformations joint work with Ugo Montanari Dipartimento di Informatica Università di Pisa Ivan Lanese Dipartimento.
An Algebra for Composing Access Control Policies (2002) Author: PIERO BONATTI, SABRINA DE CAPITANI DI, PIERANGELA SAMARATI Presenter: Siqing Du Date:
C. Varela1 Chapter 5: Join Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
Dipartimento di Informatica Università di Pisa Alberto Baragatti, Roberto Bruni, Hernán Melgratti, Ugo Montanari and Giorgio Spagnolo Prototype Platforms.
Objects & Dynamic Dispatch CSE 413 Autumn Plan We’ve learned a great deal about functional and object-oriented programming Now,  Look at semantics.
© Kenneth C. Louden, Chapter 11 - Functional Programming, Part III: Theory Programming Languages: Principles and Practice, 2nd Ed. Kenneth C. Louden.
CSE 230 The -Calculus. Background Developed in 1930’s by Alonzo Church Studied in logic and computer science Test bed for procedural and functional PLs.
Formal Specification and Analysis of Software Architectures Using the Chemical Abstract Machine Model CS 5381 Juan C. González Authors: Paola Inverardi.
Runtime Organization (Chapter 6) 1 Course Overview PART I: overview material 1Introduction 2Language processors (tombstone diagrams, bootstrapping) 3Architecture.
A Component Platform for Experimenting with Autonomic Composition A component framework for supporting composition of autonomic services and bio-inspired.
A Theory of Distributed Objects Toward a Foundation for Component Grid Platforms Ludovic HENRIO l A Theory of Distributed Objects l Components l Perspectives.
Set-theoretical models of untyped -calculus Motivation for models: Better intuition about the formal theory. Consistency results follow by soundness. Completeness.
CS5205Semantics1 CS5205: Foundation in Programming Languages Semantics Static Semantics Dynamic Semantics Operational Semantics Big-step Small-Step Denotational.
Architectural Design Rewriting as Architectural Description Language R. Bruni A. LLuch-Lafuente U. Montanari E. Tuosto.
Types and Programming Languages Lecture 16 Simon Gay Department of Computing Science University of Glasgow 2006/07.
6/21/20161 Programming Languages and Compilers (CS 421) Reza Zamani Based in part on slides by Mattox Beckman,
Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. L03-1 September 14, 2006http:// -calculus: A Basis for.
Week 8 Computational Level
Rewriting Nested Graphs, through Term Graphs Roberto Bruni, Andrea Corradini, Fabio Gadducci Alberto Lluch Lafuente and Ugo Montanari Dipartimento di Informatica,
Concurrent Systems Modeling using Petri Nets – Part II
Lecture 15 (Notes by P. N. Hilfinger and R. Bodik)
Process Calculus.
COT 5611 Operating Systems Design Principles Spring 2012
Expressive Power of CCS
Presentation transcript:

1 Formal Models for Distributed Negotiations From Petri Nets to Join Calculus Roberto Bruni Dipartimento di Informatica Università di Pisa XVII Escuela de Ciencias Informaticas (ECI 2003), Buenos Aires, July

Formal Models for Distributed Negotiations2 Petri Net Flavors We have already seen that the basic net model can be extended in many ways To model interesting features e.g. read arcs To increase expressiveness e.g. inhibitor arcs Many other variations have been proposed in the literature (stochastic, priorities, time, …) We survey some of them, as incremental extensions (bottom-up), showing that they can also be recovered in the other way round (top-down) starting from a process calculus

Formal Models for Distributed Negotiations3 Basic Model: P/T Petri Nets ba cd 2 3 2

Formal Models for Distributed Negotiations4 Basic Model: P/T Petri Nets ba cd 2 3 2

Formal Models for Distributed Negotiations5 Colured Nets (also High-Level Nets) ba cd y y::y x  |y| x “s” x 6 structured data as tokens

Formal Models for Distributed Negotiations6 Coloured Nets (also High-Level Nets) ba cd y y::y x  |y| x x 6 structured data as tokens x=1 y=“s” “ss”

Formal Models for Distributed Negotiations7 Reconfigurable Nets ba xy y y x c d a x post-sets places depend on fetched values c network reconfigurability vs static connectivity

Formal Models for Distributed Negotiations8 Reconfigurable Nets ba xy y y x d a x post-sets places depend on fetched values network reconfigurability vs static connectivity x=c y=c c c c

Formal Models for Distributed Negotiations9 Dynamic Nets ba y c d a x firings can generate new net fragments c dynamic control N(x,y)

Formal Models for Distributed Negotiations10 From Petri Nets to Dynamic Nets and Back via JOIN The join-calculus is the natural higher order extension of Petri nets More and more restrictive type systems recover all kinds of nets we have seen [Buscemi, Sassone 2001] Dynamic nets (no restriction) Reconfigurable nets (no definitions inside definitions) High level nets (no channel names as messages) Place/Transition nets (no values in messages)

Formal Models for Distributed Negotiations11 JOIN-Calculus Well-known asynchronous calculus continuation passing style Distributed implementations JoCaml ( Polyphonic C# Analogous to dynamic coloured Petri nets Running implementation of Zero-Safe Nets CHAM semantics soup of molecules processes definitions

Formal Models for Distributed Negotiations12 Chemical Abstract Machine States are called solutions s Multisets of molecules m 1,…,m n data and rules (reflexive CHAM) Hierarchical structure via membranes Group solutions into molecules e.g. {[ s 1, {[ s 2 ]}, {[ s 3, {[ s 4 ]} ]} ]} Evolution (chemical rules) Heating / cooling  (reversible) Structural equivalence Reactions  Transitions Concurrency multiset union

Formal Models for Distributed Negotiations13 Background: the Join Calculus Syntax P,Q::=0 | x  ŷ  | def D in P | P|Q D,E::=J  P | D  E J,K::= x  ŷ  | J|K Operational semantics (CHAM Style) 0  P|Q  P,Q D  E  D,E def D in P  D  dn(D), P  dn(D) ( range  dn(D) “globally fresh”) J  P, J   J  P, P  heating and cooling reaction processes definitions patterns

Formal Models for Distributed Negotiations14 JOIN: An Example A process P P  z  x,z  | def x  y   z  y,x  in x  v  P as a solution {[ z  x,z , w  y   z  y,w , w  v  ]} A reaction {[ z  x,z , w  y   z  y,w , w  v  ]}  {[ z  x,z , w  y   z  y,w , z  v,w  ]} bound name extrusion defined name received name free name membrane

Formal Models for Distributed Negotiations15 Continuation Passing Style I The form of definitions resembles very much let f(x)=E in E’ (typical of functional programming) e.g. same scoping discipline Asynchrony forces us to create and send continuations in join e.g. encoding untyped -calculus [M] v sends the value of M on v a value is a process serving requests a request must supply two names x (channel for requests for the value of the argument) w (to eventually return a value)

Formal Models for Distributed Negotiations16 Continuation Passing Style II Call-by-name [x] v = v  x  [ x.M] v = def k  x,w   [M] w in v  k  [MN] v = def y  p   [N] p in def q  c   c  y,v  in [M] q Parallel call-by-value [MN] v = def q  c  |p  y   c  y,v  in [M] q |[N] p

Formal Models for Distributed Negotiations17 Example: Cell Abstraction def create  n,c   def get  k  | s  v   k  v  | s  v   set  m,k  | s  v   k  | s  m  in s  n  | c  get,set  A message to create triggers the outermost definition, which in turn defines three fresh names (get,set,s) with local rules and state: get / set are sent back on channel c for later access / update of cell contents; s cannot be extruded and remains local, it models the cell and its contents; the initial value stored in s is the parameter n in the message create; the rules guarantee the invariant of the cell: in every configuration there is exactly one message on s, (with its current value)

Formal Models for Distributed Negotiations18 Nets as Join Terms Roughly Places are channels Transitions are definitions Tokens are message values Nets are join processes Different classes of nets corresponds to different classes of terms Note that in general a definition can contain another definition A reduction will release fresh places and transitions Fresh transitions can release tokens in previously existing places, but they cannot fetch tokens from them

Formal Models for Distributed Negotiations19 Aim: To identify terms that correspond to P/T Petri nets Three kinds of judgements |- P :  P is ok and contains no def_in_ |- P :  P is ok |- D :  D is ok Type System  0 I

Formal Models for Distributed Negotiations20 Type System  0 II |- 0 :  |- x  :  |- P|Q :  |- P :  |- Q :  |- P :  |- P :  |- def D in P :  |- D :  |- P :  |- J  P :  |- P :  rn(J) = {  } |- D  D’ :  |- D :  |- D’ : 

Formal Models for Distributed Negotiations21 Type System  1 Aim: To identify terms that correspond to coloured Petri nets Three kinds of judgements (as before) Type environments needed Channels must be kept distinct from messages  set of channel names  set of messages  and  must be disjoint in  ;  |- P : 

Formal Models for Distributed Negotiations22 Type System  1 II  ;  |- 0 :   ;  |- P|Q :   ;  |- P :  ;  |- Q :   ;  |- P :   ;  |- P :   ;  |- def D in P :  ,dn(D);  |- D : ,dn(D);  |- P :   ;  |- J  P :   ; ,rn(J) |- P :   ;  |- D  D’ :   ;  |- D :  ;  |- D’ :   ;  |- x  y  :  y  x 

Formal Models for Distributed Negotiations23 Results  0 characterizes terms that correspond to P/T Petri nets  1 characterizes terms that correspond to Coloured nets A third type system  2 characterizes terms that correspond to reconfigurable nets A trivial type system  3 characterizes terms that correspond to dynamic nets All type systems Enjoy subject reduction Allow the definition of a behaviour preserving isomorphism between typeable terms and (the corresponding kind of) nets

Formal Models for Distributed Negotiations24 Recap We have seen Join calculus Different flavors of Petri nets Corresponding flavors of Join calculus

Formal Models for Distributed Negotiations25 References The reflexive chemical abstract machine and the Join calculus (Proc. POPL’96, ACM, pp ) C. Fournet, G. Gonthier High-level Petri nets as type theories in the Join-calculus (Proc. FoSSaCS’01, LNCS 2030, pp ) M. Buscemi, V. Sassone