340 likes | 532 Views
Coalgebraic Symbolic Semantics. Filippo Bonchi Ugo Montanari. Many formalisms modelling Interactive Systems. Algebras - Syntax Coalgebras - Semantics Bialgebras – Semantics of the composite system in terms of the semantics of the components
E N D
Coalgebraic Symbolic Semantics Filippo Bonchi Ugo Montanari
Many formalisms modelling Interactive Systems Algebras - Syntax Coalgebras - Semantics Bialgebras – Semantics of the composite system in terms of the semantics of the components (compositionality of final semantics) CCS [Turi, Plotkin – LICS 97] Pi-calculus [Fiore, Turi – LICS 01] [Ferrari, Montanari, Tuosto – TCS 05] Fusion Calculus [Ferrari et al. – CALCO 05][Miculan – MFPS 08]
… in many interesting cases, this does not work… Mobile Ambient [Hausmann, Mossakowski, Schröder – TCS 2006] Formalisms with asynchronous message passing Petri Nets …
Plan of the Talk • Compositionality • Saturated Semantics • Symbolic Semantics • Saturated Coalgebras • Normalized Coalgebras Bonchi, Montanari – FOSSACS 08 As running example, we will use Petri nets
Petri Nets P is a set of places T is a set of transitions Pre:TP Post:TP l:TL is a labelling p c 2 p p B c q d a marking is a multiset over P i i p The semantics is quite intuitive pc qcB Given a set A, A is the set of all multisets over A, e.g., for A={a,b} ,then A={,{a},{b},{aa},{bb},{ab} ,{aab}…}
Open Petri Nets Petri net + interface Interface=(Input Places, Output Places) Output Place Input Places Input Places $ b interface a a b Closed Place
Petri Nets Contexts Petri nets + Inner interfaces + Outer Interface Outer Interface a c a c c $ $ $ $ c c b b b Inner Interface c a c a a a a a a a a b b b
3 3 3 $ $ $ Bisimilarity is not a congruence $ $ 3 5 c e a a d f c c x x x c c c a They are bisimilar c e c They are not c a cx C$$$ ex e$$$ f
Plan of the Talk • Compositionality • Saturated Semantics • Symbolic Semantics • Saturated Coalgebras • Normalized Coalgebras As running example, we will use Petri nets
Saturated Bisimilarity A relation R is a saturated bisimulation iff whenever pRq, then C[-] • If C[p]→p’ then q’ s.t. C[q]→q’ and p’Rq’ • If C[q]→q’ then p’ s.t. C[p]→p’ and p’Rq’ l l l l THM: it is always the largest bisimulation congruence
Saturated Transition System C[-] C[-] is a context lis a label p q l C[p] q l
Saturated Semantics for Open Nets At any moment of their execution a token can be inserted into an input place and one can be removed from an output place -$ -$ -$ $ +$ +$ +$ +$ +$ +$ +$ +$ $ $$ $$$ $ b +a +a +a +a b a a b a a$ a$$ a$$$ a +$ +$ a a +a b b$ b$$ b aa
$ I have 5$ and I need 6 b Running Examples I have 1$ and I need 1 b 5 b $ The activation a is free. The service b costs 1$. c a d b $ The activation a costs 5$. The service b is free. a a b b i b h 3 The activation a costs 3$. The service b is free for 3 times and then it costs 1$. e a f b g b THEY ARE ALL DIFFERENT
Running Examples $ $ $ $ IS IT DIFFERENT FROM ALL THE PREVIOUS??? b $ b b $ a b a b p b o a a a a b b 3 b i b h 3 m l a b n b e a f b g b a q b This behaves as a or e: either the activation a is free and the service b costs 1$. Or the activation costs 3$ and then for 3 times the service is free and then it costs 1$. The activation a is free. The service b costs 1$.
Plan of the Talk • Compositionality • Saturated Semantics • Symbolic Semantics • Saturated Coalgebras • Normalized Coalgebras As running example, we will use Petri nets
Symbolic Transition System C[-] C[-] is a context lis a label p q l C[p] q l intuitivelyC[-] is “the smallest context” that allows such transition
$ Symbolic Transition System e 5 b b $ a a b 3$ $ b c a d b f b $ 5$ b b c d a b a a b b i b h 3 g e a f b g b a a h b $ a i b
Symbolic Semantics a symbolic LTS + a set of deduction rules l’ p,q l l D[p] E[q] p q m n l m$ n$ In our running example
Inference relation Given a symbolic transition system and a set of deduction rules, we can infer other transitions C’[-] C[-] l’ l p q’ p q
Inference relation $ a b b l m n $$$ a a a b b$$$ l m$ n$ n $ a a b$ n
Bisimilarity over the Symbolic TS is too strict b $ $ $ b b $ b b p b o a a b 3 m l a b n b 3$ l m n o b b a q b a a a a b $ q p b
Plan of the Talk • Compositionality • Saturated Semantics • Symbolic Semantics • Saturated Coalgebras • Normalized Coalgebras As running example, we will use Petri nets
Category of interfaces and contexts • Objects are interfaces • Arrows are contexts Functors from C to Set are algebras for Г(C) SetCAlgГ(C) for our nets One object: {$} Arrows: -$n: {$}{$}
Saturated Transition System as a coalgebra C[-] Ordinary LTS having as labels ||C|| and Λ F:SetSetF(X)=(||C||ΛX) We lift F to F: AlgГ(C) AlgГ(C) (saturated transition system as a bialgebra) p q l
Adding the Inference Relation An F-Coalgebra is a pair (X, :XF(X)) The set of deduction rules induces an ordering on||C||ΛX $$$ a n $ b$$$ a X b$ n a b a
Saturated Coalgebras • A set in(||C||ΛX) is saturated in X if it is closed wrt S: AlgГ(C) AlgГ(C) the carrier set of S(X) is the set of all saturated sets of transitions • E.g: the saturated transition system is always an S-coalgebra X
Saturated Coalgebras THM: Saturated Coalgebras are not bialgebras THM: CoalgS is a covariety of CoalgF CoalgF 1F 1S CoalgS
Redundant Transitions Saturated Set … … … … … … X partial order ||C||ΛX, Given a set A in(||C||ΛX), a transition is redundant if it is not minimal
Normalized Set Saturated Set Normalization Saturation … … … … … … X Normalized Set partial order ||C||ΛX, A set in(||C||ΛX) is normalized if it contains only NOT redundant transitions
Normalized Coalgebras N: AlgГ(C) AlgГ(C) the carrier set of N(X) is the set of all normalized sets of transitions For h:XY, the definition of N(h) is peculiar … … … … … … X y … … … … This is redundant ||C||ΛX, ||C||ΛY,
Running Example b $ $ $ b b $ l m n o a b b b b a b p b o a a b 3 q p m l a b n b 3$ a q b a a 3$ a $ b$ b$$ b$$$ b b b b
Isomorphism Theorem CoalgF Proof: Saturation and Normalization are two natural isomorphisms between S and N CoalgS Saturation Normalization CoalgN
Conclusions • Bisimilarity of Normalized Colagebras coincides with Saturated Bisimilarity • Minimal Symbolic Automata • Symbolic Minimization Algorithm [Bonchi, Montanari - ESOP 09] • Coalgebraic Semantics for several formalisms (asynchronous PC, Ambients, Open nets …) • Normalized Coalgebras are not Bialgebras