& Probabilistic Graph Transformation 2 Christian Krause - - PowerPoint PPT Presentation

probabilistic graph transformation 2 christian krause
SMART_READER_LITE
LIVE PREVIEW

& Probabilistic Graph Transformation 2 Christian Krause - - PowerPoint PPT Presentation

Dataflow Analysis in Reo Probabilistic Graph Transformation Dataflow Analysis in Reo 1 & Probabilistic Graph Transformation 2 Christian Krause Fachgebiet Systemanalyse und Modellierung Hasso Plattner Institut (HPI), Universit at Potsdam


slide-1
SLIDE 1

Dataflow Analysis in Reo Probabilistic Graph Transformation

Dataflow Analysis in Reo1 & Probabilistic Graph Transformation2

Christian Krause

Fachgebiet Systemanalyse und Modellierung Hasso Plattner Institut (HPI), Universit¨ at Potsdam

1with N. Kokash & E.P

. de Vink

2with H. Giese

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 1 of 16

slide-2
SLIDE 2

Dataflow Analysis in Reo Probabilistic Graph Transformation

Outline

Dataflow Analysis in Reo Probabilistic Graph Transformation

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 1 of 16

slide-3
SLIDE 3

Dataflow Analysis in Reo Probabilistic Graph Transformation

Outline

Dataflow Analysis in Reo Probabilistic Graph Transformation

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 1 of 16

slide-4
SLIDE 4

Dataflow Analysis in Reo Probabilistic Graph Transformation

Reo Overview

  • Reo is a formal channel-based coordination language with an

Eclipse-based toolset (ECT) developed at the CWI Amsterdam.

Figure : Formalization of business process models in Reo

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 2 of 16

slide-5
SLIDE 5

Dataflow Analysis in Reo Probabilistic Graph Transformation

Channel-Based Coordination with Reo

  • Channels are primitive components that have exactly two ends.
  • Two types of ends: source ends and sink ends.
  • Channels define constraints for the dataflow at their ends.

Figure : Common channels in Reo.

  • Ends are joint together to form source, sink or mixed nodes.
  • Source nodes behave as replicators, sink nodes as mergers.
  • Node and channels together form connectors.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 3 of 16

slide-6
SLIDE 6

Dataflow Analysis in Reo Probabilistic Graph Transformation

Constraint Automata: A Formal Semantics for Reo

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 4 of 16

slide-7
SLIDE 7

Dataflow Analysis in Reo Probabilistic Graph Transformation

  • mCRL2 is a behavioral specification language and toolset.
  • Based on process algebra ACP extended with data, time.

Idea

  • Analyze dataflow in Reo connectors by encoding them into

mCRL2 and applying model checking.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 5 of 16

slide-8
SLIDE 8

Dataflow Analysis in Reo Probabilistic Graph Transformation

  • mCRL2 is a behavioral specification language and toolset.
  • Based on process algebra ACP extended with data, time.

Idea

  • Analyze dataflow in Reo connectors by encoding them into

mCRL2 and applying model checking.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 5 of 16

slide-9
SLIDE 9

Dataflow Analysis in Reo Probabilistic Graph Transformation

mCRL2 Encoding of Reo – In a Nutshell

Sync = sum d:Data.A(d)|B(d).Sync; LossySync = sum d:Data.(A(d)+A(d)|B(d)).LossySync; SyncDrain = sum d1,d2:Data.A(d1)|B(d2).SyncDrain; AsyncDrain = sum d:Data.(A(d)+B(d)).AsyncDrain; sort DataFIFO1 = struct empty?isEmpty | full(item:Data)?isFull; FIFO1(f:DataFIFO1) = sum d:Data. (isEmpty(f)->A(d).FIFO1(full(d)) <> B(item(f)).FIFO1(empty)); Filter = sum d:Data.(expr(d)->A(d)|B(d)<>A(d)).Filter Transform = sum d:Data.(A(d)|B(expr(d))).Transform . . .

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 6 of 16

slide-10
SLIDE 10

Dataflow Analysis in Reo Probabilistic Graph Transformation

Results & Conclusions

  • Encoding is formally shown to be correct and compositional.
  • Tooling: generating mCRL2 code from graphical Reo model.
  • Support for data- and context-denpendencies, and time.
  • Automatic verification of liveness, safety and security properties.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 7 of 16

slide-11
SLIDE 11

Dataflow Analysis in Reo Probabilistic Graph Transformation

Outline

Dataflow Analysis in Reo Probabilistic Graph Transformation

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 7 of 16

slide-12
SLIDE 12

Dataflow Analysis in Reo Probabilistic Graph Transformation

Motivation

Graph Transformation Systems (GTSs). . .

  • . . . are a visual formalism for modeling and analyzing structural

and functional aspects of, e.g., distributed and mobile systems.

Probabilistic Behavior. . .

  • . . . is needed to quantify the likelihood of random events, e.g.,

