Advertisement

Static and Dynamic Visualisations of Monadic Programs

  • Jurriën StutterheimEmail author
  • Peter AchtenEmail author
  • Rinus PlasmeijerEmail author
Chapter
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10094)

Abstract

iTasks is a shallowly embedded monadic domain-specific language written in the lazy, functional programming language Clean. It implements the Task-Oriented Programming (TOP) paradigm. In TOP one describes, on a high level of abstraction, the tasks that distributed collaborative systems and end users have to do. It results in a web application that is able to coordinate the work thus described. Even though iTasks is defined in the common notion of “tasks”, for stake holders without programming experience, textual source code remains too difficult to understand. In previous work, we introduced Tonic (Task-Oriented Notation Inferred from Code) to graphically represent iTasks programs using blueprints. Blueprints are designed to bridge the gap between domain-expert and programmer. In this paper, we add the capability to graphically trace the dynamic behaviour of an iTasks program at run-time. This enables domain experts, managers, end users and programmers to follow and inspect the work as it is being executed. Using dynamic blueprints we can show, in real-time, who is working on what, which tasks are finished, which tasks are active, and what their parameters and results are. Under certain conditions we can predict which future tasks are reachable and which not. In a way, we have created a graphical tracing and debugging system for the TOP domain and have created the foundation for a tracing and debugging system for monads in general. Tracing and debugging is known to be hard to realize for lazy functional languages. In monadic contexts, however, the order of evaluation is well-defined, reducing the challenges Tonic needs to overcome.

Keywords

Dynamic program visualisation Purely functional programming Monads iTasks Clean 

Supplementary material

References

  1. 1.
    Achten, P., Stutterheim, J., Domoszlai, L., Plasmeijer, R.: Task oriented programming with purely compositional interactive scalable vector graphics. In: Tobin-Hochstadt, S. (ed.) Proceedings of the 26Nd 2014 International Symposium on Implementation and Application of Functional Languages, IFL 2014, pp. 7:1–7:13. ACM, New York (2014).  https://doi.org/10.1145/2746325.2746329
  2. 2.
    Andy, G.: Debugging haskell by observing intermediate data structures. Electron. Notes Theor. Comput. Sci. 41(1), 1 (2001). http://www.sciencedirect.com/science/article/pii/S1571066105805389CrossRefGoogle Scholar
  3. 3.
    Arisholm, E., Briand, L.C., Hove, S.E., Labiche, Y.: The impact of UML documentation on software maintenance: an experimental evaluation. IEEE Trans. Softw. Eng. 32(6), 365–381 (2006). http://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&arnumber=1650213&contentType=Journals+CrossRefGoogle Scholar
  4. 4.
    Henrix, J., Plasmeijer, R., Achten, P.: GiN: a graphical language and tool for defining iTask workflows. In: Peña, R., Page, R. (eds.) TFP 2011. LNCS, vol. 7193, pp. 163–178. Springer, Heidelberg (2012).  https://doi.org/10.1007/978-3-642-32037-8_11CrossRefGoogle Scholar
  5. 5.
    Nilsson, H.: Information: declarative debugging for lazy functional languages (1998). http://books.google.nl/books?id=nQQ9AAAACAAJ&dq=intitle:Declarative+Debugging+for+Lazy+Functional+Languages&hl=&cd=1&source=gbs_api. Science, U.i.L.D.o.C
  6. 6.
    Nilsson, H., Sparud, J.: The evaluation dependence tree as a basis for lazy functional debugging. Autom. Softw. Eng. 4(2), 121–150 (1997). http://link.springer.com/10.1023/A:1008681016679CrossRefGoogle Scholar
  7. 7.
    Object Management Group: Business process model and notation (BPMN) version 1.2. Technical report, Object Management Group (2009)Google Scholar
  8. 8.
    Object Modeling Group: OMG unified modeling language specification. Technical report, March 2000. http://www.omg.org/spec/UML/1.3/PDF/index.htm
  9. 9.
    Object Modeling Group: OMG unified modeling language (OMG UML), infrastructure. Technical report, March 2012. http://www.omg.org/spec/UML/2.4.1/Infrastructure/PDF/
  10. 10.
    OMG: OMG unified modeling language (OMG UML), superstructure, Version 2.4.1, August 2011. http://www.omg.org/spec/UML/2.4.1
  11. 11.
    Plasmeijer, R., Achten, P., Koopman, P., Lijnse, B., Van Noort, T., Van Groningen, J.: iTasks for a change: type-safe run-time change in dynamically evolving workflows. In: PEPM ’11: Proceedings Workshop on Partial Evaluation and Program Manipulation, PEPM 2011, Austin, TX, USA, pp. 151–160. ACM, New York (2011)Google Scholar
  12. 12.
    Plasmeijer, R., van Eekelen, M.: Clean language report (version 2.1) (2002). http://clean.cs.ru.nl
  13. 13.
    Poswig, J., Vrankar, G., Morara, C.: VisaVis: a higher-order functional visual programming language. J. Vis. Lang. Comput. 5(1), 83–111 (1994). http://linkinghub.elsevier.com/retrieve/pii/S1045926X84710056CrossRefGoogle Scholar
  14. 14.
    Reekie, H.J.: Visual haskell: a first attempt. Technical report (1994). http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.56.1582&rep=rep1&type=pdf
  15. 15.
    Reinke, C.: GHood–graphical visualisation and animation of Haskell object observations. In: 2001 ACM SIGPLAN (2001). http://www.haskell.org/haskell-workshop/2001/proceedings.pdf#page=127
  16. 16.
    Sparud, J., Runciman, C.: Tracing lazy functional computations using redex trails. In: Glaser, H., Hartel, P., Kuchen, H. (eds.) PLILP 1997. LNCS, vol. 1292, pp. 291–308. Springer, Heidelberg (1997).  https://doi.org/10.1007/BFb0033851CrossRefGoogle Scholar
  17. 17.
    Sparud, J., Runciman, C.: Complete and partial redex trails of functional computations. In: Clack, C., Hammond, K., Davie, T. (eds.) IFL 1997. LNCS, vol. 1467, pp. 160–177. Springer, Heidelberg (1998).  https://doi.org/10.1007/BFb0055430CrossRefGoogle Scholar
  18. 18.
    Stutterheim, J., Plasmeijer, R., Achten, P.: Tonic: an infrastructure to graphically represent the definition and behaviour of tasks. In: Hage, J., McCarthy, J. (eds.) TFP 2014. LNCS, vol. 8843, pp. 122–141. Springer, Cham (2015).  https://doi.org/10.1007/978-3-319-14675-1_8CrossRefGoogle Scholar
  19. 19.
    White, S.A.: Business process model and notation, V1.1 pp. 1–318, January 2008. http://www.omg.org/spec/BPMN/1.1/PDF/

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Institute for Computing and Information SciencesRadboud University NijmegenNijmegenThe Netherlands

Personalised recommendations