Files:DescriptionFile size FormatBrowse
Fulltext1.47 MBPDF (requires Acrobat Reader)Previous | Next
  
Authors:Adrian Pop: Programming Environments Laboratory, Department of Computer and Information Science, Linköping University, Linköping, Sweden
Martin Sjölund: Programming Environments Laboratory, Department of Computer and Information Science, Linköping University, Linköping, Sweden
Adeel Asghar: Programming Environments Laboratory, Department of Computer and Information Science, Linköping University, Linköping, Sweden
Peter Fritzson: Programming Environments Laboratory, Department of Computer and Information Science, Linköping University, Linköping, Sweden
Francesco Casella: Dipartimento di Elettronica e Informazione, Politecnico di Milano, Milano, Italy
Publication title:Static and Dynamic Debugging of Modelica Models
Conference:Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany
Publication type: Abstract and Fulltext
Issue:076
Article No.:046
Abstract:The high abstraction level of equation-based object-oriented languages (EOO) such as Modelica has the drawback that programming and modeling errors are often hard to find. In this paper we present 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. The static transformational debugging functionality addresses the problem that model compilers are optimized so heavily that it is hard to tell the origin of an equation during runtime. This work proposes and implements a prototype of a method that is efficient with less than one percent overhead; yet manages to keep track of all the transformations/operations that the compiler performs on the model. Modelica models often contain functions and algorithm sections with algorithmic code. The fraction of algorithmic code is increasing since Modelica; in addition to equation-based modeling; is also used for embedded system control code as well as symbolic model transformations in applications using the MetaModelica language extension. Our earlier work in debuggers for the algorithmic subset of Modelica used high-level code instrumentation techniques which are portable but turned out to have too much overhead for large applications. The new dynamic algorithmic code debugger is the first Modelica debugger that can operate without high-level code instrumentation. Instead; it communicates with a low-level C-language symbolic debugger to directly extract information from a running executable; set and remove breakpoints; etc. This is made possible by the new bootstrapped OpenModelica compiler which keeps track of a detailed mapping from the high level Modelica code down to the generated C code compiled to machine code. The dynamic algorithmic code debugger is operational; supports both standard Modelica data structures and tree/list data structures; and operates efficiently on large applications such as the OpenModelica compiler with more than 100 000 lines of code. Moreover; an integrated debugging approach is proposed that combines static and dynamic debugging.

To our knowledge; this is the first Modelica debugger that supports both transformational and algorithmic code debugging.

Language:English
Keywords:Modelica; Debugging; Modeling and Simulation; Transformations; Equations; Algorithmic Code; Eclipse
Year:2012
No. of pages:12
Pages:443-454
ISBN:978-91-7519-826-2
Series:Linköping Electronic Conference Proceedings
ISSN (print):1650-3686
ISSN (online):1650-3740
File:http://www.ep.liu.se/ecp/076/046/ecp12076046.pdf
Available:2012-11-19
Publisher:Linköping University Electronic Press; Linköpings universitet

REFERENCE TO THIS PAGE
Adrian Pop, Martin Sjölund, Adeel Asghar, Peter Fritzson, Francesco Casella (2012). Static and Dynamic Debugging of Modelica Models, Proceedings of the 9th International MODELICA Conference; September 3-5; 2012; Munich; Germany http://dx.doi.org/10.3384/ecp12076443 (accessed 11/24/2014)