1 / 57

joint work with: José Meseguer (UIUC) Ugo Montanari (UNIPI) Vladimiro Sassone (COGS)

ICTCS 2003, Bertinoro (FC), 13-15 Ottobre 2003. Algebraic Theories for Contextual Pre-Nets Roberto Bruni - Dipartimento di Informatica, Università di Pisa. joint work with: José Meseguer (UIUC) Ugo Montanari (UNIPI) Vladimiro Sassone (COGS). Plan of the Talk. Introduction

kiaria
Download Presentation

joint work with: José Meseguer (UIUC) Ugo Montanari (UNIPI) Vladimiro Sassone (COGS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ICTCS 2003, Bertinoro (FC), 13-15 Ottobre 2003 Algebraic Theories for Contextual Pre-NetsRoberto Bruni - Dipartimento di Informatica, Università di Pisa joint work with: José Meseguer (UIUC) Ugo Montanari (UNIPI) Vladimiro Sassone (COGS)

  2. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  3. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  4. Petri Nets and Read Arcs • P/T Petri nets [Petri’62] • basic model of concurrency supported by a large community and by industrial-quality tools • a media for conveying ideas to non-expert thanks to a suggestive graphical presentation • Nets with read arcs • aka nets with test arcs, aka nets with activator arcs, aka contextual nets • model a non-destructive read operation • multiple concurrent readings of resources are possible • naïve encoding in P/T nets would serialize these accesses, with a dramatic loss of concurrency and efficiency Algebraic Theories for Contextual Pre-Nets

  5. Semantic Approaches • Petri nets • processes • causality and concurrency within a single run • unfolding • causality, concurrency and conflict between all possible events • algebraic • algebra of computations • logic • deduction theories • Contextual nets • processes • unfolding • (asymmetric conflict) • algebraic • molecules • tokens are not atomic entities • match-share • too many fictitious behaviours • logic Algebraic Theories for Contextual Pre-Nets

  6. Aim • Neat algebraic / logic characterization of the (monoidal) category of concurrent computation of contextual nets • Functorial construction • net morphisms are preserved • Universal construction • compositionality • Exploit PMEqtl theories • proofs simplified by PMEqtl techniques • Follow the individual token philosophy • more informative semantics • 1 + 4 = Pre-nets must be used Algebraic Theories for Contextual Pre-Nets

  7. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  8. Terminology and Notation • Places a,b,c,…classes of resources • Transitions t,t’,…basic activities • Tokens instances of a resource class • Markings u,v,w,…multisets of resources • Multiset union uw • Empty marking  • Places are unary markings a • Pre-sets tresources necessary to execute t • multiset fetched by the execution of t • Post-sets tresources produced by t • We write t:uv for t=u and t=v Algebraic Theories for Contextual Pre-Nets

  9. Formal Definition • A P/T Petri net is a graph N=(S,T,pre,post,u0) • Sis the set of markings • (is the free monoid over the set of places S) • (Nodes of the graph) • T is the set of transitions • (Arcs of the graph) • pre:T  S assigns pre-sets to transitions • pre(t) = t   • (Source map of the graph) • post:T  S assigns post-sets to transitions • post(t) = t • (Target map of the graph) • u0 is the initial marking Algebraic Theories for Contextual Pre-Nets

  10. Circles and Boxes a1 a2 • Circles are places • Boxes are transitions • Weighted arcs model pre- and post-sets • Bullets are tokens t1 t2 a3 2 2 2 uo=a1a2 t1:a12a3 t2:a2 2a3 t3:2a3a4 t3 a4 Algebraic Theories for Contextual Pre-Nets

  11. CTPh vs. ITPh • Collective Token Philosophy (CTPh) • Any two tokens in the same place are • indistinguishable one from the other • computationally equivalent • Individual Token Philosophy (ITPh) • Any token carries its own history • tokens have unique origins • fetching one token makes an activity causally dependent from the activities that produced it • such analysis can be important for recovery purposes, detecting intrusions, increase parallelism, … Algebraic Theories for Contextual Pre-Nets

  12. CTPh vs. ITPh: Graphically a1 a2 a1 a2 t1 t2 t1 t2 a3 a3 2 2 2 2 2 2 t3 t3 a4 a4 Algebraic Theories for Contextual Pre-Nets

  13. CTPh vs. ITPh: Graphically a1 a2 a1 a2 t1 t2 t1 t2 a3 a3 2 2 2 2 2 2 e1 e2 t3 t3 a4 a4 Algebraic Theories for Contextual Pre-Nets

  14. CTPh vs. ITPh: Graphically a1 a2 a1 a2 t1 t2 t1 t2 a3 a3 2 2 2 2 2 2 e1 e2 t3 t3 e’3 e’’3 a4 a4 Algebraic Theories for Contextual Pre-Nets

  15. CTPh vs. ITPh: Graphically a1 a2 a1 a2 t1 t2 t1 t2 a3 a3 2 2 2 2 2 2 e1 e2 t3 t3 e’3 e’’3 a4 a4 Algebraic Theories for Contextual Pre-Nets

  16. uS t:uvT [idle] [firing] u:uNu t:uNv commutative associative unit :N :uNv :u’Nv’ [parallel composition] :uu’Nvv’ :uNv :vNw monoid homomorphism identities u:uNu [sequential composition] ;:uNw Petri Nets are Monoids • Proof terms denote CTPh computations: • commutative processes Algebraic Theories for Contextual Pre-Nets

  17. ITPh and Pre-Nets • T(.) : Petri  CMonCat • CTPh, functorial, universal, expressed in PMEqtl • P(.), DP(.), Q(.) : Petri  SMonCat • ITPh, non functorial • Pre-Net RN as implementation of N [BMMS99] • pre- and post-sets are strings, not multisets • for each t:uv, one implementation tp,q:pq, with p,qS (p)=u and (q)=v • Z(.) : PreNets  SMonCat • ITPh, functorial, universal, expressed in PMEqtl • all pre-nets implementations of N have the same semantics Algebraic Theories for Contextual Pre-Nets

  18. pS p,qS t:pqT [idle] [firing] [symmetry] p:pRp p,q:pqRqp t:pRq commutative associative unit :R :pRq :p’Rq’ [parallel composition] :pp’Rqq’ :pRq :qRr monoid homomorphism identities p:pRp [sequential composition] ;:pRr Pre-Nets are Monoids • Proof terms denote ITPh computations: • concatenable processes Algebraic Theories for Contextual Pre-Nets

  19. Example a1 a2 p0=a1a2 (t1t2) ; (t3t3) = (t1;t3)  (t2;t3) t1 t2 a3 a3 a3 a3 t3 t3 Algebraic Theories for Contextual Pre-Nets

  20. Example a1 a2 p0=a1a2 (t1t2) ; (a3a3,a3a3) ; (t3t3) t1 t2 a3 a3 a3 a3 t3 t3 Algebraic Theories for Contextual Pre-Nets

  21. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  22. Nets with Read Arcs • Graphically rendered as undirected arcs • Equivalent to self-loops from the point of view of reachability • Allow more parallelism • Ex. readL and readR can fire concurrently! u0=aLbaR (aLreadR) ; (readLcR)  (readLaR) ; (cLreadR) aL aR b readL readR we need syntax to write readL(?)readR cL cR Algebraic Theories for Contextual Pre-Nets

  23. Molecules, Atoms, Electrons • token a • context [a] • Non free monoid of places [Mes96] • a = {a|0} and {a|n} = {a|n+1}[a] • Molecules for CTPh and ITPh [BM01] • Two monoid homomorphisms: (.)+ and (.)- • (uv)+ = (u)+  (v)+ and ()+ =  • (uv)- = (u)-  (v)- and ()- =  • Suitable laws • u = (u)+  (u)- • ((u)+)- = ((u)-)+ = (u)- • ((u)-)- =  • (u)k = ((u)+ …)+ • (u)0 = u and (u)1 = (u)+ and (u)k+1 = ((u)k)+ • atom a • nucleus (a)k • electron (a)- Algebraic Theories for Contextual Pre-Nets

  24. Example u0=aLbaR readL  b2  readR = (readLb+aR) ; (cLb+readR) = (aLb+readR) ; (readLb+cR) b+ aL aR b- readL readR Drawback: Tokens are not atomic entities cL cR Algebraic Theories for Contextual Pre-Nets

  25. Match-Share Categories • Match-Share categories [GM98] • symmetric monoidal categories, plus • with suitable axioms • p,p;p = p and p;p,p = p • (pp);p = (pp);p and p;(pp) = p;(pp) •  =  and  =  • pq = (pq,pq);(pq) and pq = (p q);(pp,qq) • p;p = (pp);(pp) • p;p = p pS pS [match] [share] p:ppRp p:pRpp commutativity associativity monoidality { MAIN AXIOMS { Algebraic Theories for Contextual Pre-Nets

  26. Match-Share Graphically a b a a a a,b a a b a a a a a a a,a a a a a a = a a a Algebraic Theories for Contextual Pre-Nets

  27. Match-Share Graphically a b a a a a,b a a b a a a a a a a a a a a a a a = a a a a a a Algebraic Theories for Contextual Pre-Nets

  28. Match-Share Graphically a b a a a a,b a a b a a a a a a a a a = a a a Algebraic Theories for Contextual Pre-Nets

  29. Match-Share Graphically a b a a a a,b a a b a a a a a a a a a a a a a a = a a a = a a a a a a a a a a a a Algebraic Theories for Contextual Pre-Nets

  30. Transitions as Arrows aL b b aR b b readL readR b b cL b b cR Algebraic Theories for Contextual Pre-Nets

  31. Example aL b aR readL cL b aR readR cL b cR Algebraic Theories for Contextual Pre-Nets

  32. Example aL b aR readL cL b aR readR cL b cR Algebraic Theories for Contextual Pre-Nets

  33. Example aL b aR readL cL aR readR cL b cR Algebraic Theories for Contextual Pre-Nets

  34. Example aL b aR readL cL aR readR cL b cR Algebraic Theories for Contextual Pre-Nets

  35. Example aL b aR readL cL aR readR cL b cR Algebraic Theories for Contextual Pre-Nets

  36. Example aL b aR readL readR cL b cR Algebraic Theories for Contextual Pre-Nets

  37. Example aL b aR readR readL cL b cR Algebraic Theories for Contextual Pre-Nets

  38. Example aL b aR readR • S(R) free SMonCat • distinguishes too much • MS(R) free MSCat • too many arrows • E(R) : S(R)  MS(R) • E(a) = a • E(t:uwv) = (uw) ; (tw) ; (vw) • Drawback: • is MS(R) meaningful? readL cL b cR Algebraic Theories for Contextual Pre-Nets

  39. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  40. PMEqtl • Partial Membership Equational Logic • convenient definition of theories for nets and their computations • subsort for regarding objects as idle steps • partiality of sequential composition • membership predicates for selecting admissible behaviours • tensor product of theories for MonCat • efficiently supported by Maude 2.0 • proof of freeness follows by PMEqtl results • adjunctions proved by existence of theory morphisms Algebraic Theories for Contextual Pre-Nets

  41. MON fth MON is sort Monoid . op e : Monoid . op __ : Monoid Monoid -> Monoid [assoc id:e] . endfth Algebraic Theories for Contextual Pre-Nets

  42. CAT fth CAT is sorts Object Arrow . subsort Object < Arrow . ops d(_) c(_) : Arrow -> Object . op _;_ . var a : Object . vars f g h : Arrow . eq d(a) = a . eq c(a) = a . ceq a;f = f if d(f)=a . ceq f;a = f if c(f)=a . cmb f;g : Arrow if c(f)=d(g) . ceq d(f;g) = d(f) if c(f)=d(g) . ceq c(f;g) = c(g) if c(f)=d(g) . ceq f;(g;h) = (f;g);h if c(f)=d(g) and c(g)=d(h) . endfth Algebraic Theories for Contextual Pre-Nets

  43. SMONCAT fth SMONCAT is including MONCAT . op (_,_) : Object Object -> Arrow . vars a a’ b b’ c : Object . vars f f’ : Arrow . eq d((a,b)) = ab . eq c((a,b)) = ba . eq (a,e) = a . eq (e,a) = a . eq (ab,c) = (a(b,c)) ; ((a,c)b) . eq (a,b);(b,a) = ab . ceq (ff’);(b,b’) = (a,a’);(f’f) if d(f)=a and d(f’)=a’ and c(f)=b and c(f’)=b’ . endfth Algebraic Theories for Contextual Pre-Nets

  44. MSCAT fth MSCAT is including SMONCAT . ops (_)(_) : Object -> Arrow . vars a b : Object . eq d((a)) = aa .eq d((a)) = a . eq c((a)) = a . eq c((a)) = aa . eq (e) = e . eq (e) = e . eq (a,a);(a) = (a) . eq (a);(a,a) = (a) . eq (ab) = (a(b,a)b);((a)(b)) . eq (ab) = ((a)(b));(a(a,b)b) . eq ((a)a);(a) = (a(a));(a) . eq (a);((a)a) = (a);(a(a)) . eq (a);(a) = a . eq (a);(a) = (a(a));((a)a). endfth Algebraic Theories for Contextual Pre-Nets

  45. Plan of the Talk • Introduction • P/T Petri nets and pre-nets • Read arcs, molecules and match-share • Partial membership equational logic • Algebraic theories • Final remarks and conclusions Algebraic Theories for Contextual Pre-Nets

  46. RAUT (Read-Automata) fth RAUT is including MON . sort Rtrans . subsort Monoid < Rtrans . ops pre(_) post(_) ctx(_) : Rtrans -> Monoid . var u : Monoid . eq pre(u) = e . eq post(u) = e . eq ctx(u) = u . endfth Algebraic Theories for Contextual Pre-Nets

  47. markings idle+transitions RCOMP (Read-Computation) E(MS(R)) fth RCOMP is including MSCAT . sort Rtrans Rarrow . subsort Object < Rtrans < Rarrow < Arrow . ops pre(_) post(_) ctx(_) : Rtrans -> Object . op mk(_) : Rtrans -> Arrow vars h k : Rarrow . var t : Rtrans . vars u v : Object . mb hk : Rarrow . mb (u,v) : Rarrow . cmb h;k : Rarrow if c(h)=d(k) . eq d(t) = pre(t)ctx(t) . eq c(t) = post(t)ctx(t) . eq pre(u) = e . eq post(u) = e . eq ctx(u) = u . eq d(mk(t)) = d(t) . eq c(mk(t)) = c(t) . eq mk(u) = u . eq t = (pre(t)(ctx(t)));(mk(t)ctx(t));(post(t)(ctx(t))) . endfth MS(R) self-loop version Rarrow is symmetric monoidal relation between t and its self-loop version Algebraic Theories for Contextual Pre-Nets

  48. t and mk(t) b b a b b t c b b b b Algebraic Theories for Contextual Pre-Nets

  49. t and mk(t) b b a b b b mk(t) b c b b b b Algebraic Theories for Contextual Pre-Nets

  50. t and mk(t) b b a b b b mk(t) b c b b b b Algebraic Theories for Contextual Pre-Nets

More Related