Skip to main content

Formally Verified Animation for RoboChart Using Interaction Trees

  • Conference paper
  • First Online:
Formal Methods and Software Engineering (ICFEM 2022)

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

Included in the following conference series:

Abstract

RoboChart is a core notation in the RoboStar framework. It is a timed and probabilistic domain-specific and state machine based language for robotics. RoboChart supports shared variables and communication across entities in its component model. It has a formal denotational semantics given in CSP. Interaction Trees (ITrees) is a semantic technique to represent behaviours of reactive and concurrent programs interacting with their environments. Recent mechanisations of ITrees along with ITree-based CSP semantics and a Z mathematical toolkit in Isabelle/HOL bring new applications of verification and animation for state-rich process languages, such as RoboChart. In this paper, we use ITrees to give RoboChart a novel operational semantics, implement it in Isabelle, and use Isabelle’s code generator to generate verified and executable animations. We illustrate our approach using an autonomous chemical detector model. With animation, we show two concrete scenarios when the robot encounters different environmental inputs.

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 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.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

Similar content being viewed by others

Notes

  1. 1.

    https://robostar.cs.york.ac.uk.

  2. 2.

    https://robostar.cs.york.ac.uk/robotool/.

  3. 3.

    https://robostar.cs.york.ac.uk/case_studies/autonomous-chemical-detector/autonomous-chemical-detector.html.

  4. 4.

    https://cocotec.io/fdr/.

  5. 5.

    https://github.com/isabelle-utp/Z_Toolkit.

  6. 6.

    In the Isabelle code, we include suffixes to ensure that names do not collide, but omit them here.

  7. 7.

    https://kframework.org/.

