Abstract
The semantics of probabilistic languages has been extensively studied, but specification languages for their properties have received little attention. This paper introduces the probabilistic dynamic logic pDL, a specification logic for programs in the probabilistic guarded command language (pGCL) of McIver and Morgan. The proposed logic pDL can express both first-order state properties and probabilistic reachability properties, addressing both the non-deterministic and probabilistic choice operators of pGCL. In order to precisely explain the meaning of specifications, we formally define the satisfaction relation for pDL. Since pDL embeds pGCL programs in its box-modality operator, pDL satisfiability builds on a formal MDP semantics for pGCL programs. The satisfaction relation is modeled after PCTL, but extended from propositional to first-order setting of dynamic logic, and also embedding program fragments. We study basic properties of pDL, such as weakening and distribution, that can support reasoning systems. Finally, we demonstrate the use of pDL to reason about program behavior.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
The theorem is named as a tribute to the song Both sides now by Joni Mitchell.
References
Kozen, D.: Semantics of probabilistic programs. In: Proceedings 20th Annual Symposium on Foundations of Computer Science, IEEE Computer Society, 101–114 (1979)
Hark, M., Kaminski, B.L., Giesl, J., Katoen, J.: Aiming low is harder: induction for lower bounds in probabilistic program verification. In: Proceedings of ACM Programming Language, 4(POPL), pp. 37:1–37:28 (2020)
Kaminski, B.L.: Advanced weakest precondition calculi for probabilistic programs. PhD thesis, RWTH Aachen University, Germany (2019)
Stein, D., Staton, S.: Compositional semantics for probabilistic programs with exact conditioning. In: Proceedings on 36th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS 2021), pp. 1–13 IEEE (2021)
Smolka, S., Kumar, P., Foster, N., Kozen, D., Silva, A.: Cantor meets Scott: semantic foundations for probabilistic networks. In: Castagna, G., Gordon, A.D., (eds.) Proceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages (POPL 2017), pp. 557–571. ACM (2017)
Batz, K., et al.: Foundations for entailment checking in quantitative separation logic. In: Sergey, I. (ed.) ESOP 2022. LNCS, vol. 13240, pp. 57–84. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99336-8_3
McIver, A., Morgan, C.: Abstraction, Refinement And Proof For Probabilistic Systems. Monographs in Computer Science. Springer, Cham (2005)
Dijkstra, E.W.: A discipline of programming. Prentice-Hall (1976)
Harel, D., Kozen, D., Tiuryn, J.: Dynamic Logic. Foundations of Computing, MIT Press, Cambridge (2000)
Hansson, H., Jonsson, B.: A logic for reasoning about time and reliability. Formal Aspects Comput. 6(5), 512–535 (1994)
Puterman, M.L.: Markov Decision Processes. Wiley, Hoboken (2005)
Ahrendt, W., Beckert, B., Bubel, R., Hähnle, R., Schmitt, P.H., Ulbrich, M. (eds.): Deductive Software Verification - The KeY Book - From Theory to Practice. Lecture Notes in Computer Science, vol. 10001. Springer, Cham (2016)
de Gouw, S., Rot, J., de Boer, F.S., Bubel, R., Hähnle, R.: OpenJDK’s Java.utils.Collection.sort() is broken: The good, the bad and the worst case. In: Kroening, D., Pasareanu, C.S., (eds.) Proceedings of 27th International Conference on Computer Aided Verification (CAV 2015), Lecture Notes in Computer Science, vol. 9206, pp. 273–289 Springer, Cham (2015)
Pardo, R., Johnsen, E.B., Schaefer, I., Wąsowski, A.: A specification logic for programs in the probabilistic guarded command language (extended version). ArXiv: https://arxiv.org/abs/2205.04822 (2022)
Cousot, P., Monerau, M.: Probabilistic abstract interpretation. In: Seidl, H. (ed.) ESOP 2012. LNCS, vol. 7211, pp. 169–193. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-28869-2_9
Filieri, A., Pasareanu, C.S., Visser, W.: Reliability analysis in symbolic pathfinder. In: 35th International Conference on Software Engineering (ICSE 2013). IEEE Computer Society, pp. 622–631 (2013)
Kwiatkowska, M.Z., Norman, G., Parker, D.: The PRISM benchmark suite. In: Ninth International Conference on Quantitative Evaluation of Systems (QEST 2012). IEEE Computer Society, pp. 203–204 (2012)
Kozen, D.: A probabilistic PDL. J. Comput. Syst. Sci. 30(2), 162–178 (1985)
Feldman, Y.A., Harel, D.: A probabilistic dynamic logic. In: Proceedings of the 14th Annual ACM Symposium on Theory of Computing (STOC), pp. 181–195. ACM (1982)
Batz, K., Kaminski, B.L., Katoen, J., Matheja, C.: Relatively complete verification of probabilistic programs: an expressive language for expectation-based reasoning. Proc. ACM Program. Lang. 5(POPL), 1–30 (2021)
Hähnle, R.: Dijkstra’s legacy on program verification. In: Apt, K.R., Hoare, T., (eds.).: Edsger Wybe Dijkstra: His Life, Work, and Legacy. ACM / Morgan & Claypool, pp. 105–140 (2022)
Gretz, F., Katoen, J., McIver, A.: Operational versus weakest pre-expectation semantics for the probabilistic guarded command language. Perform. Eval. 73, 110–132 (2014)
McIver, A., Morgan, C., Kaminski, B.L., Katoen, J.: A new proof rule for almost-sure termination. Proc. ACM Program. Lang. 2(POPL), 33:1–33:28 (2018)
Batz, K., Kaminski, B.L., Katoen, J., Matheja, C., Noll, T.: Quantitative separation logic: a logic for reasoning about probabilistic pointer programs. Proc. ACM Program. Lang. 3(POPL), 34:1–34:29 (2019)
Kaminski, B.L., Katoen, J.-P., Matheja, C., Olmedo, F.: Weakest precondition reasoning for expected run–times of probabilistic programs. In: Thiemann, P. (ed.) ESOP 2016. LNCS, vol. 9632, pp. 364–389. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49498-1_15
Aguirre, A., Barthe, G., Hsu, J., Kaminski, B.L., Katoen, J., Matheja, C.: A pre-expectation calculus for probabilistic sensitivity. Proc. ACM Program. Lang. 5(POPL), 1–28 (2021)
Baier, C., Kwiatkowska, M.Z., Norman, G.: Computing probability bounds for linear time formulas over concurrent probabilistic systems. Electron. Notes Theor. Comput. Sci. 22, 29 (1999)
Dekking, F.M., Kraaikamp, C., Lopuhaä, H.P., Meester, L.E.: A Modern Introduction to Probability and Statistics: Understanding Why and How. STS, Springer, London (2005). https://doi.org/10.1007/1-84628-168-7
Acknowledgments
This work was supported by the Research Council of Norway via SIRIUS (project no. 237898).
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this paper
Cite this paper
Pardo, R., Johnsen, E.B., Schaefer, I., Wąsowski, A. (2022). A Specification Logic for Programs in the Probabilistic Guarded Command Language. In: Seidl, H., Liu, Z., Pasareanu, C.S. (eds) Theoretical Aspects of Computing – ICTAC 2022. ICTAC 2022. Lecture Notes in Computer Science, vol 13572. Springer, Cham. https://doi.org/10.1007/978-3-031-17715-6_24
Download citation
DOI: https://doi.org/10.1007/978-3-031-17715-6_24
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-17714-9
Online ISBN: 978-3-031-17715-6
eBook Packages: Computer ScienceComputer Science (R0)