Three Algorithms for Converting Control Flow Statements from Python to XD-M | SpringerLink
Skip to main content

Three Algorithms for Converting Control Flow Statements from Python to XD-M

  • Conference paper
  • First Online:
Algorithmic Aspects in Information and Management (AAIM 2022)

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

Included in the following conference series:

  • 548 Accesses

Abstract

This paper presents an approach to show how to implement three complex statements: continue, break, return of Python to XD-M language. To this end, three algorithms for implementing three complex statements are given in detail. Further, three complex statements are implemented in XD-M. Finally, a program example is presented to illustrate how to use the proposed approach to build an XD-M program equivalent to the original Python program.

The research is supported by the National Key Research and Development Program of China (2018AAA0103202); National Natural Science Foundation of China (62172322, 61751207, 61732013); Shannxi Key Science and Technology Innovation Team Project (2019TD-001); Natural Science Basic Research Program of Shaanxi Province (2022JM-367).

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

Access this chapter

Subscribe and save

Springer+ Basic
¥17,985 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
JPY 3498
Price includes VAT (Japan)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
JPY 5719
Price includes VAT (Japan)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
JPY 7149
Price includes VAT (Japan)
  • 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

References

  1. P2M: A Python to XD-M translator. https://github.com/FairyJiar/P2M

  2. Python AST Document. https://docs.python.org/3/library/ast.html

  3. Python Homepage. https://www.python.org/

  4. Allen, F.E.: Control flow analysis. ACM SIGPLAN Notices 5(7), 1–19 (1970)

    Article  Google Scholar 

  5. Baker, B.S., Kosaraju, S.R.: A comparison of multilevel break and next statements. J. ACM (JACM) 26(3), 555–566 (1979)

    Article  MathSciNet  Google Scholar 

  6. Bowman, H., Thompson, S.: A decision procedure and complete axiomatization of finite interval temporal logic with projection. J. Logic Comput. 13(2), 195–239 (2003)

    Article  MathSciNet  Google Scholar 

  7. Chen, W.: Loop invariance with break and continue. Sci. Comput. Program. 209, 102679 (2021)

    Article  Google Scholar 

  8. Duan, Z.: Temporal Logic and Temporal Logic Programming. Science Press, Beijing (2005)

    Google Scholar 

  9. Duan, Z., Tian, C.: A practical decision procedure for propositional projection temporal logic with infinite models. Theoret. Comput. Sci. 554, 169–190 (2014)

    Article  MathSciNet  Google Scholar 

  10. Duan, Z., Tian, C., Zhang, N.: A canonical form based decision procedure and model checking approach for propositional projection temporal logic. Theoret. Comput. Sci. 609, 544–560 (2016)

    Article  MathSciNet  Google Scholar 

  11. Duan, Z., Yang, X., Koutny, M.: Framed temporal logic programming. Sci. Comput. Program. 70(1), 31–61 (2008)

    Article  MathSciNet  Google Scholar 

  12. Hammond, M., Robinson, A.: Python Programming on Win32: Help for Windows Programmers. O’Reilly Media, Inc., Sebastapol (2000)

    Google Scholar 

  13. Lomet, D.B.: Control structures and the RETURN statement. In: Watson T.J., (ed.) IBM Research Division (1973)

    Google Scholar 

  14. Rosner, R., Pnueli, A.: A choppy logic. Weizmann Institute of Science, Department of Applied Mathematics (1986)

    Google Scholar 

  15. Sorva, J., Vihavainen, A.: Break statement considered. ACM Inroads 7(3), 36–41 (2016)

    Article  Google Scholar 

  16. Taft, S.T.: Implementing the extended return statement for ADA 2005. In: Proceedings of the 2008 ACM Annual International Conference on SIGAda Annual International Conference, pp. 97–104 (2008)

    Google Scholar 

  17. Tian, C., Duan, Z., Duan, Z.: Making CEGAR more efficient in software model checking. IEEE Trans. Softw. Eng. 40(12), 1206–1223 (2014)

    Article  Google Scholar 

  18. Wang, X., Tian, C., Duan, Z., Zhao, L.: MSVL: a typed language for temporal logic programming. Front. Comput. Sci. 11(5), 762–785 (2017)

    Article  Google Scholar 

  19. Zhang, N., Duan, Z., Tian, C.: A mechanism of function calls in MSVL. Theoret. Comput. Sci. 654, 11–25 (2016)

    Article  MathSciNet  Google Scholar 

  20. Zhang, N., Duan, Z., Tian, C.: Model checking concurrent systems with MSVL. Sci. China Inf. Sci. 59(11), 1–3 (2016)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Nan Zhang or Zhenhua Duan .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

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

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Wang, J., Zhang, N., Duan, Z. (2022). Three Algorithms for Converting Control Flow Statements from Python to XD-M. In: Ni, Q., Wu, W. (eds) Algorithmic Aspects in Information and Management. AAIM 2022. Lecture Notes in Computer Science, vol 13513. Springer, Cham. https://doi.org/10.1007/978-3-031-16081-3_40

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-16081-3_40

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-16080-6

  • Online ISBN: 978-3-031-16081-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics