Veri fi cation of Erlang-style Concurrency Emanuele DOsualdo , - - PowerPoint PPT Presentation

veri fi cation of erlang style concurrency
SMART_READER_LITE
LIVE PREVIEW

Veri fi cation of Erlang-style Concurrency Emanuele DOsualdo , - - PowerPoint PPT Presentation

Veri fi cation of Erlang-style Concurrency Emanuele DOsualdo , Jonathan Kochems and Luke Ong Department of Computer Science University of Oxford 11 September 2012 1 The goal Automatic Veri fi cation 1 The goal Automatic Veri fi cation of


slide-1
SLIDE 1

Verification of Erlang-style Concurrency

Emanuele D’Osualdo, Jonathan Kochems and Luke Ong

Department of Computer Science University of Oxford

11 September 2012

slide-2
SLIDE 2

The goal

1

Automatic Verification

slide-3
SLIDE 3

The goal

1

  • f

Automatic Verification

slide-4
SLIDE 4

The goal

1

  • f

Automatic Verification Properties

slide-5
SLIDE 5

The goal

1

  • f
  • f

Automatic Verification Properties

slide-6
SLIDE 6

The goal

1

  • f
  • f

Automatic Verification Properties Concurrent Systems

slide-7
SLIDE 7

The goal

1

  • f
  • f

Automatic Verification Properties Concurrent Systems based on Message Passing

slide-8
SLIDE 8

The goal

1

  • f
  • f

Automatic Verification Properties Concurrent Systems based on the Actor Model

slide-9
SLIDE 9

The goal

1

  • f
  • f

Automatic Verification Properties Erlang programs

functional sequential fragment dynamic process creation asynchronous message passing

slide-10
SLIDE 10

The goal

1

  • f
  • f

Effective Sound Approximation Properties Erlang programs

functional sequential fragment dynamic process creation asynchronous message passing

slide-11
SLIDE 11

The goal

1

  • f
  • f

Effective Sound Approximation Reachability Erlang programs

functional sequential fragment dynamic process creation asynchronous message passing

slide-12
SLIDE 12

Example: Erathostene’s sieve

2

Running Example: a concurrent version of Erathostene’s sieve Inspired by: Rob Pike. Concurrency and message passing in Newsqueak. Google Tech Talks, 2007.

slide-13
SLIDE 13

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✮ ❝❧✐❡♥t

slide-14
SLIDE 14

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✮ ❝❧✐❡♥t poke

slide-15
SLIDE 15

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✮ ❝❧✐❡♥t poke

slide-16
SLIDE 16

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✮ ❝❧✐❡♥t poke poke

slide-17
SLIDE 17

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✮ ❝❧✐❡♥t poke poke

slide-18
SLIDE 18

Example: Erathostene’s sieve

3

1 ❝♦✉♥t❡r✭◆✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❋r♦♠✦④❛♥s✱ ◆⑥✱

4

❝♦✉♥t❡r✭◆✰✶✮

5

❡♥❞✳

❝♦✉♥t❡r✭◆✰✶✮ ❝❧✐❡♥t poke N

slide-19
SLIDE 19

Example: Erathostene’s sieve

4

1 ♠❛✐♥✭✮ → 2

▼ ❂ s❡❧❢✭✮✱

3

❈ ❂ s♣❛✇♥✭❝♦✉♥t❡r✱❬✷❪✮✱

4

s♣❛✇♥✭s✐❡✈❡✱ ❬❈✱▼❪✮✳

❝♦✉♥t❡r✭✷✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

❙ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-20
SLIDE 20

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✷✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

❙ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-21
SLIDE 21

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✷✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-22
SLIDE 22

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✷✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-23
SLIDE 23

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

2

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-24
SLIDE 24

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

2

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-25
SLIDE 25

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

prime 2

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-26
SLIDE 26

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❈✱▼✮

2

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-27
SLIDE 27

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-28
SLIDE 28

Example: Erathostene’s sieve

4

1 s✐❡✈❡✭■♥✱ ❖✉t✮ → 2

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

3

r❡❝❡✐✈❡ ④❛♥s✱❳⑥ →

4

❖✉t✦④♣r✐♠❡✱❳⑥✱

5

❋ ❂ s♣❛✇♥✭❢✉♥✭✮→

6

❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮

7

❡♥❞✮✱

8

s✐❡✈❡✭❋✱❖✉t✮

9

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-29
SLIDE 29

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-30
SLIDE 30

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-31
SLIDE 31

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✸✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-32
SLIDE 32

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 3

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-33
SLIDE 33

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 3

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-34
SLIDE 34

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 3

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-35
SLIDE 35

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✶✱▼✮

2 3

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-36
SLIDE 36

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-37
SLIDE 37

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-38
SLIDE 38

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-39
SLIDE 39

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✹✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-40
SLIDE 40

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✺✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 4

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-41
SLIDE 41

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✺✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 poke

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-42
SLIDE 42

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✻✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 5

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-43
SLIDE 43

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✻✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 5

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-44
SLIDE 44

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✻✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 5

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-45
SLIDE 45

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✻✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✷✱▼✮

2 3 5

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-46
SLIDE 46

Example: Erathostene’s sieve

4

1 ❢✐❧t❡r✭❚❡st✱ ■♥✮ → 2

r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ →

3

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❋r♦♠✮

4

❡♥❞✳

5 6 ❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮ → 7

■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱

8

r❡❝❡✐✈❡ ④❛♥s✱❨⑥ →

9

❝❛s❡ ❚❡st✭❨✮ ♦❢

10

❢❛❧s❡ →

11

❖✉t✦④❛♥s✱❨⑥✱

12

❢✐❧t❡r✭❚❡st✱ ■♥✮❀

13

tr✉❡ →

14

❢✐❧t❡r✭❚❡st✱ ■♥✱ ❖✉t✮

15

❡♥❞

16

❡♥❞✳

❝♦✉♥t❡r✭✻✮

♠❛✐♥

▼ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷

s✐❡✈❡✭❋✸✱▼✮

2 3 5

❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸

slide-47
SLIDE 47

Erlang

5

Erlang: Pure functional sequential fragment Call-by-value Dynamically typed Higher Order Process creation: s♣❛✇♥ / s❡❧❢ Message passing: r❡❝❡✐✈❡ / send P ✦ ▼s❣ Send is asynchronous, receive is blocking Jim Larson. Erlang for concurrent programming. Communications of the ACM, 2009.

slide-48
SLIDE 48

Related Work

6

Bug-finding tools:

slide-49
SLIDE 49

Related Work

6

Bug-finding tools: Dialyzer (Lindahl&Sagonas) based on control-flow-analysis, success types and detection of wrong use of built-ins

slide-50
SLIDE 50

Related Work

6

Bug-finding tools: Dialyzer (Lindahl&Sagonas) based on control-flow-analysis, success types and detection of wrong use of built-ins QuickCheck (Arts et al.) / PropEr (Sagonas’ group) property-based testing

slide-51
SLIDE 51

Related Work

6

Bug-finding tools: Dialyzer (Lindahl&Sagonas) based on control-flow-analysis, success types and detection of wrong use of built-ins QuickCheck (Arts et al.) / PropEr (Sagonas’ group) property-based testing

slide-52
SLIDE 52

Related Work

7

Verification tools:

slide-53
SLIDE 53

Related Work

7

Verification tools: McErlang (Fredlund&Svensson) instrumented custom runtime which exhaustively explores (on-the-fly) all the execution paths. Parametrised by user-provided abstractions

slide-54
SLIDE 54

Related Work

7

Verification tools: McErlang (Fredlund&Svensson) instrumented custom runtime which exhaustively explores (on-the-fly) all the execution paths. Parametrised by user-provided abstractions Termination and soundness depend entirely on user params

slide-55
SLIDE 55

Related Work

7

Verification tools: McErlang (Fredlund&Svensson) instrumented custom runtime which exhaustively explores (on-the-fly) all the execution paths. Parametrised by user-provided abstractions Termination and soundness depend entirely on user params Abstract Model Checking (Huch) reduction of the operational semantics to a sound finite transition system via user-provided data-abstractions

slide-56
SLIDE 56

Related Work

7

Verification tools: McErlang (Fredlund&Svensson) instrumented custom runtime which exhaustively explores (on-the-fly) all the execution paths. Parametrised by user-provided abstractions Termination and soundness depend entirely on user params Abstract Model Checking (Huch) reduction of the operational semantics to a sound finite transition system via user-provided data-abstractions Applies to a very restricted fragment of Erlang

