Abstract
Jifeng He has proposed a roadmap for linking theories of programming and presents an algebra of programs capable of generating both denotational and operational representations from the refinement relation. In this paper, we implement this algebra of programs and its refinement relation using the interactive theorem prover Coq. Encoding the algebra into CIC (Calculus of Inductive Constructions), the main formalism in Coq, facilitates machine-aided interactive proving for the properties of programs using predefined algebraic laws. The implementation of the algebra for finite programs enables us to prove that every finite program can be reduced to the normal form and to check the refinement between two finite programs. The implementation of the algebra for infinite programs supports formalizing recursive programs with one variable and checking the refinement between one finite and one infinite program. Then, we present examples of proving the refinement relationship between two finite programs and a finite program and an infinite program.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Ngondi, G.E., Koutavas, V., Butterfield, A.: Translation of CCS into CSP, correct up to strong bisimulation. In: Calinescu, R., Păsăreanu, C.S. (eds.) SEFM 2021. LNCS, vol. 13085, pp. 243–261. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-92124-8_14
Ekembe Ngondi, G.: Denotational semantics of channel mobility in UTP-CSP. Formal Aspects Comput. 33(4), 803–826 (2021)
Feliachi, A., Gaudel, M.-C., Wolff, B.: Unifying theories in Isabelle/HOL. In: Qin, S. (ed.) UTP 2010. LNCS, vol. 6445, pp. 188–206. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-16690-7_9
Foster, S.: Hybrid relations in Isabelle/UTP. In: Ribeiro, P., Sampaio, A. (eds.) UTP 2019. LNCS, vol. 11885, pp. 130–153. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-31038-7_7
Foster, S., Baxter, J., Cavalcanti, A., Woodcock, J., Zeyda, F.: Unifying semantic foundations for automated verification tools in Isabelle/UTP. Sci. Comput. Program. 197, 102510 (2020)
Foster, S., Zeyda, F., Woodcock, J.: Isabelle/UTP: a mechanised theory engineering framework. In: Naumann, D. (ed.) UTP 2014. LNCS, vol. 8963, pp. 21–41. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-14806-9_2
He, J., Li, Q.: A new roadmap for linking theories of programming and its applications on GCL and CSP. Sci. Comput. Program. 162, 3–34 (2018)
Hoare, C.A.R., et al.: Laws of programming. Commun. ACM 30(8), 672–686 (1987)
Jorrand, P., Lalire, M.: Toward a quantum process algebra. In: Proceedings of the 1st Conference on Computing Frontiers, pp. 111–119 (2004)
Morgan, C., McIver, A., Seidel, K., Sanders, J.W.: Refinement-oriented probability for CSP. Formal Aspects Comput. 8(6), 617–647 (1996). https://doi.org/10.1007/BF01213492
Oliveira, M., Cavalcanti, A., Woodcock, J.: Unifying theories in ProofPower-Z. In: Dunne, S., Stoddart, B. (eds.) UTP 2006. LNCS, vol. 4010, pp. 123–140. Springer, Heidelberg (2006). https://doi.org/10.1007/11768173_8
Paulin-Mohring, C.: Introduction to the calculus of inductive constructions (2014)
Woodcock, J., Hughes, A.: Unifying theories of parallel programming. In: George, C., Miao, H. (eds.) ICFEM 2002. LNCS, vol. 2495, pp. 24–37. Springer, Heidelberg (2002). https://doi.org/10.1007/3-540-36103-0_5
Xu, X., Zhan, B., Wang, S., Talpin, J.P., Zhan, N.: A denotational semantics of simulink with higher-order UTP. J. Logical Algebraic Methods Program. 130, 100809 (2023)
Yan, G., Jiao, L., Li, Y., Wang, S., Zhan, N.: Approximate bisimulation and discretization of hybrid CSP. In: Fitzgerald, J., Heitmeyer, C., Gnesi, S., Philippou, A. (eds.) FM 2016. LNCS, vol. 9995, pp. 702–720. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-48989-6_43
Zhu, H., He, J., Qin, S., Brooke, P.J.: Denotational semantics and its algebraic derivation for an event-driven system-level language. Formal Aspects Comput. 27, 133–166 (2015)
Acknowledgment
We would like to express our sincere gratitude to Simon Foster for his exceptional contribution to this paper. His valuable insights and expert guidance have greatly enhanced the quality of our work, and we are truly appreciative of his dedication and commitment to this project. Without his suggestions and feedback, the paper would not have been as comprehensive and insightful as it is now.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG
About this chapter
Cite this chapter
Mu, R., Li, Q. (2023). A Coq Implementation of the Program Algebra in Jifeng He’s New Roadmap for Linking Theories of Programming. In: Bowen, J.P., Li, Q., Xu, Q. (eds) Theories of Programming and Formal Methods. Lecture Notes in Computer Science, vol 14080. Springer, Cham. https://doi.org/10.1007/978-3-031-40436-8_15
Download citation
DOI: https://doi.org/10.1007/978-3-031-40436-8_15
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-031-40435-1
Online ISBN: 978-3-031-40436-8
eBook Packages: Computer ScienceComputer Science (R0)