message losses in unreliable media.

  • . . . in the form of randomization is used for protocol design, e.g.:
  • randomized distributed algorithms: randomized leader election

protocol, randomized Byzantine agreement protocol

  • communication and multimedia protocols: Bluetooth device

discovery, IEEE 802.11 Wireless LAN, IPv4 Zeroconf protocol

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 8 of 16

slide-13
SLIDE 13

Dataflow Analysis in Reo Probabilistic Graph Transformation

Motivation

Graph Transformation Systems (GTSs). . .

  • . . . are a visual formalism for modeling and analyzing structural

and functional aspects of, e.g., distributed and mobile systems.

Probabilistic Behavior. . .

  • . . . is needed to quantify the likelihood of random events, e.g.,

message losses in unreliable media.

  • . . . in the form of randomization is used for protocol design, e.g.:
  • randomized distributed algorithms: randomized leader election

protocol, randomized Byzantine agreement protocol

  • communication and multimedia protocols: Bluetooth device

discovery, IEEE 802.11 Wireless LAN, IPv4 Zeroconf protocol

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 8 of 16

slide-14
SLIDE 14

Dataflow Analysis in Reo Probabilistic Graph Transformation

Motivation

Our Goal

  • Extend the graph transformation theory with probabilistic behavior

⇒ Probabilistic Graph Transformation Systems.

  • Combination of probabilistic and nondeterministic behavior required.

Example: Probabilistic Broadcasting in Wireless Sensor Networks (WSNs)

  • Gossiping protocol: every node decides

with a given probability whether it forwards a received message to its neighbors or not.

  • Assumption: decision whether to forward a

message is probabilistic; the order of the message sending is nondeterministic.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 9 of 16

slide-15
SLIDE 15

Dataflow Analysis in Reo Probabilistic Graph Transformation

Motivation

Our Goal

  • Extend the graph transformation theory with probabilistic behavior

⇒ Probabilistic Graph Transformation Systems.

  • Combination of probabilistic and nondeterministic behavior required.

Example: Probabilistic Broadcasting in Wireless Sensor Networks (WSNs)

  • Gossiping protocol: every node decides

with a given probability whether it forwards a received message to its neighbors or not.

  • Assumption: decision whether to forward a

message is probabilistic; the order of the message sending is nondeterministic.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 9 of 16

slide-16
SLIDE 16

Dataflow Analysis in Reo Probabilistic Graph Transformation

Probabilistic vs. Nondeterministic Behavior

Probabilistic Behavior

  • Discrete probabilistic choices to quantify random and

unlikely behavior, e.g., the chance of a message loss.

Nondeterministic Behavior

  • Nondeterministic behavior in the case of incomplete

knowledge, e.g., to ensure implementation freedom.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 10 of 16

slide-17
SLIDE 17

Dataflow Analysis in Reo Probabilistic Graph Transformation

Probabilistic vs. Nondeterministic Behavior

Probabilistic Behavior

  • Discrete probabilistic choices to quantify random and

unlikely behavior, e.g., the chance of a message loss. ⇒ predictable average or long-run behavior

Nondeterministic Behavior

  • Nondeterministic behavior in the case of incomplete

knowledge, e.g., to ensure implementation freedom. ⇒ completely unpredictable behavior

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 10 of 16

slide-18
SLIDE 18

Dataflow Analysis in Reo Probabilistic Graph Transformation

Probabilistic vs. Nondeterministic Behavior

Probabilistic Behavior

  • Discrete probabilistic choices to quantify random and

unlikely behavior, e.g., the chance of a message loss. ⇒ predictable average or long-run behavior ⇒ calculate probabilities & expected values

Nondeterministic Behavior

  • Nondeterministic behavior in the case of incomplete

knowledge, e.g., to ensure implementation freedom. ⇒ completely unpredictable behavior ⇒ worst case vs. best case scenarios

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 10 of 16

slide-19
SLIDE 19

Dataflow Analysis in Reo Probabilistic Graph Transformation

Probabilistic Graph Transformation Systems

Definition (Probabilistic Rule)

A probabilistic rule π = L, P, µ consists of a typed graph L (the LHS), a finite non-empty set of basic rules P =

  • pi = L

ℓi

← − Ki

ri

− → Ri

  • ,

and a discrete probability distribution µ ∈ Dist(P).

Informal Semantics

1) Find a match for L in graph N. 2) Randomly choose an RHS based on µ. 3) Transform N based on this RHS. L R1 Rn K1 Kn . . . µ(p1) µ(pn) . . .

Definition (Probabilistic Graph Transformation System)

A PGTS G = T, Ginit, Π consists of a type graph T, an initial graph Ginit typed over T, and a set of probabilistic rules Π typed over T.

Proposition

A PGTS induces a Markov Decision Process (MDP).

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 11 of 16

slide-20
SLIDE 20