slide-57
SLIDE 57

Erlang

8

Goals: SAFETY PRECISION

slide-58
SLIDE 58

Erlang

8

Goals: SAFETY PRECISION

Prove safety

slide-59
SLIDE 59

Erlang

8

Goals: SAFETY PRECISION

Prove safety Infinite state abstract model

slide-60
SLIDE 60

Erlang

8

Goals: SAFETY PRECISION

Prove safety Infinite state abstract model Must abstract to be automatic!

slide-61
SLIDE 61

Why is it difficult to verify?

9

Sources of infinity in the state space: recursive function definitions higher order infinite domains of values message space is infinite unbounded dynamic processes creation mailboxes have unbounded capacity

slide-62
SLIDE 62

Why is it difficult to verify?

9

Sources of infinity in the state space: recursive function definitions CFA-like abs higher order CFA-like abs infinite domains of values CFA-like abs message space is infinite unbounded dynamic processes creation mailboxes have unbounded capacity

slide-63
SLIDE 63

Why is it difficult to verify?

9

Sources of infinity in the state space: recursive function definitions CFA-like abs higher order CFA-like abs infinite domains of values CFA-like abs message space is infinite CFA-like abs unbounded dynamic processes creation CFA-like abs mailboxes have unbounded capacity CFA-like abs Using methodology from Van Horn & Might. Abstracting Abstract Machines. ICFP, 2010.

slide-64
SLIDE 64

Why is it difficult to verify?

9

Sources of infinity in the state space: recursive function definitions CFA-like abs higher order CFA-like abs infinite domains of values CFA-like abs message space is infinite finite abs unbounded dynamic processes creation counter abs mailboxes have unbounded capacity counter abs

slide-65
SLIDE 65

Actor Communicating Systems

10

We define an abstract model: finite set of control states q finite set of messages ♠ finite set of pid-classes ι finite set of rules:

  • Seq. red.

ι: q

τ

− − − − → q′ Send ι: q

ι′!♠

− − − − − → q′ Receive ι: q

?♠

− − − − − → q′ Spawn ι: q

νι′.q′

− − − − − − − → q′′

slide-66
SLIDE 66

Actor Communicating Systems

10

We define an abstract model: finite set of control states q finite set of messages ♠ finite set of pid-classes ι finite set of rules:

  • Seq. red.

ι: q

τ

− − − − → q′ Send ι: q

ι′!♠

− − − − − → q′ Receive ι: q

?♠

− − − − − → q′ Spawn ι: q

νι′.q′

− − − − − − − → q′′ They are equivalent to Vector Addition Systems (VAS)

slide-67
SLIDE 67

Erlang and ACS mailboxes

11

Erlang

◗ → r❡❝❡✐✈❡ ❛ → ❆❀ ❜ → ❇❀ ❝ → ❈ ❡♥❞✳

◗ ③, ❜, ❛, ❛ ❇ ③, ❛, ❛ ◗ ❛ ❆ ◗ ❜ ❇ ◗ ❝ ❈ ◗ ❛ ❜ ❝ ③ ❇ ❛ ❜ ❝ ③ ❆ ❛ ❜ ❝ ③

slide-68
SLIDE 68

Erlang and ACS mailboxes

11

Erlang

◗ → r❡❝❡✐✈❡ ❛ → ❆❀ ❜ → ❇❀ ❝ → ❈ ❡♥❞✳

◗ ③, ❜, ❛, ❛ ❇ ③, ❛, ❛ ◗ ❛ ❆ ◗ ❜ ❇ ◗ ❝ ❈ ◗ ❛ ❜ ❝ ③ ❇ ❛ ❜ ❝ ③ ❆ ❛ ❜ ❝ ③ Finite State control + FIFFO queue is Turing Powerful

slide-69
SLIDE 69

Erlang and ACS mailboxes

11

Erlang

◗ → r❡❝❡✐✈❡ ❛ → ❆❀ ❜ → ❇❀ ❝ → ❈ ❡♥❞✳

◗ ③, ❜, ❛, ❛ ❇ ③, ❛, ❛ ACS ι: ◗

?❛

− − − − − → ❆ ι: ◗

?❜

− − − − − → ❇ ι: ◗

