NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Type Safety of Equation-Based Object-Oriented Modeling Languages

David Broman, Peter FritzsonProgramming 2006

Abstract

Computer aided modeling and simulation of complex physical systems, using components from multiple domains, such as electrical, mechanical, and hydraulic, have in recent years witnessed a significant growth of interest. General-purpose simulation tools, e.g. Simulink [11], using block diagrams and causal connections have dominated the area for years. However, in the last decade novel languages, (e.g. Modelica [5, 7, 12], gPROMS [13], χ language [6], and VHDL-AMS [4]) based on acausal modeling using Differential Algebraic Equations (DAEs), have evolved. The research in the area of equation-based objectoriented (EOO) languages has until now mainly focused on generation of efficient simulation code and integration with numerical solvers. Programming language theory, formal semantics, and type systems are typically used in a limited way, which may result in inconsistent languages and model errors that are hard to detect for the end user. A common problem concerns the static detection of too few or too many equations giving an underor over-constrained system. Solutions have been developed at the level of the overall flat system of equations derived from models [2][3], but to the best of our knowledge, no research has been performed at the component and type system level. Physical unit annotations (e.g. newton, meter, ampere) are ordinary parts of many EOO-languages. However, the precise semantics for static unit type checking is limited or absent. The need for such automatic static control of units is crucial in many simulation experiments, since it is extremely difficult to manually find inconsistencies in models with thousands of equations. Many proposals for conventional programming languages exist [1, 9, 10, 15], but only few [14] sound attempts exist to incorporate unit type checking into the type system of EOO-languages. Our main objective in this thesis work is to improve the theoretical foundation of EOO-languages by developing a formally specified kernel language from which other modeling constructs can be expressed. The Modeling Kernel Language (MKL) is intended to describe the core concept of an EOO-language by using a limited number of constructs and excluding any syntactic sugar normally needed for convenient modeling. To verify the correctness of our solution, MKL is specified using formal semantics and a formal type system, followed by proof of type safety (soundness) [16]. Moreover, to justify that our solution indeed addresses the problems of static unit type checking and detection of underand over-constrained systems, models described in the Modelica language are automatically transformed and simulated on the prototype implementation of MKL. The experiments are performed using real models collected from industry. Hence, on a higher level, the aim of this thesis project is to increase the ability for an engineer to detect model errors at an early stage. By providing better static type checking in EOO-languages, our work intend to meet the increasing industrial requirement of robust modeling and simulation environments.
BibTeX
@inproceedings{broman2006type,
  author = {David Broman and Peter Fritzson},
  title = {{Type Safety of Equation-Based Object-Oriented Modeling Languages}},
  booktitle = {Programming},
  year = {2006},
}

Loading related content...

Figure