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 – correct proofs – Our work: • Coupon Collector • Simple Random Walk • Examples: Operational pgcl stream measure • Probabilistic programs (pGCL) + expected running time. pgcl 0 0 pgcl • Two semantics: This Talk
Denotational: Operational: Correspondence: Denotational 2 stream measure – clarified semantics – different proofs – correct proofs – Our work: • 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 – clarified semantics – different proofs – correct proofs – Our work: • Coupon Collector • Simple Random Walk • Examples: Operational pgcl stream measure • Probabilistic programs (pGCL) + expected running time. pgcl 0 0 pgcl • Two semantics: This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆
Denotational: Operational: Correspondence: Denotational 2 – clarified semantics – different proofs – correct proofs – Our work: • Coupon Collector • Simple Random Walk • Examples: Operational pgcl stream measure • Probabilistic programs (pGCL) + expected running time. pgcl 0 0 pgcl • Two semantics: This Talk Kaminski, Katoen, Matheja, and Olmedo [ESOP 2016] ⋆
Operational: Correspondence: Denotational pgcl – clarified semantics – different proofs – correct proofs – Our work: • Coupon Collector • Simple Random Walk • Examples: Operational stream measure pgcl 2 • Probabilistic programs (pGCL) + expected running time. • Two semantics: 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 – correct proofs – • Two semantics: Our work: • 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 × σ
• Simple Random Walk 2 • Probabilistic programs (pGCL) + expected running time. – clarified semantics – different proofs – correct proofs – • Two semantics: Our work: • 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 – correct proofs – • Two semantics: Our work: • 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
2 • Probabilistic programs (pGCL) + expected running time. – clarified semantics – different proofs – correct proofs – • Two semantics: Our work: • 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 – correct proofs – • Two semantics: Our work: • 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 – correct proofs – • Two semantics: – clarified semantics – Our work: • 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. correct proofs – • Two semantics: – clarified semantics – different proofs – Our work: • 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 – correct proofs – • Two semantics: Our work: • 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
pGCL
x x p 1 p 2 p 1 p 2 ITE g p 1 p 2 g WHILE g DO p 4 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 4 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 4 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 4 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 4 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 4 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 4 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 |
4 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 5 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 5 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 5 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 5 1 0 ert 1 ert Denotational Semantics (Expected Running Time) ert :: σ pgcl ⇒ ( σ ⇒ R ≥ 0 ) ⇒ ( σ ⇒ R ≥ 0 ) c c ert ⊥ =
Recommend
More recommend