Relating BIP and Reo K. Dokter 1 S.-S.T.Q. Jongmans 1 F. Arbab 1 S. - - PowerPoint PPT Presentation

relating bip and reo
SMART_READER_LITE
LIVE PREVIEW

Relating BIP and Reo K. Dokter 1 S.-S.T.Q. Jongmans 1 F. Arbab 1 S. - - PowerPoint PPT Presentation

Relating BIP and Reo K. Dokter 1 S.-S.T.Q. Jongmans 1 F. Arbab 1 S. Bliudze 2 1 Centrum Wiskunde & Informatica, Amsterdam, Netherlands 2 Ecole Polytechnique F ed erale de Lausanne, Lausanne, Switzerland ICE 2015 Simple


slide-1
SLIDE 1

Relating BIP and Reo

  • K. Dokter1

S.-S.T.Q. Jongmans1

  • F. Arbab1
  • S. Bliudze2

1Centrum Wiskunde & Informatica,

Amsterdam, Netherlands

Ecole Polytechnique F´ ed´ erale de Lausanne, Lausanne, Switzerland

ICE 2015

slide-2
SLIDE 2

Simple producer-consumer example

public static void Producer1(Port b) { b.put("Hello "); } public static void Producer2(Port c) { c.put("ICE!"); } public static void Consumer(Port a) { String s1 = a.get(); String s2 = a.get(); System.out.println(s1 + s2); }

slide-3
SLIDE 3

Simple producer-consumer example

C P1 P2 a b c Coordination model

slide-4
SLIDE 4

Simple producer-consumer example in Reo and BIP

C P1 P2 a b c Reo connector

  • C

B P1 P2 a b c a’ b’ c’ Interaction model

slide-5
SLIDE 5

Simple producer-consumer example in Reo and BIP

C P1 P2 a b c Reo connector

  • C

B P1 P2 a b c a’ b’ c’ BIP architecture

slide-6
SLIDE 6

Simple producer-consumer example in Reo and BIP

C P1 P2 a b c Reo connector A {a, b, c} {a} C P1 P2 a b c a’ b’ c’ BIP architecture A γ = {{a, a′}, {b, b′, c, c′}} {a′, b′, c′} {a′}

slide-7
SLIDE 7

Formal models of Reo and BIP

Definition A port automaton is a tuple A = (Q, N, →, q0), where

1 Q is a set of states; 2 N is a finite set of ports; 3 → ⊆ Q × 2N × Q is a transition relation; 4 q0 ∈ Q is the initial state.

Definition A BIP architecture is a tuple A = ({B1, . . . , Bn}, P, γ), where

1 B = {B1, . . . , Bn} is a set of coordinating components; 2 P is a set of ports; 3 γ ⊆ 2P is the interaction model.

such that PBi ∩ PBj = ∅, for all 1 ≤ i < j ≤ n.

slide-8
SLIDE 8

Interpretation of Reo and BIP

Let Reo be the class of all port automata; and BIP be the class of all BIP architectures; and LTS be the class of all labeled transition systems with labels in 2P, for some finite set of ports P. We need to find the interpretations f and g in Reo BIP LTS f g

slide-9
SLIDE 9

Interpretation of Reo connectors

C P1 P2 a b c Reo connector {a, b, c} {a}

The Reo connector restricts possible synchronizations of ports in its domain (independent of the components connected to them). f : Reo → LTS f (A) = A

slide-10
SLIDE 10

Interpretation of BIP architectures

Definition (Architecture application) If A = (B, P, γ) is a BIP architecture and C a set of components, such that S = (B ∪ C, P ∪ PC, γ) is a BIP architecture without dangling ports, then the application A(C) of A to C is the labeled transition system over 2P∪PC that describes the behaviour of whole system S. g : BIP → LTS g(A) = ∃PC : A({DA}) where DA is a dummy component for A: a single state transition systems with a transition for every non-empty subset of dangling ports of A; and ∃PC hides ports from coordinating components.

