veri fi cation of erlang style concurrency
play

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


  1. Veri fi cation of Erlang-style Concurrency Emanuele D’Osualdo , Jonathan Kochems and Luke Ong Department of Computer Science University of Oxford 11 September 2012

  2. 1 The goal Automatic Veri fi cation

  3. 1 The goal Automatic Veri fi cation of

  4. 1 The goal Automatic Veri fi cation of Properties

  5. 1 The goal Automatic Veri fi cation of Properties of

  6. 1 The goal Automatic Veri fi cation of Properties of Concurrent Systems

  7. 1 The goal Automatic Veri fi cation of Properties of Concurrent Systems based on Message Passing

  8. 1 The goal Automatic Veri fi cation of Properties of Concurrent Systems based on the Actor Model

  9. 1 The goal Automatic Veri fi cation of Properties of Erlang programs functional sequential fragment dynamic process creation asynchronous message passing

  10. 1 The goal E ff ective Sound Approximation of Properties of Erlang programs functional sequential fragment dynamic process creation asynchronous message passing

  11. 1 The goal E ff ective Sound Approximation of Reachability of Erlang programs functional sequential fragment dynamic process creation asynchronous message passing

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

  13. ❝❧✐❡♥t 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✮ 1 ❝♦✉♥t❡r✭◆✮ → r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5

  14. 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✮ 1 ❝♦✉♥t❡r✭◆✮ → r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ poke 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5 ❝❧✐❡♥t

  15. 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✮ poke 1 ❝♦✉♥t❡r✭◆✮ → r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5 ❝❧✐❡♥t

  16. 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✮ poke 1 ❝♦✉♥t❡r✭◆✮ → r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ poke 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5 ❝❧✐❡♥t

  17. 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✮ poke 1 ❝♦✉♥t❡r✭◆✮ → poke r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5 ❝❧✐❡♥t

  18. 3 Example: Erathostene’s sieve ❝♦✉♥t❡r✭◆✰✶✮ 1 ❝♦✉♥t❡r✭◆✮ → poke r❡❝❡✐✈❡ ④♣♦❦❡✱ ❋r♦♠⑥ → 2 ❋r♦♠✦④❛♥s✱ ◆⑥✱ N 3 ❝♦✉♥t❡r✭◆✰✶✮ 4 ❡♥❞✳ 5 ❝❧✐❡♥t

  19. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✷✮ 1 ♠❛✐♥✭✮ → ▼ ❂ s❡❧❢✭✮✱ 2 ❈ ❂ s♣❛✇♥✭❝♦✉♥t❡r✱❬✷❪✮✱ 3 s♣❛✇♥✭s✐❡✈❡✱ ❬❈✱▼❪✮✳ 4 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  20. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✷✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  21. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✷✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 poke r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  22. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✷✮ poke 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  23. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  24. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 2 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ ▼

  25. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ prime 2 ♠❛✐♥ ▼

  26. ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❈✱▼✮ ❙ ♠❛✐♥ 2 ▼

  27. ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❋✶✱▼✮ ❙ ♠❛✐♥ 2 ▼

  28. ❢✐❧t❡r✭❞✐✈❴❜②✭✸✮✳✳ ❋✷ ❢✐❧t❡r✭❞✐✈❴❜②✭✺✮✳✳ ❋✸ 4 Example: Erathostene’s sieve ❈ ❝♦✉♥t❡r✭✸✮ ❢✐❧t❡r✭❞✐✈❴❜②✭✷✮✳✳ ❋✶ 1 s✐❡✈❡✭■♥✱ ❖✉t✮ → ■♥✦④♣♦❦❡✱ s❡❧❢✭✮⑥✱ 2 r❡❝❡✐✈❡ ④❛♥s✱❳⑥ → 3 ❖✉t✦④♣r✐♠❡✱❳⑥✱ 4 poke ❋ ❂ s♣❛✇♥✭❢✉♥✭✮ → 5 ❢✐❧t❡r✭❞✐✈❴❜②✭❳✮✱ ■♥✮ 6 ❡♥❞✮✱ 7 s✐❡✈❡✭❋✱❖✉t✮ 8 ❡♥❞✳ 9 s✐❡✈❡✭❋✶✱▼✮ ❙ ♠❛✐♥ 2 ▼

Recommend


More recommend