skip to main content
research-article

Using C language extensions for developing embedded software: a case study

Published:23 October 2015Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. Beuche, H. Papajewski, and W. Schröder-Preikschat. Variability management with feature models. Science of Computer Programming, 53(3), 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. F. Boussinot. Reactive C: An extension of C to program reactive systems. Software: Practice and Experience, (4). Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. K. Czarnecki and U. W. Eisenecker. Generative Programming: Methods, Tools, and Applications. ACM Press/Addison-Wesley Publishing Co., New York, NY, USA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarCross RefCross Ref
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. C. Ebert and C. Jones. Embedded software: facts, figures, and future. Computer, 42(4), april 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarCross RefCross Ref
  13. M. Fowler. Language workbenches: The killer-app for DSLs? ThoughtWorks, http://www.martinfowler.com/ articles/languageWorkbench.html, 2005.Google ScholarGoogle Scholar
  14. M. Fowler and M. Foemmel. Continuous integration. ThoughtWorks, http://martinfowler.com/articles/continuousIntegration.html, 2006.Google ScholarGoogle Scholar
  15. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle Scholar
  17. T. R. Green. Cognitive dimensions of notations. People and computers V, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. K. Hammond and G. Michaelson. Hume: a domain-specific language for real-time embedded systems. GPCE ’03, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Hudak. Modular domain specific languages and tools. In Software Reuse, 1998. Proceedings. Fifth International Conference on, pages 134–142. IEEE, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. L. C. L. Kats and E. Visser. The Spoofax language workbench: Rules for declarative specification of languages and IDEs. In OOPSLA. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. P. Klint. A meta-environment for generating programming environments. ACM Transactions on Software Engineering Methodology, 2 (2), 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. P. Klint, T. van der Storm, and J. Vinju. EASY meta-programming with Rascal. In GTTSE III, volume 6491 of LNCS. Springer, 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle Scholar
  27. E. Lee. What’s ahead for embedded software? Computer, 33(9), 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. E. Lee. Cyber-Physical Systems: Design challenges. In Object Oriented Real-Time Distributed Computing (ISORC), 2008 11th IEEE International Symposium on, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. P. Liggesmeyer and M. Trapp. Trends in embedded software engineering. IEEE Softw., 26, May 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  31. 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 ScholarGoogle Scholar
  32. MISRA. Guidelines for the use of C in critical systems, 2004.Google ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. 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 ScholarGoogle ScholarCross RefCross Ref
  36. L. Renggli, T. Girba, and O. Nierstrasz. Embedding languages without breaking tools. In ECOOP’10, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  38. L. Rising and M. L. Manns. Fearless change: patterns for introducing new ideas. Pearson Education, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. P. Romaniuk. Introduction to multithreaded programming in embedded systems. http://elesoftrom.com.pl/en/os/ multithreaded_programming.pdf, 2013.Google ScholarGoogle Scholar
  40. P. Runeson, M. Host, A. Rainer, and B. Regnell. Case study research in software engineering: Guidelines and examples. Wiley, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  42. 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 ScholarGoogle Scholar
  43. Saudi Electricity Company. Specifications for electronic revenue CT and CT-VT meter. https://www.se.com.sa/arsa/Business_Document/SpecificationsGoogle ScholarGoogle Scholar
  44. C. Simonyi, M. Christerson, and S. Clifford. Intentional Software. SIGPLAN Not., 41(10), Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  45. G. L. Steele. Growing a language. Higher-Order and Symbolic Computation, 12(3), 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. J. Sztipanovits. Embedded software: Opportunities and challenges. http://archive.darpa.mil/DARPATech2000/Presentations /ito_pdf/2SztipanovitsEmbedSWBW.pdf, 2000.Google ScholarGoogle Scholar
  47. J. Sztipanovits and G. Karsai. In T. Henzinger and C. Kirsch, editors, Embedded Software, volume 2211 of LNCS. Springer, 2001.Google ScholarGoogle Scholar
  48. A. van Deursen and P. Klint. Little languages: Little maintenance? Journal of software maintenance, 10(2), 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. M. Voelter. Language and ide development, modularization and composition with MPS. In GTTSE 2011, LNCS. Springer, 2011.Google ScholarGoogle Scholar
  50. M. Voelter. Generic Tools, Specific Languages. PhD thesis, Delft University of Technology, 2014.Google ScholarGoogle Scholar
  51. M. Voelter and S. Lisson. Supporting diverse notations in MPS’ projectional editor. GEMOC Workshop, 2014.Google ScholarGoogle Scholar
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. M. Voelter, S. Benz, C. Dietrich, B. Engelmann, M. Helander, L. Kats, E. Visser, and G. Wachsmuth. DSL Engineering. dslbook.org, 2013.Google ScholarGoogle Scholar
  54. 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 ScholarGoogle Scholar
  55. M. Voelter, D. Ratiu, and F. Tomassetti. Requirements as first-class citizens: Integrating requirements closely with implementation artifacts. In [email protected], 2013.Google ScholarGoogle Scholar
  56. 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 ScholarGoogle ScholarCross RefCross Ref
  57. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  58. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  59. R. K. Yin. Case study research: Design and methods. Sage publications, 2014.Google ScholarGoogle Scholar

Index Terms

  1. Using C language extensions for developing embedded software: a case study

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 50, Issue 10
            OOPSLA '15
            October 2015
            953 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2858965
            • Editor:
            • Andy Gill
            Issue’s Table of Contents
            • cover image ACM Conferences
              OOPSLA 2015: Proceedings of the 2015 ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications
              October 2015
              953 pages
              ISBN:9781450336895
              DOI:10.1145/2814270

            Copyright © 2015 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 23 October 2015

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!