Abstract
We report on an industrial case study on developing the embedded software for a smart meter using the C programming language and domain-specific extensions of C such as components, physical units, state machines, registers and interrupts. We find that the extensions help significantly with managing the complexity of the software. They improve testability mainly by supporting hardware-independent testing, as illustrated by low integration efforts. The extensions also do not incur significant overhead regarding memory consumption and performance. Our case study relies on mbeddr, an extensible version of C. mbeddr, in turn, builds on the MPS language workbench which supports modular extension of languages and IDEs.
- E. Axelsson, K. Claessen, G. Devai, Z. Horvath, K. Keijzer, B. Lyckegard, A. Persson, M. Sheeran, J. Svenningsson, and A. Vajda. Feldspar: A domain specific language for digital signal processing algorithms. In MEMOCODE 2010, 2010.Google Scholar
Digital Library
- Y. Ben-Asher, D. G. Feitelson, and L. Rudolph. ParC - An extension of C for shared memory parallel processing. Software: Practice and Experience, 26(5), 1996. Google Scholar
Digital Library
- D. Beuche, H. Papajewski, and W. Schröder-Preikschat. Variability management with feature models. Science of Computer Programming, 53(3), 2004. Google Scholar
Digital Library
- F. Boussinot. Reactive C: An extension of C to program reactive systems. Software: Practice and Experience, (4). Google Scholar
Digital Library
- M. Broy. Challenges in automotive software engineering. In Proc. of the 28th Intl. Conference on Software engineering, ICSE ’06, New York, NY, USA, 2006. ACM. Google Scholar
Digital Library
- R. Cox, T. Bergan, A. T. Clements, M. F. Kaashoek, and E. Kohler. Xoc, an extension-oriented compiler for systems programming. In ASPLOS 2008, 2008. Google Scholar
Digital Library
- K. Czarnecki and U. W. Eisenecker. Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley Publishing Co., New York, NY, USA, 2000. Google Scholar
Digital Library
- W. Damm, R. Achatz, K. Beetz, H. Daembkes, K. Grimm, P. Liggesmeyer, et al. Nationale Roadmap Embedded Systems. In Cyber-Physical Systems. Springer, 2010.Google Scholar
Cross Ref
- A. Dunkels, O. Schmidt, T. Voigt, and M. Ali. Protothreads: simplifying event-driven programming of memory-constrained embedded systems. In Proceedings of the 4th international conference on Embedded networked sensor systems, SenSys ’06. ACM, 2006. Google Scholar
Digital Library
- T. Dybå, D. I. Sjøberg, and D. S. Cruzes. What works for whom, where, when, and why? On the role of context in empirical software engineering. In Proceedings of the ACM-IEEE International Symposium on Empirical Software Engineering and Measurement, 2012. Google Scholar
Digital Library
- C. Ebert and C. Jones. Embedded software: facts, figures, and future. Computer, 42(4), april 2009. Google Scholar
Digital Library
- S. Erdweg, T. Storm, M. Völter, et al. The state of the art in language workbenches. In M. Erwig, R. Paige, and E. Wyk, editors, Software Language Engineering, volume 8225 of LNCS. Springer, 2013.Google Scholar
Cross Ref
- M. Fowler. Language workbenches: The killer-app for DSLs? ThoughtWorks, http://www.martinfowler.com/ articles/languageWorkbench.html, 2005.Google Scholar
- M. Fowler and M. Foemmel. Continuous integration. ThoughtWorks, http://martinfowler.com/articles/continuousIntegration.html, 2006.Google Scholar
- A. S. Gokhale, K. Balasubramanian, A. S. Krishna, J. Balasubramanian, G. Edwards, G. Deng, E. Turkay, J. Parsons, and D. C. Schmidt. Model driven middleware. Science of Computer Programming, 73(1), 2008. Google Scholar
Digital Library
- J. Graylin, J. E. Hale, R. K. Smith, H. David, N. A. Kraft, W. Charles, et al. Cyclomatic complexity and LOC: empirical evidence of a stable linear relationship. J. of Software Engineering and Applications, 2(3), 2009.Google Scholar
- T. R. Green. Cognitive dimensions of notations. People and computers V, 1989. Google Scholar
Digital Library
- K. Hammond and G. Michaelson. Hume: a domain-specific language for real-time embedded systems. GPCE ’03, 2003. Google Scholar
Digital Library
- M. Herrmannsdoerfer, S. D. Vermolen, and G. Wachsmuth. An extensive catalog of operators for the coupled evolution of metamodels and models. In Software Language Engineering. Springer, 2011. Google Scholar
Digital Library
- P. Hudak. Modular domain specific languages and tools. In Software Reuse, 1998. Proceedings. Fifth International Conference on, pages 134–142. IEEE, 1998. Google Scholar
Digital Library
- D. Kamma and K. Sasi. Effect of model-based software development on productivity of enhancement tasks - an industrial study. In Proc. of the 21st Asia-Pacific Software Eng. Conference (APSEC) 2014. Google Scholar
Digital Library
- L. C. L. Kats and E. Visser. The Spoofax language workbench: Rules for declarative specification of languages and IDEs. In OOPSLA. ACM, 2010. Google Scholar
Digital Library
- P. Klint. A meta-environment for generating programming environments. ACM Transactions on Software Engineering Methodology, 2 (2), 1993. Google Scholar
Digital Library
- P. Klint, T. van der Storm, and J. Vinju. EASY meta-programming with Rascal. In GTTSE III, volume 6491 of LNCS. Springer, 2011. Google Scholar
Digital Library
- A. Kuhn, G. Murphy, and C. Thompson. An exploratory study of forces and frictions affecting large-scale model-driven development. In R. France, J. Kazmeier, R. Breu, and C. Atkinson, editors, Model Driven Engineering Languages and Systems, volume 7590 of LNCS. Springer, 2012. Google Scholar
Digital Library
- D. Le, E. Walkingshaw, and M. Erwig. # ifdef confirmed harmful: Promoting understandable software variation. In 2011 IEEE Symposium on Visual Languages and Human-Centric Computing.Google Scholar
- E. Lee. What’s ahead for embedded software? Computer, 33(9), 2000. Google Scholar
Digital Library
- E. Lee. Cyber-Physical Systems: Design challenges. In Object Oriented Real-Time Distributed Computing (ISORC), 2008 11th IEEE International Symposium on, 2008. Google Scholar
Digital Library
- P. Liggesmeyer and M. Trapp. Trends in embedded software engineering. IEEE Softw., 26, May 2009. Google Scholar
Digital Library
- E. McGrath. Methodology matters: Doing research in the behavioral and social sciences. In Readings in Human-Computer Interaction: Toward the Year 2000 (2nd ed. Citeseer, 1995. Google Scholar
Digital Library
- F. Medeiros, C. Kästner, M. Ribeiro, S. Nadi, and R. Gheyi. The love/hate relationship with the C preprocessor: An interview study. In Proceedings of the 29th European Conference on Object-Oriented Programming (ECOOP), Lecture Notes in Computer Science, Berlin/Heidelberg, 2015. Springer-Verlag.Google Scholar
- MISRA. Guidelines for the use of C in critical systems, 2004.Google Scholar
- Z. Molotnikov, M. Völter, and D. Ratiu. Automated domain-specific C verification with mbeddr. In Proc. of the 29th ACM/IEEE Intl. Conference on Automated Software Engineering. ACM, 2014. Google Scholar
Digital Library
- L. Palopoli, P. Ancilotti, and G. C. Buttazzo. A C language extension for programming real-time applications. In 6th Int. Workshop on Real-Time Computing and Applications (RTCSA 99). IEEE CS, 1999. Google Scholar
Digital Library
- D. Pavletic, A. S. Raza, M. Voelter, B. Kolb, and T. Kehrer. Extensible debuggers for extensible languages. In GI/ACM WS on Software Reengineering, 2013.Google Scholar
Cross Ref
- L. Renggli, T. Girba, and O. Nierstrasz. Embedding languages without breaking tools. In ECOOP’10, 2010. Google Scholar
Digital Library
- T. W. Reps and T. Teitelbaum. The synthesizer generator. In First ACM SIGSOFT/SIGPLAN software engineering symposium on Practical software development environments. ACM, 1984. Google Scholar
Digital Library
- L. Rising and M. L. Manns. Fearless change: patterns for introducing new ideas. Pearson Education, 2004. Google Scholar
Digital Library
- P. Romaniuk. Introduction to multithreaded programming in embedded systems. http://elesoftrom.com.pl/en/os/ multithreaded_programming.pdf, 2013.Google Scholar
- P. Runeson, M. Host, A. Rainer, and B. Regnell. Case study research in software engineering: Guidelines and examples. Wiley, 2012. Google Scholar
Digital Library
- A. G. S. Andalam, P. S. Roop. 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
Digital Library
- O. Salo and P. Abrahamsson. Agile methods in European embedded software development organisations: a survey on the actual use and usefulness of XP and Scrum. Software, IET, 2(1), 2008.Google Scholar
- Saudi Electricity Company. Specifications for electronic revenue CT and CT-VT meter. https://www.se.com.sa/arsa/Business_Document/SpecificationsGoogle Scholar
- C. Simonyi, M. Christerson, and S. Clifford. Intentional Software. SIGPLAN Not., 41(10), Oct. 2006. Google Scholar
Digital Library
- G. L. Steele. Growing a language. Higher-Order and Symbolic Computation, 12(3), 1999. Google Scholar
Digital Library
- J. Sztipanovits. Embedded software: Opportunities and challenges. http://archive.darpa.mil/DARPATech2000/Presentations /ito_pdf/2SztipanovitsEmbedSWBW.pdf, 2000.Google Scholar
- J. Sztipanovits and G. Karsai. In T. Henzinger and C. Kirsch, editors, Embedded Software, volume 2211 of LNCS. Springer, 2001.Google Scholar
- A. van Deursen and P. Klint. Little languages: Little maintenance? Journal of software maintenance, 10(2), 1998. Google Scholar
Digital Library
- M. Voelter. Language and ide development, modularization and composition with MPS. In GTTSE 2011, LNCS. Springer, 2011.Google Scholar
- M. Voelter. Generic Tools, Specific Languages. PhD thesis, Delft University of Technology, 2014.Google Scholar
- M. Voelter and S. Lisson. Supporting diverse notations in MPS’ projectional editor. GEMOC Workshop, 2014.Google Scholar
- M. Voelter, D. Ratiu, B. Schaetz, and B. Kolb. mbeddr: an extensible C-based programming language and ide for embedded systems. In Proceedings of SPLASH Wavefront 2012, 2012. Google Scholar
Digital Library
- M. Voelter, S. Benz, C. Dietrich, B. Engelmann, M. Helander, L. Kats, E. Visser, and G. Wachsmuth. DSL Engineering. dslbook.org, 2013.Google Scholar
- M. Voelter, D. Ratiu, B. Kolb, and B. Schaetz. mbeddr: instantiating a language workbench in the embedded software domain. Automated Software Engineering, 20(3), 2013.Google Scholar
- M. Voelter, D. Ratiu, and F. Tomassetti. Requirements as first-class citizens: Integrating requirements closely with implementation artifacts. In [email protected], 2013.Google Scholar
- M. Voelter, J. Siegmund, T. Berger, and B. Kolb. Towards user-friendly projectional editors. In 7th International Conference on Software Language Engineering (SLE), 2014.Google Scholar
Cross Ref
- R. von Hanxleden. Synccharts in C - a proposal for light-weight, deterministic concurrency. In Proceedings of the International Conference on Embedded Sofware (EMSOFT’09), 2009. Google Scholar
Digital Library
- J. Whittle, J. Hutchinson, M. Rouncefield, H. Burden, and R. Heldal. Industrial adoption of model-driven engineering: Are the tools really the problem? In Proc. of the 16th Intl. Conf. on Model Driven Engineering Languages and Systems (MODELS) 2013. ACM, 2013.Google Scholar
Digital Library
- R. K. Yin. Case study research: Design and methods. Sage publications, 2014.Google Scholar
Index Terms
Using C language extensions for developing embedded software: a case study
Recommendations
Using C language extensions for developing embedded software: a case study
OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and ApplicationsWe report on an industrial case study on developing the embedded software for a smart meter using the C programming language and domain-specific extensions of C such as components, physical units, state machines, registers and interrupts. We find that ...
Language embedding and optimization in mython
DLS '09: Proceedings of the 5th symposium on Dynamic languagesMython is an extensible variant of the Python programming language. Mython achieves extensibility by adding a quotation mechanism that accepts an additional parameter as well as the code being quoted. The additional quotation parameter takes the form of ...
Language embedding and optimization in mython
DLS '09Mython is an extensible variant of the Python programming language. Mython achieves extensibility by adding a quotation mechanism that accepts an additional parameter as well as the code being quoted. The additional quotation parameter takes the form of ...






Comments