“Integrated Debugging of Modelica Models”

Authors: Adrian Pop, Martin Sjölund, Adeel Ashgar, Peter Fritzson and Francesco Casella,
Affiliation: Linköping University and Politecnico di Milano (Italy)
Reference: 2014, Vol 35, No 2, pp. 93-107.

Keywords: Modelica, Debugging, Modeling and Simulation, Transformations, Equations

Abstract: The high abstraction level of equation-based object-oriented (EOO) languages such as Modelica has the drawback that programming and modeling errors are often hard to find. In this paper we present integrated static and dynamic debugging methods for Modelica models and a debugger prototype that addresses several of those problems. The goal is an integrated debugging framework that combines classical debugging techniques with special techniques for equation-based languages partly based on graph visualization and interaction. To our knowledge, this is the first Modelica debugger that supports both equation-based transformational and algorithmic code debugging in an integrated fashion.

PDF PDF (612 Kb)        DOI: 10.4173/mic.2014.2.3

DOI forward links to this article:
[1] Åke Kinnander, Martin Sjölund and Adrian Pop (2016), doi:10.4173/mic.2016.4.3
[2] Janos Sztipanovits, Ted Bapty, Xenofon Koutsoukos, Zsolt Lattmann, Sandeep Neema and Ethan Jackson (2018), doi:10.1109/JPROC.2018.2838530
[3] Kexi Hou and Yaohui Li (2019), doi:10.3390/pr7060334
[4] G. Schweiger, H. Nilsson, J. Schoeggl, W. Birk and A. Posch (2020), doi:10.1016/j.amc.2019.124713
[5] Simon Van Mierlo, Hans Vangheluwe, Simon Breslav, Rhys Goldstein and Azam Khan (2020), doi:10.1145/3338530
[6] Mehdi Dadfarnia and Raphael Barbau (2019), doi:10.1109/SYSCON.2019.8836890
[7] Peter Fritzson, Adrian Pop, Karim Abdelhak, Adeel Ashgar, Bernhard Bachmann, Willi Braun, Daniel Bouskela, Robert Braun, Lena Buffoni, Francesco Casella, Rodrigo Castro, Rudiger Franke, Dag Fritzson, (2020), doi:10.4173/mic.2020.4.1
[8] Lena Buffoni, Lennart Ochel, Adrian Pop, Peter Fritzson, Niklas Fors, Gorel Hedin, Walid Taha and Martin Sjolund (2021), doi:10.3390/electronics10080902
References:
[1] Anderson, E., Bai, Z., Bischof, C., Blackford, S., Demmel, J., Dongarra, J., DuCroz, J., Greenbaum, A., Hammarling, S., McKenney, A., and Sorensen, D. (1999). LAPACK Users' Guide, Society for Industrial and Applied Mathematics, Philadelphia, PA, third edition.
[2] Braun, W., Ochel, L., and Bachmann, B. (2011). Symbolically derived Jacobians using automatic differentiation - enhancement of the OpenModelica compiler, In modelica2011. doi:10.3384/ecp11063
[3] Bunus, P. (2004). Debugging techniques for Equation-Based languages, Doctoral thesis No 873, Linköping University, Department of Computer and Information Science. http://urn.kb.se/resolve?urn=urn:nbn:se:liu:diva-35555.
[4] Bunus, P. and Fritzson, P. (2003). Semi-automatic fault localization and behavior verification for physical system simulation models, In 18th IEEE International Conference on Automated Software Engineering. pages 253--258. doi:10.1109/ASE.2003.1240315
[5] Casella, F., Donida, F., and Åkesson, J. (2009). An XML representation of DAE systems obtained from Modelica models, In F.Casella, editor, Proceedings of the 7th International Modelica Conference. Linköping University Electronic Press. doi:10.3384/ecp09430073
[6] Clauß, C., editor. (2011). Proceedings of the 8th International Modelica Conference, Linköping University Electronic Press.
[7] Elliott, C.M. (2009). Beautiful differentiation, In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, ICFP '09. ACM, New York, NY, USA, pages 191--202, 2009. doi:10.1145/1596550.1596579
[8] Elmqvist, H. and Otter, M. (1994). Methods for tearing systems of equations in object-oriented modelling, In A.Guasch and R.M. Huber, editors, Proceedings of the European Simulation Multiconference, ESM'94. Society for Computer Simulation, pages 326--332. http://www.robotic.de/fileadmin/control/shared/publications/1994/elmqvist_esm.ps.gz.
[9] Frenkel, J., Schubert, C., Kunze, G., Fritzson, P., Sjölund, M., and Pop, A. (2011). Towards a benchmark suite for Modelica compilers: Large models, In modelica2011. doi:10.3384/ecp11063232
[10] Fritzson, P. (2014). Principles of Object-Oriented Modeling and Simulation with Modelica 3, 3: A Cyber-Physical Approach. Wiley-IEEE Press.
[11] Mattsson, S.E., Olsson, H., and Elmqvist, H. (2000). Dynamic selection of states in Dymola, In M.Otter, editor, Modelica Workshop 2000. Modelica Association, pages 61--67. https://modelica.org/events/workshop2000/proceedings/Mattsson.pdf.
[12] Mattsson, S.E. and Söderlind, G. (1992). A new technique for solving high-index differential-algebraic equations using dummy derivatives, In Computer-Aided Control System Design. (CACSD), 1992 IEEE Symposium on. pages 218--224. doi:10.1109/CACSD.1992.274429
[13] Mattsson, S.E. and Söderlind, G. (1993). Index reduction in differential algebraic equations using dummy derivatives, Siam Journal on Scientific Computing. 14:677--692. doi:10.1137/0914043
[14] Modelica Association. (2012). Modelica: A unified object-oriented language for physical systems modeling, language specification version 3, 3. 2012. http://www.modelica.org/.
[15] Modelica Association. (2013). Modelica Standard Library version 3, 2.1. 2013. https://modelica.org/libraries.
[16] Open Source Modelica Consortium. (2014). MDT -- Modelica Development Tooling, 2014. https://trac.openmodelica.org/MDT/.
[17] Open Source Modelica Consortium. (2014). Openmodelica, 2014. https://openmodelica.org/.
[18] Pantelides, C.C. (1988). The consistent initialization of differential-algebraic systems, SIAM Journal on Scientific and Statistical Computing. 9(2):213--231. doi:10.1137/0909014
[19] Parrotto, R., Åkesson, J., and Casella, F. (2010). An XML representation of DAE systems obtained from continuous-time Modelica models, In P.Fritzson, E.Lee, F.Cellier, and D.Broman, editors, Proceedings of the 3rd International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools. Linköping University Electronic Press, pages 91--98. http://www.ep.liu.se/ecp/047/.
[20] Pop, A. (2008). Integrated Model-Driven Development Environments for Equation-Based Object-Oriented Languages, Doctoral thesis No 1183, Department of Computer and Information Science, Linköping University, Sweden.
[21] Pop, A., Akhvlediani, D., and Fritzson, P. (2007). Towards run-time debugging of equation-based object-oriented languages, In Proceedings of the 48th Scandinavian Conference on Simulation and Modeling (SIMS). 2007.
[22] Sjölund, M. and Fritzson, P. (2011). Debugging symbolic transformations in equation systems, In F.Cellier, D.Broman, P.Fritzson, and E.Lee, editors, Proceedings of the 4th International Workshop on Equation-Based Object-Oriented Modeling Languages and Tools. Linköping University Electronic Press. http://www.ep.liu.se/ecp_home/index.en.aspx?issue=056.
[23] Sjölund, M., Fritzson, P., and Pop, A. (2014). Bootstrapping a Compiler for an Equation-Based Object-Oriented Language, Modeling, Identification and Control. 35(1):1--19. doi:10.4173/mic.2014.1.1
[24] Soares, R.P. and Secchi, A.R. (2005). Direct initialisation and solution of high-index dae systems, In L.Puigjaner and A.Espuña, editors, European Symposium on Computer-Aided Process Engineering-15, 38th European Symposium of the Working Party on Computer Aided Process Engineering, volume20 of Computer Aided Chemical Engineering, pages 157--162. Elsevier. doi:10.1016/S1570-7946(05)80148-8
[25] Stallman, R., Pesch, R., Shebs, S., etal. (2014). Debugging with GDB, Free Software Foundation. http://www.gnu.org/software/gdb/documentation/.


BibTeX:
@article{MIC-2014-2-3,
  title={{Integrated Debugging of Modelica Models}},
  author={Pop, Adrian and Sjölund, Martin and Ashgar, Adeel and Fritzson, Peter and Casella, Francesco},
  journal={Modeling, Identification and Control},
  volume={35},
  number={2},
  pages={93--107},
  year={2014},
  doi={10.4173/mic.2014.2.3},
  publisher={Norwegian Society of Automatic Control}
};