Dataflow Analysis in Reo Probabilistic Graph Transformation

Probabilistic Graph Transformation Systems

Definition (Probabilistic Rule)

A probabilistic rule π = L, P, µ consists of a typed graph L (the LHS), a finite non-empty set of basic rules P =

  • pi = L

ℓi

← − Ki

ri

− → Ri

  • ,

and a discrete probability distribution µ ∈ Dist(P).

Informal Semantics

1) Find a match for L in graph N. 2) Randomly choose an RHS based on µ. 3) Transform N based on this RHS. L R1 Rn K1 Kn . . . µ(p1) µ(pn) . . .

Definition (Probabilistic Graph Transformation System)

A PGTS G = T, Ginit, Π consists of a type graph T, an initial graph Ginit typed over T, and a set of probabilistic rules Π typed over T.

Proposition

A PGTS induces a Markov Decision Process (MDP).

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 11 of 16

slide-21
SLIDE 21

Dataflow Analysis in Reo Probabilistic Graph Transformation

Modeling WSNs with PGTSs

Figure : Probabilistic rules for WSNs modeled in Henshin.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 12 of 16

slide-22
SLIDE 22

Dataflow Analysis in Reo Probabilistic Graph Transformation

Quantitative Analysis with PRISM

PCTL Model Checking

For the 3 × 3 grid network and a send probability of p = 0.7 we check:

  • P>0.3(♦ received(8)): the probability that node 8

receives the message is greater than 0.3.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) p=0.6 p=0.7 p=0.8 Nodes (and their distance to node 1 in hopes) Minimum / maximum probabilities

Figure : Minimum / maximum probabilities for message receptions.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 13 of 16

slide-23
SLIDE 23

Dataflow Analysis in Reo Probabilistic Graph Transformation

Quantitative Analysis with PRISM

PCTL Model Checking

For the 3 × 3 grid network and a send probability of p = 0.7 we check:

  • P>0.3(♦ received(8)): the probability that node 8

receives the message is greater than 0.3.

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) p=0.6 p=0.7 p=0.8 Nodes (and their distance to node 1 in hopes) Minimum / maximum probabilities

Figure : Minimum / maximum probabilities for message receptions.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 13 of 16

slide-24
SLIDE 24

Dataflow Analysis in Reo Probabilistic Graph Transformation

Quantitative Analysis with PRISM

PCTL Model Checking

For the 3 × 3 grid network and a send probability of p = 0.7 we check:

  • P>0.3(♦≤10 received(9)): the probability that node 9 receives the

message in at most 10 steps is greater than 0.3. χ

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 2 3 4 5 6 7 8 9 10 Execution step n 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Minimum / maximum probabilities Send probability p

(1) (2)

Figure : Minimum / maximum probabilities for message reception of node 9.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 14 of 16

slide-25
SLIDE 25

Dataflow Analysis in Reo Probabilistic Graph Transformation

Quantitative Analysis with PRISM

PCTL Model Checking

For the 3 × 3 grid network and a send probability of p = 0.7 we check:

  • P>0.3(♦≤10 received(9)): the probability that node 9 receives the

message in at most 10 steps is greater than 0.3. χ

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 1 2 3 4 5 6 7 8 9 10 Execution step n 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 Minimum / maximum probabilities Send probability p

(1) (2)

Figure : Minimum / maximum probabilities for message reception of node 9.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 14 of 16

slide-26
SLIDE 26

Dataflow Analysis in Reo Probabilistic Graph Transformation

Quantitative Analysis with PRISM

Analyzing different network topologies: xxxxxx

1 2 3 4 6 5 8 7 9 2 3 8 5 4 6 7 9

10

1 2 3 5 4 6 1 9 8 7

10 11

(a) (b) (c)

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (2) 7 (3) 8 (3) 9 (4) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (2) 5 (2) 6 (3) 7 (3) 8 (4) 9 (4) 10 (5) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 2 (1) 3 (1) 4 (1) 5 (1) 6 (2) 7 (3) 8 (3) 9 (4) 10 (4) 11 (4)

Network (b) Network (c) Network (d)

Minimum / maximum probabilities Nodes (and their distance to node 1 in hops)

Figure : Minimum / maximum probabilities for message reception for p = 0.7.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 15 of 16

slide-27
SLIDE 27

Dataflow Analysis in Reo Probabilistic Graph Transformation

Conclusions and Future Work

Conclusions

  • PGTSs enable the modeling and analysis of combined

probabilistic and nondeterministic behavior in GTSs.

  • Clear separation between the protocol and the network structure.
  • Enables analysis for different network topologies, protocol

variants, and with dynamic structural changes.

Future Work

  • Exploit abstraction and compositionality for more efficient analysis.
  • Incorporate timed behavior.
  • Application to different protocols and self-organizing networks.

Christian Krause: Dataflow Analysis in Reo & Probabilistic Graph Transformation Slide 16 of 16