Advertisement

On Representation of Simulation Time in Functional Programming Style

  • 2 Accesses

Abstract

Functional programming is becoming increasingly useful in the modern computerized world. This approach helps create code that is more reliable, easier to reason about, and automatically verifiable. However, these techniques are rarely employed for developing design tools and modeling critical systems. In this work, we try to apply some suitable techniques of functional programming to create a modeling system, namely, a simulation system for analyzing temporal behavioral properties of critical systems. As the first step, we design a representation of simulation time in terms of abstractions used in functional programming and try to investigate its compositionability.

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

Access options

Buy single article

Instant unlimited access to the full article PDF.

US$ 39.95

Price includes VAT for USA

Notes

  1. 1.

    Webpage of project 17-01-00504 of the Russian Foundation for Basic Research: https://forge.ispras.ru/projects/ductilejur.

REFERENCES

  1. 1

    Buzdalov, D. and Khoroshilov, A., A discrete-event simulator for early validation of avionics systems, Proc. 1st Int. Workshop Architecture Centric Virtual Integration co-located with 17th Int. Conf. Model Driven Engineering Languages and Systems (MoDELS), 2014, vol. 1233.

  2. 2

    Buzdalov, D., Simulation of AADL models with software-in-the-loop execution, ACM SIGAda Ada Lett., 2016, vol. 36, no. 2, pp. 49–53.

  3. 3

    Hughes, J., Why functional programming matters, Chalmers University of Technology, 1984. http://www.cse.chalmers.se/~rjmh/Papers/whyfp.pdf. Accessed December 18, 2018.

  4. 4

    Jones, S.P., Functional programming languages as a software engineering tool, Lect. Notes Comput. Sci., 1986, vol. 284, pp. 153–173.

  5. 5

    Jones, S.P. and Wadler, P., Imperative functional programming, Proc. 20th ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL), 1993, pp. 71–84.

  6. 6

    The IO monad for Scala. https://typelevel.org/cats-effect. Accessed December 18, 2018.

  7. 7

    Monix library, Task monad. https://monix.io/docs/3x/eval/task.html. Accessed December 18, 2018.

  8. 8

    ZIO, Scala-library for asynchronous and concurrent programming, IO monad. https://scalaz.github.io/scalaz-zio/datatypes/io.html. Accessed December 18, 2018.

  9. 9

    Moggi, E., Notions of computation and monads, Inf. Comput., 1991, vol. 93, no. 1, pp. 55–92.

  10. 10

    Wadler, P., Comprehending monads, Math. Struct. Comput. Sci., 1992, vol. 2, no. 4, pp. 461–493.

  11. 11

    McBride, C. and Paterson, R., Applicative programming with effects, J. Funct. Program., 2008, vol. 18, no. 1, pp. 1–13.

  12. 12

    Kiselyov, O., Having an effect, Presentation at the Seminar at the Institute of Information Science, Taipei, 2016. http://okmij.org/ftp/Computation/having-effect.html. Accessed December 18, 2018.

  13. 13

    Guy, L. and Steele, Jr., Building interpreters by composing monads, Proc. 21st ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL), 1994, pp. 472–492.

  14. 14

    Liang, S., Hudak, P., and Jonest, M., Monad transformers and modular interpreters, Proc. 22nd ACM SIGPLAN-SIGACT Symp. Principles of Programming Languages (POPL), 1995, pp. 333–343.

  15. 15

    Kiselyov, O., Sabry, A., and Swords, C., Extensible effects: An alternative to monad transformers, Proc. ACM SIGPLAN Symp. Haskell, 2013, pp. 59–70.

  16. 16

    Kiselyov, O. and Ishi, H., Freer monads, more extensible effects, Proc. ACM SIGPLAN Symp. Haskell, 2015, pp. 94–105.

  17. 17

    Kiselyov, O., Typed tagless final interpreters, Lect. Notes Comput. Sci.e, 2012, vol. 7470, pp. 130–174.

  18. 18

    Welsh, N., Uniting Church and State: FP and OO together, Scala Days Conf., Copenhagen, 2017. http://www.youtube.com/watch?v=IO5MD62dQbI. Accessed December 18, 2018.

  19. 19

    Nizhnikov, O., Modern FP with tagless final, Conf. Joker, St. Petersburg, 2018. http://www.youtube.com/watch?v=sWEtnq0ReZA. Accessed December 18, 2018.

  20. 20

    Bjarnason, R., Introduction to the Unison programming language, Lambda World Conf., Seattle, 2018. http://www.youtube.com/watch?v=rp_Eild1aq8. Accessed December 18, 2018.

  21. 21

    Hughes, J., Generalising monads to arrows, Sci. Comput. Program., 2000, vol. 37, nos. 1–3, pp. 67–111.

  22. 22

    Hughes, J., Programming with arrows, Advanced Functional Programming, 2004, pp. 73–129.

  23. 23

    Lindley, S., Wadler, P., and Yallop, J., Idioms are oblivious, arrows are meticulous, monads are promiscuous, Electron. Notes Theor. Comput. Sci., 2011, vol. 229, no. 5, pp. 97–117.

  24. 24

    Polyulya, Y., Functional programming with arrows, Scala Days Conf., Amsterdam, 2015. http://www.youtube.com/watch?v=ZfAgvAIoUEY. Accessed December 18, 2018.

  25. 25

    Foy, J.D., Do it with (free?) arrows!, Typelevel Summit, Copenhagen, 2017. http://www.youtube.com/watch?v=PWBTOhMemxQ. Accessed December 18, 2018.

  26. 26

    De Goes, J.A., Blazing fast, pure effects without monads, LambdaConf Conf., Boulder, USA, 2018. http://www.youtube.com/watch?v=L8AEj6IRNEE. Accessed December 18, 2018.

  27. 27

    Parallel typeclass, cats library. https://typelevel.org/cats/typeclasses/parallel.html. Accessed December 18, 2018.

  28. 28

    Leontiev, G., There’s a Prolog in your Scala, ScalaIO Conf., Paris, 2014. https://www.youtube.com/watch?v=iYCR2wzfdUs. Accessed December 18, 2018.

  29. 29

    Troitskiy, A.M. and Buzdalov, D.V., A static approach to estimation of execution time of components in AADL models, Tr. Inst. Sistemnogo Program. Ross. Akad. Nauk (Proc. Inst. Syst. Program. Russ. Acad. Sci.), 2016, vol. 28, no. 2, pp. 157–172. https://doi.org/10.15514/ISPRAS-2016-28(2)-10

  30. 30

    Amin, N., Rompf, T., and Odersky, M., Foundations of path-dependent types, Proc. ACM Int. Conf. Object-Oriented Programming Systems Languages and Applications, 2014, pp. 233–249.

Download references

Author information

Correspondence to D. V. Buzdalov or A. K. Petrenko or A. V. Khoroshilov.

Additional information

Translated by Yu. Kornienko

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Buzdalov, D.V., Petrenko, A.K. & Khoroshilov, A.V. On Representation of Simulation Time in Functional Programming Style. Program Comput Soft 45, 485–496 (2019) doi:10.1134/S0361768819080073

Download citation