Skip to main content
Log in

A UTP semantics for communicating processes with shared variables and its formal encoding in PVS

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

CSP# (communicating sequential programs) is a modelling language designed for specifying concurrent systems by integrating CSP-like compositional operators with sequential programs updating shared variables. In this work, we define an observation-oriented denotational semantics in an open environment for the CSP# language based on the UTP framework. To deal with shared variables, we lift traditional event-based traces into mixed traces which consist of state-event pairs for recording process behaviours. To capture all possible concurrency behaviours between action/channel-based communications and global shared variables, we construct a comprehensive set of rules on merging traces from processes which run in parallel/interleaving. We also define refinement to check process equivalence and present a set of algebraic laws which are established based on our denotational semantics. We further encode our proposed denotational semantics into the PVS theorem prover. The encoding not only ensures the semantic consistency, but also builds up a theoretic foundation for machine-assisted verification of CSP# specifications.

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Barras B, Boutin S, Cornes C, Courant J, Filliâtre J-C, Herbelin H, Huet G, Manoury P, Muñoz C, Murthy C, Parent C, Paulin-Mohring C, Saïbi A, Werner B (1996) The Coq proof assistant reference manual version 6.1. INRIA-Rocquencourt-CNRS-ENS Lyon

  2. Brookes Stephen, D.: Full abstraction for a shared-variable parallel language. Inform Comput 127(2), 145–163 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  3. Camilleri Albert, J.: Mechanizing CSP trace theory in higher order logic. IEEE Trans Softw Eng 16(9), 993–1004 (1990)

    Article  Google Scholar 

  4. Camilleri Albert, J.: A higher order logic mechanization of the CSP failure-divergence semantics. IV higher order workshop, Banff 1990, pp. 123–150. Springer, London (1991)

    Chapter  Google Scholar 

  5. Colvin R, Hayes IJ (2009) CSP with hierarchical state. In: 7th international conference on integrated formal methods (IFM'09), volume 5423 of lecture notes in computer science, Springer, pp 118–135

  6. Crow J, Owre S, Rushby J, Shankar N, Srivas M (1995) A tutorial introduction to PVS. In: Workshop on industrial-strength formal specification techniques, Boca Raton, Florida

  7. Cavalcanti A, Woodcock J (2006) A tutorial introduction to CSP in unifying theories of programming. In: Refinement techniques in software engineering, volume 3167 of lecture notes in computer science. Springer, pp 220–268

  8. Dekker's algorithm. https://en.wikipedia.org/wiki/Dekker%27s_algorithm. Accessed 29 Dec 2017

  9. Dijkstra EW (1968) Cooperating sequential processes. In: Programming languages: NATO advanced study institute. Academic Press, pp 43–112

  10. Dutertre B, Schneider S (1997) Using a PVS embedding of CSP to verify authentication protocols. In: 10th international conference on theorem proving in higher order logics (TPHOLs'97), volume 1275 of lecture notes in computer science. Springer, pp 121–136

  11. Dong JS, Shi L, Nguyen Chuong L V, Jiang K, Sun J (2015) Sports strategy analytics using probabilistic reasoning. In: 20th international conference on engineering of complex computer systems, (ICECCS), pp 182–185

  12. Feliachi A, Gaudel M-C, Wolff B (2010) Unifying theories in Isabelle/HOL. In: Third international symposium on unifying theories of programming (UTP'10), volume 6445 of lecture notes in computer science. Springer, pp 188–206

  13. Fischer C (1997) Combining object-Z and CSP. In: FBT. GMD-Forschungszentrum Informationstechnik GmbH, pp 119–128

  14. Foster S, Woodcock J (2013) Unifying theories of programming in Isabelle. In: ICTAC training school on software engineering, volume 8050 of lecture notes in computer science. Springer, pp 109–155

  15. Gordon, M.J.C., Melham, T.F.: Introduction to HOL: a theorem proving environment for higher order logic. Cambridge University Press, Cambridge (1993)

    MATH  Google Scholar 

  16. Gordon Michael, J.C.: HOL: a proof generating system for higher order logic. In: Graham, B., Subrahmanyam, P.A. (eds) VLSI specification, verification and synthesis, pp. 73–128. Springer, New York (1988)

    Chapter  Google Scholar 

  17. Galloway A, Stoddart B (1997) An operational semantics for ZCCS. In: 1st international conference on formal engineering methods (ICFEM'97). IEEE Computer Society, pp 272–282

  18. Hoare CAR, He J (1998) Unifying theories of programming. Prentice-Hall

  19. Hoare, C.A.R., Hayes, I.J., He, J., Morgan, C., Roscoe, A.W., Sanders, J.W., Sørensen, I.H., Michael, S.J., Sufrin, B.: Laws of programming. Commun ACM 30(8), 672–686 (1987)

    Article  MathSciNet  MATH  Google Scholar 

  20. Hoare CAR (1985) Communicating sequential processes. Prentice-Hall

  21. Isobe Y, Roggenbach M (2005) A generic theorem prover of CSP refinement. In: 11th international conference on tools and algorithms for the construction and analysis of systems (TACAS'05), volume 3440 of lecture notes in computer science. Springer, pp 108–123

  22. Isobe, Y., Roggenbach, M.: Proof principles of CSP-CSP-prover in practice. First international conference on dynamics in logistics (LDIC'07), pp. 425–442. Springer, Berlin (2008)

    Google Scholar 

  23. Mahony, B.P., Dong, J.S.: Sensors and actuators in TCOZ. World congress on formal methods in the development of computing systems (FM'99), pp. 1166–1185. Springer, Berlin (1999)

    Google Scholar 

  24. Mahony, B.P., Dong, J.S.: Timed communicating object Z. IEEE Trans Softw Eng 26(2), 150–177 (2000)

    Article  Google Scholar 

  25. Mahony, B.P., Dong, J.S.: Deep semantic links of TCSP and object-Z: TCOZ approach. Formal Asp Comput 13(2), 142–160 (2002)

    Article  MATH  Google Scholar 

  26. Milner, R.: Communication and concurrency. Prentice Hall, Upper Saddle River (1989)

    MATH  Google Scholar 

  27. Oliveira, M., Cavalcanti, A., Woodcock, J.: Unifying theories in proofpower-Z. First international symposium on unifying theories of programming (UTP'06). lecture notes in computer science, vol. 4010, pp. 123–140. Springer, Berlin (2006)

    Chapter  Google Scholar 

  28. Oliveira, M., Cavalcanti, A., Woodcock, J.: A UTP semantics for circus. Formal Asp Comput 21(1–2), 3–32 (2009)

    Article  MATH  Google Scholar 

  29. Owre, S., Rushby, J.M., Shankar, N.: PVS: a prototype verification system. 11th international conference on automated deduction (CADE), pp. 748–752. Springer, Berlin (1992)

    Google Scholar 

  30. Owre S, Shankar N, Rushby J, Stringer-Calvert DWJ (2001) PVS System guide. SRI International

  31. Paulson, L.C.: Isabelle: a generic theorem prover. lecture notes in computer science, vol. 828. Springer, New York (1994)

    Book  Google Scholar 

  32. Pfeifer H, Dold A, von Henke FW, Rueß H (1996) Mechanized semantics of simple imperative programming constructs. Technical report 96–11, Universität Ulm, Fakultät für Informatik

  33. ProofPower. http://www.lemma-one.com/ProofPower/index/index.html. Accessed 11 Mar 2017

  34. Qin, S., Dong, J.S., Chin, W.-N.: A semantic foundation for TCOZ in unifying theories of programming. FME 2003: formal methods. lecture notes in computer science, vol. 2805, pp. 321–340. Springer, Berlin (2003)

    Chapter  Google Scholar 

  35. Roscoe, A.W.: The theory and practice of concurrency. Prentice Hall, Upper Saddle River (1997)

    Google Scholar 

  36. Sun J, Liu Y, Dong JS , Liu Y, Shi L, André É (2013) Modeling and verifying hierarchical real-time systems using stateful timed CSP. ACM Trans Softw Eng Methodol 22(1):3:1–3:29

  37. Sun J, Liu Y, Dong JS, Chen C (2009) Integrating specification and programs for system modeling and verification. In: The 3rd IEEE international symposium on theoretical aspects of software engineering (TASE'09). IEEE Computer Society, pp 127–135

  38. Sun, J., Liu, Y., Dong, J.S., Pang, J.: PAT: towards flexible verification under fairness. 21st international conference on computer aided verification (CAV'09). lecture notes in computer science, vol. 5643, pp. 709–714. Springer, New York (2009)

    Chapter  Google Scholar 

  39. Shi L, Liu S, Hao J, Koh JY, Hou Z, Dong JS (2017) Towards solving decision making problems using probabilistic model checking. In: 22nd international conference on engineering of complex computer systems, (ICECCS), pp 150–153

  40. Sun, J., Liu, Y., Song, S., Dong, J.S., Li, X.: PRTS: an approach for model checking probabilistic real-time hierarchical systems. 13th international conference on formal engineering methods (ICFEM'11). lecture notes in computer science, vol. 6991, pp. 147–162. Springer, Berlin (2011)

    Google Scholar 

  41. Shi, L., Liu, Y., Sun, J., Dong, J.S., Carvalho, G.: An analytical and experimental comparison of CSP extensions and tools. 14th international conference on formal engineering methods (ICFEM'12). lecture notes in computer science, vol. 7635, pp. 381–397. Springer, Berlin (2012)

    Google Scholar 

  42. Smith, G.: A semantic integration of object-Z and CSP for the specification of concurrent systems. FME'97: industrial applications and strengthened foundations of formal methods. lecture notes in computer science, vol. 1313, pp. 62–81. Springer, Berlin (1997)

    Chapter  Google Scholar 

  43. Shankar N, Owre S, Rushby J, Stringer-Calvert DWJ (2001) PVS prover guide. SRI International

  44. Gift Samuel, D., Roggenbach, M., Isobe, Y.: The stable revivals model in CSP-Prover. Electron Notes Theor Comput Sci 250(2), 119–134 (2009)

    Article  MATH  Google Scholar 

  45. Schneider, S., Treharne, H.: CSP theorems for communicating B machines. Formal Asp Comput 17(4), 390–422 (2005)

    Article  MATH  Google Scholar 

  46. Shi, L., Zhao, Y., Liu, Y., Sun, J., Dong, J.S., Qin, S.: A UTP semantics for communicating processes with shared variables. 15th international conference on formal engineering methods (ICFEM'13). lecture notes in computer science, vol. 8144, pp. 215–230. Springer, Berlin (2013)

    Google Scholar 

  47. Taguchi K, Araki K (1997) The state-based CCS semantics for concurrent Z specification. In: 1st international conference on formal engineering methods (ICFEM'97). IEEE Computer Society, pp 283–292

  48. Tej, H., Wolff, B.: A corrected failure divergence model for CSP in Isabelle/HOL. FME'97: industrial applications and strengthened foundations of formal methods. lecture notes in computer science, vol. 1313, pp. 318–337. Springer, Berlin (1997)

    Chapter  Google Scholar 

  49. Woodcock, J., Cavalcanti, A.: The semantics of circus. ZB 2002: formal specification and development in Z and B. lecture notes in computer science, vol. 2272, pp. 184–203. Springer, New York (2002)

    Chapter  Google Scholar 

  50. Wei, K., Heather, J.: Embedding the stable failures model of CSP in PVS. 5th international conference on integrated formal methods (IFM'05). lecture notes in computer science, vol. 3771, pp. 246–265. Springer, Berlin (2005)

    Chapter  Google Scholar 

  51. Winskel, G.: The formal semantics of programming languages: an introduction. MIT Press, London (1993)

    MATH  Google Scholar 

  52. Woodcock J, Larsen PG, Bicarregui J, Fitzgerald JS (2009) Formal methods: practice and experience. ACM Comput Surv 41(4):19:1–19:36

  53. Wei K, Woodcock J, Burns A (2009) Embedding the timed circus in PVS. Technical report, University of York

  54. Zhu, H., Bowen, J.P., He, J.: From operational semantics to denotational semantics for Verilog. Correct hardware design and verification methods (CHARME). lecture notes in computer science, vol. 2144, pp. 449–466. Springer, Berlin (2001)

    Chapter  Google Scholar 

  55. Zhu, H., He, J., Bowen, J.P.: From algebraic semantics to denotational semantics for Verilog. ISSE 4(4), 341–360 (2008)

    MATH  Google Scholar 

  56. Zhu, H., Qin, S., He, J., Bowen, J.P.: PTSC: probability, time and shared-variable concurrency. ISSE 5(4), 271–284 (2009)

    Google Scholar 

  57. Zhu, H., Yang, F., He, J., Bowen, J.P., Sanders, J.W., Qin, S.: Linking operational semantics and algebraic semantics for a probabilistic timed shared-variable language. J Logic Algebraic Program 81(1), 2–25 (2012)

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yongxin Zhao.

Additional information

Ian Hayes and Cliff Jones

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Shi, L., Zhao, Y., Liu, Y. et al. A UTP semantics for communicating processes with shared variables and its formal encoding in PVS. Form Asp Comp 30, 351–380 (2018). https://doi.org/10.1007/s00165-018-0453-7

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-018-0453-7

Keywords

Navigation