Skip to main content
Log in

mbeddr: instantiating a language workbench in the embedded software domain

  • Published:
Automated Software Engineering Aims and scope Submit manuscript

Abstract

Tools can boost software developer productivity, but building custom tools is prohibitively expensive, especially for small organizations. For example, embedded programmers often have to use low-level C with limited IDE support, and integrated into an off-the-shelf tool chain in an ad-hoc way.

To address these challenges, we have built mbeddr, an extensible language and IDE for embedded software development based on C. mbeddr is a large-scale instantiation of the Jetbrains MPS language workbench. Exploiting its capabilities for language modularization and composition, projectional editing and multi-stage transformation, mbeddr is an open and modular framework that lets third parties add extensions to C with minimal effort and without invasive changes. End users can combine extensions in programs as needed.

To illustrate the approach, in this paper we discuss mbeddr’s support for state machines, components, decision tables, requirements tracing, product line variability and program verification and outline their implementation. We also present our experience with building mbeddr, which shows that relying on language workbenches dramatically reduces the effort of building customized, modular and extensible languages and IDEs to the point where this is affordable by small organizations. Finally, we report on the experience of using mbeddr in a commercial project, which illustrates the benefits to end users.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15

Similar content being viewed by others

Notes

  1. http://jetbrains.com/mps.

  2. http://mbeddr.com.

  3. http://www.esterel-technologies.com/products/scade-suite/.

  4. http://www.artop.org/.

  5. http://www.etas.com/.

  6. http://www.mathworks.com/products/simulink.

  7. http://www.mathworks.com/products/sldesignverifier.

  8. http://frama-c.com.

  9. http://research.microsoft.com/en-us/projects/slam/.

  10. http://mtc.epfl.ch/software-tools/blast/index-epfl.php.

  11. http://www.eschertech.com/products/ecv.php.

  12. http://www.klocwork.com/.

  13. http://eclipse.org.

  14. MPS does not yet support graphical syntax, but will in 2013. Other projectional editors, such as Intentional’s Domain Workbench (Simonyi et al. 2006) support graphical notations already.

  15. Refactoring transformations work with a single language, and in reverse engineering, transformations go from lower to higher levels of abstraction. However, those two cases are outside the scope of this paper.

  16. The static semantics also have to be composed. As discussed in Voelter (2011), MPS supports the modular definition of type system rules. We provide examples throughout Sect. 4.

  17. http://eclipse.org/xtext.

  18. http://nusmv.fbk.eu.

  19. http://yices.csl.sri.com.

  20. http://www.cs.nyu.edu/acsys/cvc3.

  21. http://yices.csl.sri.com.

  22. http://nusmv.fbk.eu/.

  23. http://patterns.projects.cis.ksu.edu/documentation/patterns/ltl.shtml.

  24. If a product line’s variability were just expressed by a set of Boolean options, the configuration space would grow quickly with 2n, with n representing the number of options.

  25. The upcoming version 3.0 of MPS will support several editors for the same concept.

  26. http://codinghorror.com/blog/2006/07/diseconomies-of-scale-and-lines-of-code.html.

  27. During the implementation of the default extensions we found a few bugs in the C base language that prevented modular extension. These were not conceptual problems, but real bugs. They have been fixed, so C can now be extended meaningfully in a modular way.

  28. http://eclipse.org/Xtext.

  29. http://eclipse.org/emf.

  30. http://eclipse.org/modeling.

  31. http://code.google.com/a/eclipselabs.org/p/xtext-typesystem.

  32. http://xsemantics.sourceforge.net.

  33. http://www.infoq.com/presentations/DSL-Magnus-Christerson-Henk-Kolk.

