Relating and Visualising CSP , VCR and Structural Traces Neil Brown - - PowerPoint PPT Presentation

relating and visualising csp vcr and structural traces
SMART_READER_LITE
LIVE PREVIEW

Relating and Visualising CSP , VCR and Structural Traces Neil Brown - - PowerPoint PPT Presentation

Relating and Visualising CSP , VCR and Structural Traces Neil Brown 1 Marc Smith 2 1 Computing Laboratory, University of Kent, UK 2 Department of Computer Science, Vassar College, NY, USA 2 November 2009 Motivation Dining Philosophers


slide-1
SLIDE 1

Relating and Visualising CSP , VCR and Structural Traces

Neil Brown1 Marc Smith2

1Computing Laboratory, University of Kent, UK 2Department of Computer Science, Vassar College, NY, USA

2 November 2009

slide-2
SLIDE 2

Motivation

Dining Philosophers

slide-3
SLIDE 3

Motivation

Starving Dining Philosophers

slide-4
SLIDE 4

Background

Visualization: Strings and Beads

Consider the CSP system: P ||

{a,f}

Q where P = a → b → c → f → SKIP Q = a → d → e → f → SKIP

a b d f c e P Q

slide-5
SLIDE 5

Background

Visualization: Strings and Beads

Consider the CSP system: P ||

{a,f}

Q where P = a → b → c → f → SKIP Q = a → d → e → f → SKIP

a b d f c e P Q

slide-6
SLIDE 6

Background

Visualization: Strings and Beads

Consider the CSP system: P ||

{a,f}

Q where P = a → b → c → f → SKIP Q = a → d → e → f → SKIP

a b d f c e P Q

slide-7
SLIDE 7

Background

Visualization: Strings and Beads

Consider the CSP system: P ||

{a,f}

Q where P = a → b → c → f → SKIP Q = a → d → e → f → SKIP

a b d f c e P Q

slide-8
SLIDE 8

Background

CSP Observer

slide-9
SLIDE 9

Background

CSP Observer

slide-10
SLIDE 10

Background

CSP Observer

a b d f c e P Q a b d f c e P Q a b d f c e P Q a b d f c e P Q

a, b, c, d, e, f a, b, d, c, e, f a, b, d, e, c, f a, d, b, c, e, f a, d, e, b, c, f a, d, b, e, c, f

slide-11
SLIDE 11

Background

VCR Observer(s)

slide-12
SLIDE 12

Background

VCR Observer(s)

a b d f c e P Q a b d f c e P Q a b d f c e P Q a b d f c e P Q

{a}, {b, d}, {c, e}, {f} {a}, {b}, {c, d}, {e}, {f} {a}, {d}, {b, e}, {c}, {f}

slide-13
SLIDE 13

Background

Structural Observers

slide-14
SLIDE 14

Background

Structural Observers

a b d f c e P Q a b d f c e P Q a b d f c e P Q a b d f c e P Q

(a → b → c → f) || (a → d → e → f)

slide-15
SLIDE 15

Background

Traces

Three types of traces:

1 CSP traces

A sequence of individual events, recorded by the observer; events observed simultaneously are interleaved abstracts away time and space

2 VCR Traces

A sequence of event multisets; multiple observers account for different views preserves time independence; abstracts away space

3 Structural Traces

Sequential and parallel composition of the trace reflects the program’s structure preserves time independence and space

slide-16
SLIDE 16

Background

Space and Mobility

logger c

slide-17
SLIDE 17

Background

Space and Mobility

logger c logger!42 logger?42

slide-18
SLIDE 18

Background

Space and Mobility

logger c logger!42

  • > c!logger

logger?42 c?logger

slide-19
SLIDE 19

Background

Space and Mobility

logger c logger!42

  • > c!logger

logger?42

  • > logger?43

c?logger

  • > logger!43
slide-20
SLIDE 20

Background

Space and Mobility

logger c logger!42

  • > c!logger

logger?42

  • > logger?43

c?logger

  • > logger!43

(logger!42 → c!logger) || (c?logger → logger!43) || (logger?42 → logger?43)

slide-21
SLIDE 21

Conversion

Conversion Example

CSP: P = (AB o

9 AB) ||

{b}

(b → b → SKIP) where AB = (a → SKIP) ||| (b → SKIP)

slide-22
SLIDE 22

Conversion

Conversion Example

CSP: P = (AB o

9 AB) ||

{b}

(b → b → SKIP) where AB = (a → SKIP) ||| (b → SKIP) Structural Trace Visualisation:

a b a b b b

slide-23
SLIDE 23

Conversion

Conversion Example

CSP: P = (AB o

9 AB) ||

{b}

(b → b → SKIP) where AB = (a → SKIP) ||| (b → SKIP) Structural Trace Conversion Algorithm:

a b a b b b

slide-24
SLIDE 24

Conversion

Conversion Example

Structural Trace Conversion Algorithm:

a b a b b b

VCR Trace Visualisation:

a b a b

slide-25
SLIDE 25

Conversion

Conversion Example

VCR Trace Visualisation:

a b a b

slide-26
SLIDE 26

Conversion

Conversion Example

VCR Trace Visualisation:

a b a b

CSP Trace Visualisation:

a b a b b a a b a b b a b a b a

slide-27
SLIDE 27

Example

Starving CHP Philosophers

slide-28
SLIDE 28

Example

Starving CHP Philosophers Trace

philosopher eatChicken = forever (syncBarrier eatChicken) chef a b c = forever ((syncBarrier a <&> syncBarrier b) <-> (syncBarrier b <&> syncBarrier c) <-> (syncBarrier a <&> syncBarrier c))

slide-29
SLIDE 29

Example

Starving CHP Philosophers Trace

philosopher eatChicken = forever (syncBarrier eatChicken) chef a b c = forever ((syncBarrier a <&> syncBarrier b) <-> (syncBarrier b <&> syncBarrier c) <-> (syncBarrier a <&> syncBarrier c))

chicken.0 chicken.1 chicken.2 ... (Chef) chicken.0 chicken.0 chicken.2 chicken.2 chicken.2

slide-30
SLIDE 30

Summary

Summary

Traces are useful for diagnostics and observing run-time behaviour Structural traces

Most straightforward and efficient to record Useful for observing mobility

Conversion algorithms

One Structural trace converts to many VCR traces One VCR trace converts to many CSP traces

Visualisation

Graphs to represent CSP , VCR and Structural traces Tool support will be beneficial

slide-31
SLIDE 31

Future Work

Tools to Explore Traces

prefix delta succ b c a numbers recorder d 42*(b? -> (c! || d!)) || (42*(b! -> a?) -> b!) || 42*(c! -> a?)

slide-32
SLIDE 32

Future Work

Tools to Explore Traces

prefix delta succ b c a numbers recorder d 42*(b? -> (c! || d!))

slide-33
SLIDE 33

Future Work

Challenge: Structural traces and UTP

a c b a c d b d e a g f c

Figure: Concatenation, quotient and healthiness conditions

slide-34
SLIDE 34

Future Work

Questions?

Practical demo of traces for testing – tonight at the fringe