Skip to main content

An Approach to Using Templates for Modeling Exceptions in Terms of Petri Nets

  • Conference paper
  • First Online:
Intelligent Algorithms in Software Engineering (CSOC 2020)

Part of the book series: Advances in Intelligent Systems and Computing ((AISC,volume 1224))

Included in the following conference series:

  • 1407 Accesses

Abstract

This article proposes an approach to modeling imperative programs with exceptions in terms of Petri nets using template based translation of the source code into compositional model. To achieve deep automation of the model constructing algorithm for the intermediate representation of the program, an abstract semantic graph (ASG) is used. ASG terms are presented in graphical form in the article. For these terms, a minimal set of template Petri nets is presented and described. An example of a small program is presented and a complete model of the example program has been built and the resulting compositional Petri net is presented. The reachability graph of resulting model is build, analyzing which, one can find and trace back the points of exception raise. So the proposed approach allows to check where each particular exception is handled and which exceptions are handled in a particular catch block #CSOC1120.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /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
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 169.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

References

  1. Goodenough, J.B.: Structured exception handling. In: Proceedings of the 2nd ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, POPL 1975, pp. 204–224. ACM, New York (1975). https://doi.org/10.1145/512976.512997

  2. Goodenough, J.B.: Exception handling: issues and a proposed notation. Commun. ACM 18(12), 683–696 (1975). https://doi.org/10.1145/361227.361230

    Article  MathSciNet  MATH  Google Scholar 

  3. Goldberg, A., Robson, D.: Smalltalk-80: The Language and Its Implementation. Addison-Wesley Longman Publishing Co., Inc., Boston (1983)

    MATH  Google Scholar 

  4. Stroustrup, B.: The C++ Programming Language, 4th edn. Addison-Wesley Professional, Boston (2013)

    MATH  Google Scholar 

  5. Gosling, J., Joy, B., Steele, G.L., Bracha, G., Buckley, A.: The Java Language Specification, Java SE 8 Edition, 1st edn. Addison-Wesley Professional, Boston (2014)

    Google Scholar 

  6. Rossum, G.: Python reference manual. Technical report, CWI (Centre for Mathematics and Computer Science), Amsterdam, The Netherlands (1995)

    Google Scholar 

  7. Flanagan, D., Matsumoto, Y.: The Ruby Programming Language, 1st edn. O’Reilly, Sebastopol (2008)

    Google Scholar 

  8. Mayer, W., Stumptner, M., Wotawa, F.: Debugging program exceptions. In: Ali, M., Dapoigny, R. (eds.) Fourteenth International Workshop on Principles of Diagnosis (DX-2003), pp. 119–124 (2003)

    Google Scholar 

  9. Amighi, A., de Gomes, P.C., Gurov, D., Huisman, M.: Sound control-flow graph extraction for Java programs with exceptions. In: Proceedings of the 10th International Conference on Software Engineering and Formal Methods, SEFM 2012, pp. 33–47. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-33826-7_3

  10. Kastrinis, G., Smaragdakis, Y.: Efficient and effective handling of exceptions in Java points-to analysis. In: Proceedings of the 22nd International Conference on Compiler Construction, CC 2013, pp. 41–60. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37051-9_3

  11. Robillard, M.P., Murphy, G.C.: Designing robust Java programs with exceptions. SIGSOFT Softw. Eng. Notes 25(6), 2–10 (2000). https://doi.org/10.1145/357474.355046

    Article  Google Scholar 

  12. Kharitonov, D., Tarasov, G., Golenkov, E.: Modeling of object-oriented programs with Petri Net structured objects. Comput. Inform. 36(5), 1063–1087 (2017). http://doi.org/10.4149/cai _2017 _5_ 1063

  13. Kharitonov, D., Tarasov, G.: Modeling function calls in program control flow in terms of Petri Nets. Adv. Comput. Sci. Int. J. 3(6), 82–91 (2014). http://www.acsij.org/acsij/article/view/151

  14. Vizovitin, N.V., Nepomniaschy, V.A., Stenenko, A.A.: Verifying UCM specifications of distributed systems using colored Petri Nets. Cybern. Syst. Anal. 51(2), 213–222 (2015). https://doi.org/10.1007/s10559-015-9714-0

    Article  MATH  Google Scholar 

  15. Vizovitin, N., Nepomniaschy, V., Stenenko, A.: Verification of UCM models with scenario control structures using coloured Petri nets. Syst. Inform. 11–22 (2016). https://doi.org/10.31144/si.2307-6410.2016.n7.p11-22

  16. Kurbatsky, E.: Verification of automata-based programs. In: Proceedings of the Second Spring Young Researchers Colloquium on Software Engineering, vol. 2, pp. 15–17. Institute for System Programming of the Russian Academy of Sciences (2008). https://doi.org/10.15514/syrcose-2008-2-15

  17. Gurov, V.S., Mazin, M.A., Narvsky, A.S., Shalyto, A.A.: Tools for support of automata-based programming. Program. Comput. Softw. 33(6), 343–355 (2007). https://doi.org/10.1134/s0361768807060059

    Article  MATH  Google Scholar 

Download references

Acknowledgment

Financial support provided by the state-funded theme of the Ministry of Education and Science of the Russian Federation No. AAAA-A17-117040450019-8 is greatly appreciated.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to D. I. Kharitonov .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Leontev, D.V., Kharitonov, D.I., Odyakova, D.S., Parakhin, R.V. (2020). An Approach to Using Templates for Modeling Exceptions in Terms of Petri Nets. In: Silhavy, R. (eds) Intelligent Algorithms in Software Engineering. CSOC 2020. Advances in Intelligent Systems and Computing, vol 1224. Springer, Cham. https://doi.org/10.1007/978-3-030-51965-0_20

Download citation

Publish with us

Policies and ethics