References

  1. Cavalcanti, A., et al.: RoboStar technology: a roboticist’s toolbox for combined proof, simulation, and testing. In: Cavalcanti, A., Dongol, B., Hierons, R., Timmis, J., Woodcock, J. (eds.) Software Engineering for Robotics, pp. 249–293. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-66494-7_9

    Chapter  Google Scholar 

  2. Hoare, C.A.R., He, J.: Unifying Theories of Programming. Prentice-Hall (1998)

    Google Scholar 

  3. Miyazawa, A., Ribeiro, P., Li, W., Cavalcanti, A., Timmis, J., Woodcock, J.: RoboChart: modelling and verification of the functional behaviour of robotic applications. Softw. Syst. Model. 18(5), 3097–3149 (2019). https://doi.org/10.1007/s10270-018-00710-z

    Article  Google Scholar 

  4. Ye, K., Cavalcanti, A., Foster, S., Miyazawa, A., Woodcock, J.: Probabilistic modelling and verification using RoboChart and PRISM. Softw. Syst. Model. 21(2), 667–716 (2021). https://doi.org/10.1007/s10270-021-00916-8

    Article  Google Scholar 

  5. Woodcock, J., Cavalcanti, A., Foster, S., Mota, A., Ye, K.: Probabilistic semantics for RoboChart. In: Ribeiro, P., Sampaio, A. (eds.) UTP 2019. LNCS, vol. 11885, pp. 80–105. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-31038-7_5

    Chapter  Google Scholar 

  6. Ye, K., Foster, S., Woodcock, J.: Automated reasoning for probabilistic sequential programs with theorem proving. In: Fahrenberg, U., Gehrke, M., Santocanale, L., Winter, M. (eds.) RAMiCS 2021. LNCS, vol. 13027, pp. 465–482. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-88701-8_28

    Chapter  Google Scholar 

  7. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall Int. (1985)

    Google Scholar 

  8. Roscoe, A.W.: Understanding Concurrent Systems. Texts in Computer Science, Springer, Heidelberg (2011)

    MATH  Google Scholar 

  9. Xia, L.Y., et al.: Interaction trees: representing recursive and impure programs in Coq. Proc. ACM Program. Lang. 4(POPL) (2019)

    Google Scholar 

  10. Foster, S., Hur, C.K., Woodcock, J.: Formally verified simulations of state-rich processes using interaction trees in Isabelle/HOL. In: Haddad, S., Varacca, D. (eds.) 32nd International Conference on Concurrency Theory (CONCUR 2021). Leibniz International Proceedings in Informatics (LIPIcs), Dagstuhl, Germany, vol. 203, pp. 20:1–20:18. Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2021)

    Google Scholar 

  11. Brookes, S.D., Hoare, C.A.R., Roscoe, A.W.: A theory of communicating sequential processes. J. ACM (JACM) 31, 560–599 (1984)

    Article  MATH  Google Scholar 

  12. Gibson-Robinson, T., Armstrong, P., Boulgakov, A., Roscoe, A.W.: FDR3—a modern refinement checker for CSP. In: Ábrahám, E., Havelund, K. (eds.) TACAS 2014. LNCS, vol. 8413, pp. 187–201. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-642-54862-8_13

    Chapter  MATH  Google Scholar 

  13. Haftmann, F., Nipkow, T.: Code generation via higher-order rewrite systems. In: Blume, M., Kobayashi, N., Vidal, G. (eds.) FLOPS 2010. LNCS, vol. 6009, pp. 103–117. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-12251-4_9

    Chapter  Google Scholar 

  14. Mayr, R., Nipkow, T.: Higher-order rewrite systems and their confluence. Theor. Comput. Sci. 192(1), 3–29 (1998)

    Article  MATH  Google Scholar 

  15. Hilder, J.A., et al.: Chemical detection using the receptor density algorithm. IEEE Trans. Syst. Man Cybern. Part C 42(6), 1730–1741 (2012)

    Article  Google Scholar 

  16. Miyazawa, A., et al.: RoboChart Reference Manual. Technical report, University of York (2020). https://www.cs.york.ac.uk/circus/publications/techreports/reports/robochart-reference.pdf

  17. Blanchette, J.C., Hölzl, J., Lochbihler, A., Panny, L., Popescu, A., Traytel, D.: Truly modular (co)datatypes for Isabelle/HOL. In: Klein, G., Gamboa, R. (eds.) ITP 2014. LNCS, vol. 8558, pp. 93–110. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08970-6_7

    Chapter  Google Scholar 

  18. Spivey, J.M.: The Z Notation: A Reference Manual, 2nd edn. Prentice-Hall (1992)

    Google Scholar 

  19. Toyn, I. (ed.): Information Technology—Z Formal Specification Notation—Syntax, Type System and Semantics. ISO (2002). ISO/IEC 13568:2002(E)

    Google Scholar 

  20. Ballarin, C.: Locales and locale expressions in Isabelle/Isar. In: Berardi, S., Coppo, M., Damiani, F. (eds.) TYPES 2003. LNCS, vol. 3085, pp. 34–50. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24849-1_3

    Chapter  MATH  Google Scholar 

  21. Kazmierczak, E., Winikoff, M., Dart, P.W.: Verifying model oriented specifications through animation. In: 5th Asia-Pacific Software Engineering Conference (APSEC 1998), Taipei, Taiwan, ROC, 2–4 December 1998, pp. 254–261. IEEE Computer Society (1998)

    Google Scholar 

  22. Boichut, Y., Genet, T., Glouche, Y., Heen, O.: Using animation to improve formal specifications of security protocols. In: 2nd Conference on Security in Network Architectures and Information Systems, SARSSI 2007, pp. 169–182 (2007)

    Google Scholar 

  23. Leuschel, M., Butler, M.: ProB: a model checker for B. In: Araki, K., Gnesi, S., Mandrioli, D. (eds.) FME 2003. LNCS, vol. 2805, pp. 855–874. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45236-2_46

    Chapter  Google Scholar 

  24. de Souza, D.H.O.: Joker: an animator for formal languages. Ph.D. thesis, Departamento de Informática e Matemática Aplicada, Universidade Federal do Rio Grande do Norte (2011)

    Google Scholar 

  25. Rosu, G., Serbanuta, T.: An overview of the K semantic framework. J. Log. Algebraic Methods Program. 79(6), 397–434 (2010)

    Article  MATH  Google Scholar 

  26. Ellison, C., Rosu, G.: An executable formal semantics of C with applications. In: Field, J., Hicks, M. (eds.) Proceedings of the 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2012, Philadelphia, Pennsylvania, USA, 22–28 January 2012, pp. 533–544. ACM (2012)

    Google Scholar 

  27. Bogdanas, D., Rosu, G.: K-Java: a complete semantics of Java. In: Rajamani, S.K., Walker, D. (eds.) Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, 15–17 January 2015, pp. 445–456. ACM (2015)

    Google Scholar 

  28. Kemeny, J.G., Snell, J.L., Knapp, A.W.: Denumerable Markov Chains (1976)

    Google Scholar 

  29. Kemeny, J.G., Snell, J.L.: Finite Markov Chains: With a New Appendix “Generalization of a Fundamental Matrix’’. Undergraduate Texts in Mathematics, Springer, Heidelberg (1983)

    MATH  Google Scholar 

Download references

Acknowledgements

This work is funded by the EPSRC projects CyPhyAssure (https://www.cs.york.ac.uk/circus/CyPhyAssure/, Grant EP/S001190/1), RoboCalc (Grant EP/M025756/1), and RoboTest (Grant EP/R025479/1). The icons used in RoboChart have been made by Sarfraz Shoukat, Freepik, Google, Icomoon and Madebyoliver from www.flaticon.com, and are licensed under CC 3.0 BY.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Kangfeng Ye .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Ye, K., Foster, S., Woodcock, J. (2022). Formally Verified Animation for RoboChart Using Interaction Trees. In: Riesco, A., Zhang, M. (eds) Formal Methods and Software Engineering. ICFEM 2022. Lecture Notes in Computer Science, vol 13478. Springer, Cham. https://doi.org/10.1007/978-3-031-17244-1_24

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-17244-1_24

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-17243-4

  • Online ISBN: 978-3-031-17244-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics