The generalised substitution language extended to probabilistic programs

  • Carroll Morgan
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1393)


Let predicate P be converted from Boolean to numeric type by writing 〈P〉, with 〈false〉 being 0 and 〈true〉 being 1, so that in a degenerate sense 〈P〉 can be regarded as ‘the probability that P holds in the current state’. Then add explicit numbers and arithmetic operators, to give a richer language of arithmetic formulae into which predicates are embedded by 〈·〉.

Abrial's generalised substitution language GSL can be applied to arithmetic rather than Boolean formulae with little extra effort. If we add a new operator p⊕ for probabilistic choice, it then becomes ‘pGSL’: a smooth extension of GSL that includes random algorithms within its scope.


Probability program correctness generalised substitutions weakest preconditions GSL 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    J.-R. Abrial. The B-Book. Cambridge University Press, 1996.Google Scholar
  2. 2.
    E.W. Dijkstra. A Discipline of Programming. Prentice Hall International, Englewood Cliffs, N.J., 1976.zbMATHGoogle Scholar
  3. 3.
    Yishai A. Feldman. A decidable prepositional dynamic logic with explicit probabilities. Information and Control, 63:11–38, 1984.zbMATHCrossRefMathSciNetGoogle Scholar
  4. 4.
    Yishai A. Feldman and David Harel. A probabilistic dynamic logic. J. Computing and System Sciences, 28:193–215, 1984.zbMATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Jifeng He, K. Seidel, and A. K. McIver. Probabilistic models for the guarded command language. Science of Computer Programming, 28:171–192, 1997.zbMATHCrossRefMathSciNetGoogle Scholar
  6. 6.
    C. Jones. Probabilistic nondeterminism. Monograph ECS-LFCS-90-105, Edinburgh Univ. Edinburgh, U.K., 1990. (PhD Thesis).Google Scholar
  7. 7.
    C. Jones and G. Plotkin. A probabilistic powerdomain of evaluations. In Proceedings of the IEEE 4th Annual Symposium on Logic in Computer Science, pages 186–195, Los Alamitos, Calif., 1989. Computer Society Press.Google Scholar
  8. 8.
    D. Kozen. A probabilistic PDL. In Proceedings of the 15th ACM Symposium on Theory of Computing, New York, 1983. ACM.Google Scholar
  9. 9.
    Annabelle McIver and Carroll Morgan. Probabilistic predicate transformers: part 2. Technical Report PRG-TR-5-96, Programming Research Group, March 1996. Revised version to be submitted for publication under the title Demonic, angelic and unbounded probabilistic choices in sequential programs.Google Scholar
  10. 10.
    Annabelle McIver and Carroll Morgan. Partial correctness for probabilistic demonic programs. Technical Report PRG-TR-35-97, Programming Research Group, 1997.Google Scholar
  11. 11.
    Annabelle McIver, Carroll Morgan, and Elena Troubitsyna. The probabilistic steam boiler: a case study in probabilistic data refinement. In preparation, 1997.Google Scholar
  12. 12.
    C. C. Morgan. The specification statement. ACM Transactions on Programming Languages and Systems, 10(3), July 1988. Reprinted in [14].Google Scholar
  13. 13.
    C. C. Morgan. Proof rules for probabilistic loops. In He Jifeng, John Cooke, and Peter Wallis, editors, Proceedings of the BCS-FACS 7th Refinement Workshop, Workshops in Computing. Springer Verlag, July 1996.Google Scholar
  14. 14.
    C. C. Morgan and T. N. Vickers, editors. On the Refinement Calculus. FACIT Series in Computer Science. Springer-Verlag, Berlin, 1994.Google Scholar
  15. 15.
    Carroll Morgan, Annabelle McIver, and Karen Seidel. Probabilistic predicate transformers. ACM Transactions on Programming Languages and Systems, 18(3):325–353, May 1996.CrossRefGoogle Scholar
  16. 16.
    J. M. Morris. A theoretical basis for stepwise refinement and the programming calculus. Science of Computer Programming, 9(3):287–306, December 1987.zbMATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Rajeev Motwani and Prabhakar Raghavan. Randomized Algorithms. Cambridge University Press, 1995.Google Scholar
  18. 18.
    G. Nelson. A generalization of Dijkstra's calculus. ACM Transactions on Programming Languages and Systems, 11(4):517–561, October 1989.CrossRefGoogle Scholar
  19. 19.
    K. Seidel, C. C. Morgan, and A. K. McIver. An introduction to probabilistic predicate transformers. Technical Report PRG-TR-6-96, Programming Research Group, February 1996. Revised version to be submitted for publication under the title Probabilistic Imperative Programming: a Rigorous Approach.Google Scholar
  20. 20.
    M. Sharir, A. Pnueli, and S. Hart. Verification of probabilistic programs. SIAM Journal on Computing, 13(2):292–314, May 1984.zbMATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1998

Authors and Affiliations

  • Carroll Morgan
    • 1
  1. 1.Programming Research GroupOxford UniversityUK

Personalised recommendations