Skip to main content

A Coq Implementation of the Program Algebra in Jifeng He’s New Roadmap for Linking Theories of Programming

  • Chapter
  • First Online:
Theories of Programming and Formal Methods

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14080))

  • 254 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 59.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 79.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    https://github.com/DonnotPanic/Program-Algebra-in-Jifeng/blob/main/ProgramAlgebra.v.

  2. 2.

    https://github.com/DonnotPanic/Program-Algebra-in-Jifeng/blob/main/testAlt.v.

  3. 3.

    https://github.com/DonnotPanic/Program-Algebra-in-Jifeng/blob/main/testGCD.v.

References

  1. 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

    Chapter  Google Scholar 

  2. Ekembe Ngondi, G.: Denotational semantics of channel mobility in UTP-CSP. Formal Aspects Comput. 33(4), 803–826 (2021)

    Article  MathSciNet  MATH  Google Scholar 

  3. 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

    Chapter  MATH  Google Scholar 

  4. 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

    Chapter  Google Scholar 

  5. 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)

    Article  Google Scholar 

  6. 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

    Chapter  Google Scholar 

  7. 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)

    Article  Google Scholar 

  8. Hoare, C.A.R., et al.: Laws of programming. Commun. ACM 30(8), 672–686 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  9. Jorrand, P., Lalire, M.: Toward a quantum process algebra. In: Proceedings of the 1st Conference on Computing Frontiers, pp. 111–119 (2004)

    Google Scholar 

  10. 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

    Article  MATH  Google Scholar 

  11. 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

    Chapter  MATH  Google Scholar 

  12. Paulin-Mohring, C.: Introduction to the calculus of inductive constructions (2014)

    Google Scholar 

  13. 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

    Chapter  Google Scholar 

  14. 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)

    Article  MathSciNet  MATH  Google Scholar 

  15. 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

    Chapter  Google Scholar 

  16. 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)

    Article  MathSciNet  MATH  Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Qin Li .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2023 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

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)

Publish with us

Policies and ethics