Johannes Hölzl TU München, Germany Formalising Semantics for Expected Running Time of Probabilistic Programs (Rough Diamond)
Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ Denotational: Operational: Correspondence: Denotational 2 clarified semantics – different proofs – fixed proofs • Coupon Collector • Simple Random Walk • Examples: Operational pgcl stream measure pgcl • Probabilistic programs (pGCL) + expected running time. 0 0 pgcl • Two semantics: This Talk
Denotational: Operational: Correspondence: Denotational 2 stream measure clarified semantics – different proofs – fixed proofs • Coupon Collector • Simple Random Walk • Examples: Operational pgcl pgcl • Probabilistic programs (pGCL) + expected running time. 0 0 pgcl • Two semantics: ⋆ This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016]
Denotational: Operational: Correspondence: Denotational 2 stream measure clarified semantics – different proofs – fixed proofs • Coupon Collector • Simple Random Walk • Examples: Operational pgcl pgcl • Probabilistic programs (pGCL) + expected running time. 0 0 pgcl • Two semantics: This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆
Denotational: Operational: Correspondence: Denotational 2 stream measure clarified semantics – different proofs – fixed proofs • Coupon Collector • Simple Random Walk • Examples: Operational pgcl pgcl • Probabilistic programs (pGCL) + expected running time. 0 0 pgcl • Two semantics: This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆
Operational: Correspondence: Denotational 2 pgcl clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Simple Random Walk • Examples: Operational stream measure pgcl • Probabilistic programs (pGCL) + expected running time. This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0
Correspondence: Denotational 2 • Probabilistic programs (pGCL) + expected running time. clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Simple Random Walk • Examples: Operational stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ
2 • Probabilistic programs (pGCL) + expected running time. clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Simple Random Walk • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational
2 • Probabilistic programs (pGCL) + expected running time. clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Simple Random Walk • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational
2 • Probabilistic programs (pGCL) + expected running time. clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational • Simple Random Walk
2 • Probabilistic programs (pGCL) + expected running time. – different proofs – fixed proofs • Two semantics: clarified semantics • Coupon Collector • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational • Simple Random Walk
2 • Probabilistic programs (pGCL) + expected running time. – fixed proofs • Two semantics: clarified semantics – different proofs • Coupon Collector • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational • Simple Random Walk
2 • Probabilistic programs (pGCL) + expected running time. clarified semantics – different proofs – fixed proofs • Two semantics: • Coupon Collector • Examples: stream measure This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆ ( ) ( ) Denotational: σ pgcl ⇒ σ ⇒ R ≥ 0 ⇒ σ ⇒ R ≥ 0 ( ) ( ) Operational: σ pgcl × σ ⇒ σ pgcl × σ Correspondence: Denotational ⇔ Operational • Simple Random Walk
x x p 1 p 2 p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 3 bool Assign pmf expr or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥
x x p 1 p 2 p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 3 bool Assign pmf expr or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ |
x x p 1 p 2 p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 3 bool pmf Assign expr or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | |
p 1 p 2 p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 3 bool or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | | x : ∼ D x := expr | ” Assign ( σ ⇒ σ pmf )”
p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 3 bool or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | | x : ∼ D x := expr | ” Assign ( σ ⇒ σ pmf )” p 1 ; p 2 |
ITE g p 1 p 2 g WHILE g DO p 3 or bool Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | | x : ∼ D x := expr | ” Assign ( σ ⇒ σ pmf )” p 1 ; p 2 | p 1 | p 2 |
WHILE g DO p 3 or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | | x : ∼ D x := expr | ” Assign ( σ ⇒ σ pmf )” p 1 ; p 2 | p 1 | p 2 | ITE g p 1 p 2 g :: σ ⇒ bool |
3 or Probabilistic Guarded Command Language (pGCL) σ pgcl = ⊥ | | x : ∼ D x := expr | ” Assign ( σ ⇒ σ pmf )” p 1 ; p 2 | p 1 | p 2 | ITE g p 1 p 2 g :: σ ⇒ bool | WHILE g DO p |
Values computed for the a starting state Values we want assigned to a terminal state c c c c c ert Assign u c x c y d u x y ert p 1 p 2 c ert p 1 ert p 2 c ert p 1 p 2 c ert p 1 c ert p 2 c ert ITE g p 1 p 2 c x if g x then ert p 1 c x else ert p 2 c x ert WHILE g DO p c W x 1 if g x then ert p W x else c x lfp 1 4 1 0 ert 1 ert ert Denotational Semantics (Expected Running Time) ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 )
Values computed for the a starting state c c c c c ert Assign u c x c y d u x y ert p 1 p 2 c ert p 1 ert p 2 c ert p 1 p 2 c ert p 1 c ert p 2 c ert ITE g p 1 p 2 c x if g x then ert p 1 c x else ert p 2 c x ert WHILE g DO p c W x 1 if g x then ert p W x else c x 1 lfp 4 1 0 ert 1 ert ert Denotational Semantics (Expected Running Time) ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 ) Values we want assigned to a terminal state
c c c c c ert Assign u c x c y d u x y ert p 1 p 2 c ert p 1 ert p 2 c ert p 1 p 2 c ert p 1 c ert p 2 c ert ITE g p 1 p 2 c x if g x then ert p 1 c x else ert p 2 c x ert WHILE g DO p c W x 1 if g x then ert p W x else c x lfp 1 4 1 0 ert 1 ert ert Denotational Semantics (Expected Running Time) Values computed for the a starting state ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 ) Values we want assigned to a terminal state
Values computed for the a starting state Values we want assigned to a terminal state c c c ert Assign u c x c y d u x y ert p 1 p 2 c ert p 1 ert p 2 c ert p 1 p 2 c ert p 1 c ert p 2 c ert ITE g p 1 p 2 c x if g x then ert p 1 c x else ert p 2 c x ert WHILE g DO p c W x 1 if g x then ert p W x else c x lfp 1 4 1 0 ert 1 ert Denotational Semantics (Expected Running Time) ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 ) c c ert ⊥ =
Values computed for the a starting state Values we want assigned to a terminal state c ert Assign u c x c y d u x y ert p 1 p 2 c ert p 1 ert p 2 c ert p 1 p 2 c ert p 1 c ert p 2 c ert ITE g p 1 p 2 c x if g x then ert p 1 c x else ert p 2 c x ert WHILE g DO p c W x 1 if g x then ert p W x else c x 1 lfp 4 1 0 ert ert Denotational Semantics (Expected Running Time) ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 ) c c ert ⊥ = c 1 + c =
Recommend
More recommend