References

  • Andalam, S., Roop, P., Girault, A., Traulsen, C.: PRET-C: a new language for programming precision timed architectures. In: Proceedings of the Workshop on Reconciling Performance with Predictability (RePP), Embedded Systems Week (2009)

    Google Scholar 

  • Andalam, S., Roop, P., Girault, A.: Predictable multithreading of embedded applications using PRET-C. In: Proc. of ACM-IEEE Int. Conference on Formal Methods and Models for Codesign (MEMOCODE) (2010)

    Google Scholar 

  • Arnoldus, J., Bijpost, J., van den Brand, M.: Repleo: a syntax-safe template engine. In: Proc. of the 6th ACM Int. Conference on Generative Programming and Component Engineering (GPCE 2007) (2007)

    Google Scholar 

  • Axelsson, E., Claessen, K., Devai, G., Horvath, Z., Keijzer, K., Lyckegard, B., Persson, A., Sheeran, M., Svenningsson, J., Vajda, A.: Feldspar: a domain specific language for digital signal processing algorithms. In: MEMOCODE 2010 (2010)

    Google Scholar 

  • Bachrach, J., Playford, K.: The Java syntactic extender. In: Proceedings 16th Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA’01 (2001)

    Google Scholar 

  • Ben-Asher, Y., Feitelson, D.G., Rudolph, L.: ParC—an extension of C for shared memory parallel processing. Softw. Pract. Exp. 26(5) (1996)

  • Beuche, D., Papajewski, H., Schroeder-Preikschat, W.: Variability management with feature models. Sci. Comput. Program. 53(3) (2004)

  • Birk, A., Heller, G., John, I., Schmid, K., von der Massen, T., Mueller, K.: Product line engineering: the state of the practice. IEEE Softw. 20(6) (2003)

  • Boussinot, F.: Reactive C: an extension of C to program reactive systems. Softw. Pract. Exp. 21(4) (1991)

  • Bravenboer, M., Visser, E.: Concrete syntax for objects: domain-specific language embedding and assimilation without restrictions. In: Proc. of the 19th Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2004 (2004)

    Google Scholar 

  • Bravenboer, M., Visser, E.: Designing syntax embeddings and assimilations for language libraries. In: MoDELS 2007. LNCS, vol. 5002. Springer, Berlin (2007)

    Google Scholar 

  • Bravenboer, M., Dolstra, E., Visser, E.: Preventing injection attacks with syntax embeddings. In: Generative Programming and Component Engineering, 6th International Conference, GPCE 2007. ACM, New York (2007)

    Google Scholar 

  • Bravenboer, M., Kalleberg, K.T., Vermaas, R., Visser, E.: Stratego/XT 0.17. A language and toolset for program transformation (2008)

  • Broy, M., Feilkas, M., Herrmannsdoerfer, M., Merenda, S., Ratiu, D.: Seamless model-based development: from isolated tools to integrated model engineering environments. Proc. IEEE 98(4) (2010)

  • Broy, M., Kirstan, S., Krcmar, H., Schätz, B.: What is the benefit of a model-based design of embedded software systems in the car industry? In: Emerging Technologies for the Evolution and Maintenance of Software Models. IGI Global, Hersley (2011)

    Google Scholar 

  • Clarke, E.: Model checking. In: Foundations of Software Technology and Theoretical Computer Science. LNCS, vol. 1346, pp. 54–56 (1997)

    Chapter  Google Scholar 

  • Clarke, E.M., Heinle, W.: Modular translation of statecharts to SMV. Tech. rep., Carnegie Mellon University (2000)

  • Corbett, J.C., Dwyer, M.B., Hatcliff, J., Laubach, S., Păsăreanu, C.S., Robby, Zheng, H.: Bandera: extracting finite-state models from Java source code. In: Proc. of the Int. Conference of Software Engineering (ICSE) (2000)

    Google Scholar 

  • Damm, W., Achatz, R., Beetz, K., Broy, M., Dämbkes, H., Grimm, K., Liggesmeyer, P.: Nationale Roadmap Embedded Systems. Springer, Berlin (2010)

    Google Scholar 

  • Dunkels, A., Schmidt, O., Voigt, T., Ali, M.: Protothreads: simplifying event-driven programming of memory-constrained embedded systems. In: Proc. of the 4th Int. Conference on Embedded Networked Sensor Systems, SenSys, 2006. ACM, New York (2006)

    Google Scholar 

  • Ebert, C., Jones, C.: Embedded software: facts, figures, and future. Computer 42(4) (2009)

  • Efftinge, S., Eysholdt, M., Köhnlein, J., Zarnekow, S., Hasselbring, W., von Massow, R., Hanus, M.: Xbase: implementing DSLs for Java. In: Proc. of the 11th Conference on Generative Programming and Component Engineering (GPCE 2012) (2012)

    Google Scholar 

  • Erdweg, S., Kats, L.C.L., Kastner, C., Ostermann, K., Visser, E.: Growing a language environment with editor libraries. In: Proc. of the 10th ACM Int. Conference on Generative Programming and Component Engineering (GPCE 2011). ACM, New York (2011a)

    Google Scholar 

  • Erdweg, S., Rendel, T., Kästner, C., Ostermann, K.: SugarJ: library-based syntactic language extensibility. In: OOPSLA 2011. ACM, New York (2011b)

    Google Scholar 

  • Ernst, M.D., Badros, G.J., Notkin, D.: An empirical analysis of C preprocessor use. IEEE Trans. Softw. Eng. 28 (2002)

  • Ferguson, R., Parrington, N., Dunne, P., Hardy, C., Archibald, J., Thompson, J.: MetaMOOSE—an object-oriented framework for the construction of CASE tools. Inf. Softw. Technol. 42(2) (2000)

  • Fowler, M.: Language workbenches: the Killer-App for domain specific languages? (2005). http://martinfowler.com/articles/languageWorkbench.html

  • Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Reading (1995)

    Google Scholar 

  • Gokhale, A.S., Balasubramanian, K., Krishna, A.S., Balasubramanian, J., Edwards, G., Deng, G., Turkay, E., Parsons, J., Schmidt, D.C.: Model driven middleware: a new paradigm for developing distributed real-time and embedded systems. Sci. Comput. Program. 73(1) (2008)

  • Graaf, B., Lormans, M., Toetenel, H.: Embedded software engineering: the state of the practice. IEEE Softw. 20(6) (2003)

  • Grünbacher, P., Rabiser, R., Dhungana, D., Lehofer, M.: Model-based customization and deployment of eclipse-based tools: industrial experiences. In: Proc. of the 2009 Int. Conference on Automated Software Engineering. IEEE Comput. Soc., Los Alamitos (2009)

    Google Scholar 

  • Grundy, J., Hosking, J.: Supporting generic sketching-based input of diagrams in a domain-specific visual language meta-tool. In: Proc. of the 29th Int. Conference on Software Engineering, ICSE’07. IEEE Comput. Soc., Los Alamitos (2007)

    Google Scholar 

  • Hammond, K., Michaelson, G.: Hume: a domain-specific language for real-time embedded systems. In: Proc. of GPCE 2003 (2003)

    Google Scholar 

  • Hedin, G., Magnusson, E.: JastAdd–an aspect-oriented compiler construction system. Sci. Comput. Program. 47(1) (2003)

  • Heering, J., Hendriks, P.R.H., Klint, P., Rekers, J.: The syntax definition formalism SDF—reference manual. ACM SIGPLAN Not. 24(11) (1989)

  • Heidenreich, F., Wende, C.: Bridging the gap between features and models. In: 2nd Workshop on Aspect-Oriented Product Line Engineering (AOPLE’07) (2007)

    Google Scholar 

  • Heitmeyer, C.: Developing Safety-Critical Systems: The Role of Formal Methods and Tools. Australian Comput. Soc., Darlinghurst (2006)

    Google Scholar 

  • Hemel, Z., Visser, E.: Declaratively programming the mobile web with Mobl. In: Proc. of the 2011 ACM Int. Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2011, pp. 695–712. ACM, New York (2011)

    Chapter  Google Scholar 

  • Janicki, R., Parnas, D.L., Zucker, J.: Tabular Representations in Relational Documents. Springer, New York (1997)

    Google Scholar 

  • Jirapanthong, W., Zisman, A.: Supporting product line development through traceability. In: 12th Asia-Pacific Software Engineering Conference (APSEC’05). IEEE Comput. Soc., Los Alamitos (2005)

    Google Scholar 

  • Kästner, C.: CIDE: decomposing legacy applications into features. In: Proceedings of 11th Int. Conference on Software Product Lines (SPLC 2007). Workshops, vol. 2 (2007)

    Google Scholar 

  • Kats, L.C.L., Visser, E.: The spoofax language workbench: rules for declarative specification of languages and IDEs. In: Proc. of the 25th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010 (2010)

    Google Scholar 

  • Kats, L.C.L., Visser, E., Wachsmuth, G.: Pure and declarative syntax definition: paradise lost and regained. In: Proc. of the 25th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2010. ACM, New York (2010)

    Google Scholar 

  • Klint, P.: A meta-environment for generating programming environments. ACM Trans. Softw. Eng. Methodol. 2(2) (1993)

  • Klint, P., van der Storm, T., Vinju, J.J.: RASCAL: a domain specific language for source code analysis and manipulation. In: Ninth IEEE International Working Conference on Source Code Analysis and Manipulation, SCAM 2009. IEEE Comput. Soc., Los Alamitos (2009)

    Google Scholar 

  • Krahn, H., Rumpe, B., Völkel, S.: MontiCore: a framework for compositional development of domain specific languages. Int. J. Softw. Tools Technol. Transf. 12(5), 353–372 (2010)

    Article  Google Scholar 

  • Liggesmeyer, P., Trapp, M.: Trends in embedded software engineering. IEEE Softw. 26 (2009)

  • Loer, K., Harrison, M.: Towards usable and relevant model checking techniques for the analysis of dependable interactive systems. In: Proc. of the Int. Conference on Automatic Software Engineering (ASE) (2002)

    Google Scholar 

  • Lorenz, D.H., Rosenan, B.: Cedalion: a language for language oriented programming. In: Proc. of OOPSLA/SPLASH 2011 (2011)

    Google Scholar 

  • Mali, Y., Van Wyk, E.: Building extensible specifications and implementations of Promela with AbleP. In: Model Checking Software—18th International SPIN Workshop, Proceedings. LNCS, vol. 6823. Springer, Berlin (2011)

    Google Scholar 

  • Marche, C., Moy, Y.: The Jessie plugin for deduction verification in Frama-C—tutorial and reference manual—version 2.30. Tech. rep., INRIA (2012)

  • Medina-Mora, R., Feiler, P.H.: An incremental programming environment. IEEE Trans. Softw. Eng. 7(5) (1981)

  • Mernik, M., Zumer, V.: Incremental programming language development. Comput. Lang. Syst. Struct. 31(1) (2005)

  • Mernik, M., Lenic, M., Avdicausevic, E., Zumer, V.L.: An interactive environment for programming language development. In: Compiler Construction, 11th Int. Conference, ETAPS/CC 2002, Proceedings. LNCS, vol. 2304. Springer, Berlin (2002)

    Google Scholar 

  • Meyer, B.: Design by contract: the Eiffel method. In: TOOLS 1998: 26th Int. Conference on Technology of Object-Oriented Languages and Systems, p. 446. IEEE Comput. Soc., Los Alamitos (1998)

    Google Scholar 

  • Notkin, D.: The GANDALF project. J. Syst. Softw. 5(2) (1985)

  • Nystrom, N., Clarkson, M.R., Myers, A.C.: Polyglot: an extensible compiler framework for Java. In: 12th Int. Conference on Compiler Construction, ETAPS/CC 2003. LNCS, vol. 2622. Springer, Berlin (2003)

    Google Scholar 

  • Palopoli, L., Ancilotti, P., Buttazzo, G.C.: A C language extension for programming real-time applications. In: 6th Int. Workshop on Real-Time Computing and Applications (RTCSA 99). IEEE Comput. Soc., Los Alamitos (1999)

    Google Scholar 

  • Parnas, D.: Really rethinking ‘formal methods’. IEEE Comput. 43(1) (2010)

  • Parr, T.J., Quong, R.W.: ANTLR: a predicated-LL(k) parser generator. Softw. Pract. Exp. 25(7) (1995)

  • Porter, S.W.: Master’s thesis, Naval Postgraduate School, Monterey, CA, USA (1988)

  • Ratiu, D., Voelter, M., Schaetz, B., Kolb, B.: Language engineering as enabler for incrementally defined formal analyses. In: Proc. of the Workshop on Formal Methods in Software Engineering: Rigorous and Agile Approaches (FORMSERA’2012) (2012)

    Google Scholar 

  • Renggli, L., Girba, T., Nierstrasz, O.: Embedding languages without breaking tools. In: European Conference on Object Orient Programming, ECOOP 2010 (2010)

    Google Scholar 

  • Reps, T.W., Teitelbaum, T.: The synthesizer generator. In: First ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments. ACM, New York (1984)

    Google Scholar 

  • Sheini, H., Sakallah, K.: From propositional satisfiability to satisfiability modulo theories. In: Theory and Applications of Satisfiability Testing—SAT 2006. LNCS, vol. 4121, pp. 1–9. Springer, Berlin (2006)

    Chapter  Google Scholar 

  • Simonyi, C., Christerson, M., Clifford, S.: Intentional software. In: Proc. of the 21st ACM Conference Companion on Object Oriented Programming Systems Languages and Applications, OOPSLA’06 (2006)

    Google Scholar 

  • Steele, G.L. Jr.: Growing a language. h.-Order Symb. Comput. 12(3) (1999)

  • Tatsubori, M., Chiba, S., Itano, K., Killijian, M.O.: OpenJava: a class-based macro system for Java. In: Reflection and Software Engineering. Papers from OORaSE 1999, 1st OOPSLA’99 Workshop on Reflection and Software Engineering. LNCS, vol. 1826 (2000)

    Google Scholar 

  • Thomas, D., Hunt, A.: Mock objects. IEEE Softw. 19(3), 22–24 (2002)

    Article  Google Scholar 

  • Tolvanen, J.P., Kelly, S.: MetaEdit+: defining and using integrated domain-specific modeling languages. In: Proc. of the 24th ACM SIGPLAN Conference Companion on Object Oriented Programming Systems Languages and Applications, OOPSLA’09 (2009)

    Google Scholar 

  • Van Wyk, E., de Moor, O., Backhouse, K., Kwiatkowski, P.: Forwarding in attribute grammars for modular language design. In: Proc. of the 11th Int. Conference on Compiler Construction (ETAPS/CC 2002). LNCS, vol. 2304 (2002)

    Google Scholar 

  • Van Wyk, E., Krishnan, L., Bodin, D., Schwerdfeger, A.: Attribute grammar-based language extensions for Java. In: ECOOP 2007—21st European Conference on Object-Oriented Programming, Proceedings. LNCS, vol. 4609. Springer, Berlin (2007)

    Google Scholar 

  • Van Wyk, E., Bodin, D., Gao, J., Krishnan, L.: Silver: an extensible attribute grammar system. Electron. Notes Theor. Comput. Sci. 203(2) (2008)

  • Visser, E.: WebDSL: a case study in domain-specific language engineering. In: Generative and Transformational Techniques in Software Engineering II, International Summer School, GTTSE 2007. LNCS, vol. 5235, pp. 291–373 (2007)

    Chapter  Google Scholar 

  • Voelter, M.: Embedded software development with projectional language workbenches. In: Model Driven Engineering Languages and Systems, 13th International Conference, MODELS 2010, Proceedings. LNCS. Springer, Berlin (2010)

    Google Scholar 

  • Voelter, M.: Language and IDE development, modularization and composition with MPS. In: 4th Summer School on Generative and Transformational Techniques in Software Engineering (GTTSE 2011). LNCS. Springer, Berlin (2011)

    Google Scholar 

  • Voelter, M., Ratiu, D., Schaetz, B., Kolb, B.: mbeddr: an extensible C-based programming language and IDE for embedded systems. In: Proc. of SPLASH 2012 (2012)

    Google Scholar 

  • von Hanxleden, R.: SyncCharts in C—a proposal for light-weight, deterministic concurrency. In: Proc. of the Int. Conference on Embedded Software (EMSOFT’09) (2009)

    Google Scholar 

Download references

Acknowledgements

We thank Marcel Matzat and Domenik Pavletic for their work on mbeddr. mbeddr has been supported by the German BMBF, FKZ 01/S11014.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Markus Voelter.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Voelter, M., Ratiu, D., Kolb, B. et al. mbeddr: instantiating a language workbench in the embedded software domain. Autom Softw Eng 20, 339–390 (2013). https://doi.org/10.1007/s10515-013-0120-4

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10515-013-0120-4

Keywords

Navigation