Abstract modelling: towards a typed declarative language for the conceptual modelling phase

The growing complexity of modern engineering tasks necessitates improved tool support for modelling, in particular tools allowing early detection of modelling errors. Broadly, there are two classes of modelling errors: (i) errors related to abstract modelling, e.g. conceptual errors concerning the coherence of a model as a whole, and (ii) errors related to concrete modelling, e.g. questions of approximation quality and implementation. Concrete modelling errors are relatively well understood, but abstract modelling errors less so. If, however, abstract modelling errors could be detected early, before concrete implementation starts, this would be very beneficial. Unfortunately, existing engineering tools, like current modelling languages, do not support modelling in the abstract well, leaving a gap in the engineering tool chain. To overcome this problem, this paper presents a first step towards a language supporting abstract modelling in mathematical physics with the aim of ensuring coherence of coupled multiphysics models early in the design process. To that end, following the approach of Functional Hybrid Modelling, we discuss how a language supporting quite general modelling equations can be realised as an embedding in Haskell. The appeal of the approach is that only few core concepts are needed, simplifying the semantics, and that much of the language infrastructure comes for free thanks to embedding.