Probabilistic Termination in B

The B Method [1] does not currently handle probability. We add it in a limited form, concentrating on "almost-certain" properties which hold with probability one; and we address briefly the implied modifications to the programs that support B. The Generalised Substitution Language is extended with a binary operator ⊕ representing "abstract probabilistic choice", so that the substitution prog1 ⊕ prog2 means roughly "choose between prog1 and prog2 with some probability neither one nor zero". We then adjust B's proof rule for loops -- specifically, the variant rule -- so that in many cases it is possible to prove "probability-one" correctness of programs containing the new operator, which was not possible in B before, while remaining almost entirely within the original Boolean logic. Applications include probabilistic algorithms such as the IEEE 1394 Root Contention Protocol ("FireWire") [9] in which a probabilistic "symmetry-breaking" strategy forms a key component of the design.

[1]  Annabelle McIver,et al.  Demonic, angelic and unbounded probabilistic choices in sequential programs , 2001, Acta Informatica.

[2]  Carroll Morgan,et al.  The specification statement , 1988, TOPL.

[3]  Carroll Morgan,et al.  Programming from specifications (2nd ed.) , 1994 .

[4]  Josyula R. Rao,et al.  Reasoning about probabilistic parallel programs , 1994, TOPL.

[5]  Carroll Morgan,et al.  Programming from specifications , 1990, Prentice Hall International Series in computer science.

[6]  Micha Sharir,et al.  Termination of Probabilistic Concurrent Program , 1983, TOPL.

[7]  Colin J. Fidge,et al.  But What if I Don't Want to Wait Forever? , 2003, Formal Aspects of Computing.

[8]  Carroll Morgan,et al.  pGCL: formal reasoning for random algorithms , 1998 .

[9]  Carroll Morgan,et al.  The Refinement Calculus , 1994, NATO ASI PDC.

[10]  Dominique Cansell,et al.  A Mechanically Proved and Incremental Development of IEEE 1394 Tree Identify Protocol , 2003, Formal Aspects of Computing.

[11]  Judi Romijn,et al.  Fun with FireWire: Experiences with Verifying the IEEE 1394 Root Contention Protocol , 2001 .

[12]  Annabelle McIver,et al.  An Expectation-Transformer Model for Probabilistic Temporal Logic , 1999, Log. J. IGPL.

[13]  Carroll Morgan,et al.  Proof rules for probabilistic loops , 1996 .

[14]  Annabelle McIver,et al.  Almost-Certain Eventualities and Abstract Probabilities in the Temporal Logic PTL , 2001, CATS.

[15]  Jean-Raymond Abrial,et al.  The B-book - assigning programs to meanings , 1996 .

[16]  Carroll Morgan The Generalised Substitution Language Extended to Probabilistic Programs , 1998, B.

[17]  S. Hart,et al.  Termination of Probabilistic Concurrent Programs. , 1982 .

[18]  Annabelle McIver,et al.  Probabilistic predicate transformers , 1996, TOPL.

[19]  Savi Maharaj,et al.  IEEE 1394 Tree Identify Protocol: Introduction to the Case Study , 2003, Formal Aspects of Computing.

[20]  Edsger W. Dijkstra,et al.  A Discipline of Programming , 1976 .

[21]  Dexter Kozen,et al.  A probabilistic PDL , 1983, J. Comput. Syst. Sci..

[22]  Greg Nelson,et al.  A generalization of Dijkstra's calculus , 1989, ACM Trans. Program. Lang. Syst..

[23]  Joe Hurd,et al.  A Formal Approach to Probabilistic Termination , 2002, TPHOLs.

[24]  Annabelle McIver,et al.  Almost-certain eventualities and abstract probabilities in the quantitative temporal logic qTL , 2003, Theor. Comput. Sci..