?❝

− − − − − → ❈ ◗ ❛ ❜ ❝ ③ ❇ ❛ ❜ ❝ ③ ❆ ❛ ❜ ❝ ③

slide-70
SLIDE 70

Erlang and ACS mailboxes

11

Erlang

◗ → r❡❝❡✐✈❡ ❛ → ❆❀ ❜ → ❇❀ ❝ → ❈ ❡♥❞✳

◗ ③, ❜, ❛, ❛ ❇ ③, ❛, ❛ ACS ι: ◗

?❛

− − − − − → ❆ ι: ◗

?❜

− − − − − → ❇ ι: ◗

?❝

− − − − − → ❈ ◗ ❛ ❜ ❝ ③ 2 1 1 ❇ ❛ ❜ ❝ ③ 2 1 ❆ ❛ ❜ ❝ ③ 1 1 1

slide-71
SLIDE 71

Erlang and ACS mailboxes

11

Erlang

◗ → r❡❝❡✐✈❡ ❛ → ❆❀ ❜ → ❇❀ ❝ → ❈ ❡♥❞✳

◗ ③, ❜, ❛, ❛ ❇ ③, ❛, ❛ ACS ι: ◗

?❛

− − − − − → ❆ ι: ◗

?❜

− − − − − → ❇ ι: ◗

?❝

− − − − − → ❈ ◗ ❛ ❜ ❝ ③ 2 1 1 ❇ ❛ ❜ ❝ ③ 2 1 ❆ ❛ ❜ ❝ ③ 1 1 1 ACS mailboxes over-approximate Erlang ones

slide-72
SLIDE 72

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

slide-73
SLIDE 73

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

  • 1

+1

  • Seq. reduction

ι1: q0

τ

− − − − → q1

slide-74
SLIDE 74

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

  • 1

+1 +1

Send ι1: q0

ι0 ! m1

− − − − − − − → q1

slide-75
SLIDE 75

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

  • 1

+1

  • 1

Receive ι1: q0

?m1

− − − − − → q1

slide-76
SLIDE 76

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

  • 1

+1 +1

Spawn ι1: q0

νι0.q0

− − − − − − → q1

slide-77
SLIDE 77

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

Interesting properties: Mutual Exclusion v(ι1, q1) < 2

slide-78
SLIDE 78

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

Interesting properties: Absence of error v(ι1, q1) = 0

slide-79
SLIDE 79

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

Interesting properties: Bound on mailbox

  • 0≤i≤k v(ι1, mi) ≤ B
slide-80
SLIDE 80

Underlying VAS

12

ι0 . . . . . . control states mailbox ι1 . . . . . . ιp . . . . . . pid-classes . . . . . . q0 m0 q1 m1 qn−1 mk−1 qn mk

Interesting properties: Coverability queries (Expspace-complete)

slide-81
SLIDE 81

Verification pathway

13

Our method:

1 (Core) Erlang code as source 2 A k-CFA-like analysis abstracts the control-flow 3 The analysis produces an ACS which soundly approximates the

program

4 Model-check the ACS with VAS coverability engine (BFC)

The analysis is parametric and can be tuned for accuracy.

slide-82
SLIDE 82

In the paper

14

What’s in the paper: A fully formal description of the parametric analysis Formal definition of ACS generation, with polynomial bounds

  • n size of the model

Formal proofs of soundness and termination A tool with some benchmarks (available as virtual machine and web-interface)

slide-83
SLIDE 83

Soter

15

ACS BFC model

Coverab. Query Elang module +prop. annot. Core Elang module erlc

Analysis Data Abs Msg Abs

bfc

Gen.

SAFE UNSAFE (ERROR)

Mailbox Abs Context Abs Simpl Phase 3 Phase 1 Phase 2

❤tt♣✿✴✴♠❥♦❧♥✐r✳❝s✳♦①✳❛❝✳✉❦✴s♦t❡r✴

slide-84
SLIDE 84

Future Work

16

Planned work includes support for full Erlang improve precision wrt:

  • process identities
  • stack behaviour

find ways to handle open systems

slide-85
SLIDE 85

Thanks!

❤tt♣✿✴✴♠❥♦❧♥✐r✳❝s✳♦①✳❛❝✳✉❦✴s♦t❡r✴