Probabilistic Invariants for Probabilistic Machines

  • Thai Son Hoang
  • Zhendong Jin
  • Ken Robinson
  • Annabelle McIver
  • Carroll Morgan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2651)


Abrial’s Generalised Substitution Language (GSL) [4] can be modified to operate on arithmetic expressions, rather than Boolean predicates, which allows it to be applied to probabilistic programs [13]. We add a new operator p⊕ to GSL, for probabilistic choice, and we get the probabilistic Generalised Substitution Language (pGSL): a smooth extension of GSL that includes random algorithms within its scope.

In this paper we begin to examine the effect of pGSL on B’s larger-scale structures: its machines. In particular, we suggest a notion of probabilistic machine invariant. We show how these invariants interact with pGSL, at a fine-grained level; and at the other extreme we investigate how they affect our general understanding “in the large” of probabilistic machines and their behaviour.

Overall, we aim to initiate the development of probabilistic B (pB), complete with a suitable probabilistic AMN (pAMN). We discuss the practical extension of the B-Toolkit [5] to support pB, and we give examples to show how pAMN can be used to express and reason about probabilistic properties of a system.


Probability program correctness generalised substitutions weakest preconditions the B Method (Bprobabilistic algorithms 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Probabilistic symbolic model checker.
  2. [2]
    Specification and development of probabilistic systems.
  3. [3]
    Proceeding of the 3rd International Conference of B and Z Users. Springer, 2003.Google Scholar
  4. [4]
    J-R. Abrial. The B-Book. Cambridge University Press, 1996.Google Scholar
  5. [5]
    B-Core(UK) Ltd. B Toolkit.
  6. [6]
    John E. Freund. John E. Freund’s Mathematical Statistics. Prentice Hall International, Inc., 6 edition, 1999.Google Scholar
  7. [7]
    D. Gries and J. Prins. A new notion of encapsulation. In Symposium on Language Issues in Programming Environments. SIGPLAN, June 1985.Google Scholar
  8. [8]
    A. K. McIver. Quantitative program logic and counting rounds in probabilistic distributed algorithms. In Proc. 5th Intl. Workshop ARTS’ 99, volume 1601, 1999.Google Scholar
  9. [9]
    A. K. McIver and C. C. Morgan. Demonic, angelic and unbounded probabilistic choices in sequential programs. Acta Informatica, 37:329–354, 2001.zbMATHCrossRefMathSciNetGoogle Scholar
  10. [10]
    C. C. Morgan, A. K. McIver, and K. Seidel. Probabilistic predicate transformers. ACM Transactions on Programming Languages and Systems, 18(3):325–353, May 1996.CrossRefGoogle Scholar
  11. [11]
    A. K. McIver, C. C. Morgan, and Thai Son Hoang. Probabilistic termination in B. In Proceeding of the 3rd International Conference of B and Z Users [3].Google Scholar
  12. [12]
    C. C. Morgan. Programming from Specifications. Prentice-Hall, second edition, 1994. At
  13. [13]
    C. C. Morgan. The generalised substitution language extended to probabilistic programs. In Proceedings B’98: the 2nd International B Conference, volume 1393 of LNCS, Montpelier, April 1998. Also available at [2, B98].Google Scholar
  14. [14]
    Stoelinga and Vaandrager. Root contention in IEEE 1394. In Proceedings of the 5th AMAST workshop on real time and probabilistic systems Bamberg, Germany, ARTS’ 1999, volume 1061 of LNCS.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Thai Son Hoang
    • 1
  • Zhendong Jin
    • 1
  • Ken Robinson
    • 1
  • Annabelle McIver
    • 2
  • Carroll Morgan
    • 1
  1. 1.School of Computer Science & EngineeringUniversity of New South WalesAustralia
  2. 2.Department of ComputingMacquarie UniversityAustralia

Personalised recommendations