do not click

Meeting Embedded 2020 Jobposting   |  Login

Meeting Embedded 2020 - mbeddr — C with Domain-specific Abstractions

Frank Grimm

Scheduled for 16:00

Slides:

Software modelling has a bad reputation in the embedded world — at least for die-hard coders. On the other hand, non-code-savvy experts in embedded domains like electronic engineers prefere approaches like Matlab/Simulink, Ascet, or similar tools because (a) they offer high-level abstractions which are close to their mental models/their way of thinking and (b) source code will be automatically generated. mbeddr (http://mbeddr.com/) covers the middle ground between both worlds. It is a set of domain-specific languages (i.e., abstractions) for embedded software engineering and comes with an excellent IDE. Based on C99, these languages offer support for physical units, state machines, and component-based development. There is also support for testing, formal verification (e.g., of state machine), requirements, requirements tracing, documentation and more. These higher-level abstractions are then translated into efficient C (for embedded targets) as well as documentation, input to validation tools and so on.

Development teams fear the investment required to add higher-level abstractions to their toolbox. They, thus, prefer to keep using C. mbeddr is an open source tool offering these abstractions with great tool support. It has been around for several years and has been successfully used in many industrial projects. However, when asking embedded software developers — amongst them attendees of last year’s Meeting Embedded — I get the impression that many are not aware of mbeddr. In my experience, using approaches that significantly raise the level of abstraction while still offering well-defined execution semantics (i.e., C in mbeddr’s case) provide many advantages over traditional approaches without the drawback of mainstream modelling approaches such as UML and SysML. [Disclaimer: I’m just an mbeddr user (for research/teaching projects), I’m not part of the mbeddr development team.]

mbeddr is also an IDE that offers modern features like syntax highlighting, code completion, type checking, navigation, quick fixes, refactorings, debugging, and integration with version control systems. Based on the language engineering tool MPS, mbeddr uses projectional editing which enables total freedom of notation (instead of relying on purely textual notations) offering much more possibilities and flexibility. Text fragments can be combined with table views or graphical (e.g., lines-and-boxes) diagrams allowing to adjust notations to users’ needs by means of domain-specific notations. Because mbeddr is based on C, users can use the C expressions they know and love in higher-level abstractions while still getting IDE support (e.g., for type checking, auto completion, refactoring). This is a major advantage compared to other modelling tools which are usually not aware of the target implementation language (C in mbeddr’s case) and, therefore, cannot offer any of the features code-focused IDEs offer — adding to the bad reputation of model-driven approaches.

Because mbeddr languages are designed to be composable, users can choose which abstractions (physical units, state machines etc.) they want to use in a project. They only have to use the abstractions that make sense for them and their project. Also, mbeddr is extensible: by adding new languages domain-/project-specific abstractions can be added which are even closer to the user’s domain/mental model than the languages and notations provided by mbeddr out of the box.

Copyright Meetingcpp GmbH Imprint Piwik Opt out Privacy Policy