slide-11
SLIDE 11

Our task

Let Reo be the class of all port automata; let BIP be the class of all BIP architectures; and let LTS be the class of all labeled transition systems with labels in 2P, for some finite set of ports P. Reo BIP LTS f g bip reo

slide-12
SLIDE 12

Translating Reo to BIP

C P1 P2 a b c Reo connector A {a, b, c} {a} C P1 P2 a b c a’ b’ c’ BIP architecture A γ = {{a, a′}, {b, b′, c, c′}} {a′, b′, c′} {a′}

Let A be a port automaton over ports N. Let A be A with p replaced by p′, for all ports p of A. Let γ be the closure under set union of {∅} ∪ {{p, p′} | p ∈ N}. Then, bip(A) = ({A}, N ∪ N ′, γ), with N ′ = {p′ | p ∈ N}.

slide-13
SLIDE 13

Translating BIP to Reo

C P1 P2 a b c a’ b’ c’ BIP architecture A γ = {{a, a′}, {b, b′, c, c′}} {a′, b′, c′} {a′} C P1 P2 a b c a’ b’ c’ {b, b′, c, c′} {a, a′} {a′, b′, c′} {a′}

Let A = (B, P, γ) be a BIP architecture. Transform the interaction model into a port automaton Aγ. Compose Aγ with the coordinating components Bi ∈ B, using composition (⋊ ⋉) of port automata. Hide all ports of the coordinating components Bi ∈ B. Let reo(A) be the resulting port automaton.

slide-14
SLIDE 14

Main result

Reo BIP LTS f g bip reo Theorem We have g(bip(A)) ∼ = f (A) and f (reo(A)) ∼ = g(A), for all port automata A with q ∅ − → q′ iff q′ = q and all BIP architectures A with qi

− →i q′

i implies q′ i = qi, for all coordinating

components Bi of A.

slide-15
SLIDE 15

Application to model checking

Reo BIP LTS f g bip reo Corollary bip and reo preserve all properties closed under bisimulation, i.e., f (A) ∈ P ⇔ g(bip(A)) ∈ P and g(A) ∈ P ⇔ f (reo(A)) ∈ P, for all P ⊆ LTS closed under bisimulation, and all port automata A with q ∅ − → q′ iff q′ = q and all BIP architectures A with qi

− →i q′

i

implies q′

i = qi, for all coordinating components Bi of A.

slide-16
SLIDE 16

Data sensitive models

Reo introduces data by adding guards g to the label of a transition q N − → q′. These guards relate the data observed at the ports in N. BIP introduces data by extending each interaction {a1, . . . , an} ∈ γ with

a guard expression, that checks whether the data presented at the ai is eligible for synchronization; an upward data transfer function, that calculates a vector x from the data obtained from the ports ai; a downward data transfer function, that outputs data at the ai, based upon the value of x.

Labels of coordinating components (which are just interactions) are also enriched with data.

slide-17
SLIDE 17

Compositionality

Theorem We have g(bip(A1 ⋊ ⋉ A2)) ∼ = g(reo(A1) ⋊ ⋉ reo(A2)) and f (reo(A1 ⊕ A2)) ∼ = f (reo(A1) ⋊ ⋉ reo(A2)) for all BIP architectures Ai = (Ci, Pi, γi), with

1 q ∅

− → q′ ⇒ q′ = q, for all coordinating components B ∈ Ci;

2 PC1 ∩ P2 = PC2 ∩ P1 = ∅; and 3 ∅ ∈ γ1 ∩ γ2.

and for all port automata Ai = (Qi, Ni, →i, q0,i), with qi

− →i q′

i ⇔ q′ i = qi, for all i = 1, 2;

slide-18
SLIDE 18

What can we learn?

Commonalities: exogeneous coordination; multi-party synchronization. Differences: stateless vs. stateful coordination; composition of port automata versus architecture application and composition of BIP architectures; independent progress of silent transitions.