The Journal of Supercomputing

, Volume 70, Issue 3, pp 1218–1248 | Cite as

A DSL for specifying run-time adaptations for embedded systems: an application to vehicle stereo navigation

  • André C. SantosEmail author
  • João M. P. Cardoso
  • Pedro C. Diniz
  • Diogo R. Ferreira
  • Zlatko Petrov


The traditional approach for specifying adaptive behavior in embedded applications requires developers to engage in error-prone programming tasks. This results in long design cycles and in the inherent inability to explore and evaluate a wide variety of alternative adaptation behaviors, critical for systems exposed to dynamic operational and situational environments. In this paper, we introduce a domain-specific language (DSL) for specifying and implementing run-time adaptable application behavior. We illustrate our approach using a real-life stereo navigation application as a case study, highlighting the impact and benefits of dynamically adapting algorithm parameters. The experiments reveal our approach effective, as such run-time adaptations are easily specified in a higher level by the DSL, and thus at a lower programming effort than when using a general-purpose language such as C.


Embedded systems Domain-specific languages Run-time adaptations Adaptable behavior Stereo navigation 



The work presented was partially supported by Fundação para a Ciência e a Tecnologia (FCT) under grant SFRH/BD/47409/2008. Cardoso, Diniz, and Petrov acknowledge the partial support by the European Framework Programme 7 (FP7) under contract No. 248976. Any views expressed in this work are those of the author(s) and do not necessarily reflect the views of the European Commission. The authors would also like to thank Ali Azarian for his help with the FPGA setup used for experimental evaluation.


  1. 1.
    Aboubekr S, Delaval G, Rutten E (2009) A programming language for adaptation control: case study. SIGBED Rev 6(3):11:1–11:5CrossRefGoogle Scholar
  2. 2.
    Allen FE (1970) Control flow analysis. In: Proceedings of a Symposium on Compiler Optimization. ACM, USA, pp 1–19Google Scholar
  3. 3.
    Apel S, Leich T, Rosenmüller M, Saake G (2005) Generative programming and component engineering, Lecture notes in computer science. FeatureC++: On the symbiosis of feature-oriented and aspect-oriented programming. Springer, New York, pp 125–140Google Scholar
  4. 4.
    Appeltauer M, Hirschfeld R, Haupt M, Masuhara H (2011) ContextJ: Context-oriented programming with Java. Inf Media Technol 6(2):399–419Google Scholar
  5. 5.
    Arnold K, Gosling J, Holmes D (2000) The Java programming language, 3rd edn. Addison-Wesley, Longman Publishing Co., Inc., Boston, MA, USAGoogle Scholar
  6. 6.
    Baldauf M, Dustdar S, Rosenberg F (2007) A survey on context-aware systems. Int J Ad Hoc Ubiquitous Comput 2(4):263–277CrossRefGoogle Scholar
  7. 7.
    Bell J, Bellegarde F, Hook J, Kieburtz RB, Kotov A, Lewis J, McKinney L, Oliva DP, Sheard T, Tong L, Walton L, Zhou T (1994) Software Design for Reliability and Reuse: A Proof-of-Concept Demonstration. In: Proceedings of the Conference on TRI-Ada. ACM, USA, pp 396–404Google Scholar
  8. 8.
    Bishop J (1994) Languages for configuration programming: a comparison. Computer Science Department, University of Pretoria. Tech repGoogle Scholar
  9. 9.
    Bobrow DG, Goldstein IP (1980) Representing design alternatives. In: Proceedings of the Conference on Artificial Intelligence and the Simulation of Behavior, AmsterdamGoogle Scholar
  10. 10.
    Broemmer D, Mac F (2002) J2EE best practices: Java design patterns, automation, and performance, 1st edn. Wiley, USAGoogle Scholar
  11. 11.
    Campwood Software (last visited in June 2013) SourceMonitor Version 3.4.
  12. 12.
    van Deursen A, Klint P, Visser J (2000) Domain-specific languages: an annotated bibliography. ACM SIGPLAN Not 35(6):26–36CrossRefGoogle Scholar
  13. 13.
    Ensink B, Stanley J, Adve V (2003) Program control language: a programming language for adaptive distributed applications. J Parallel Distrib Comput 63(11):1082–1104CrossRefzbMATHGoogle Scholar
  14. 14.
    Figo D, Diniz PC, Ferreira DR, Cardoso JMP (2010) Preprocessing techniques for context recognition from accelerometer data. Pers Ubiquitous Comput 14(7):645–662CrossRefGoogle Scholar
  15. 15.
    Fischler MA, Bolles RC (1981) Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Commun ACM 24(6):381–395CrossRefMathSciNetGoogle Scholar
  16. 16.
    Floch J, Hallsteinsen S, Stav E, Eliassen F, Lund K, Gjorven E (2006) Using architecture models for runtime adaptability. IEEE Softw 23(2):62–70CrossRefGoogle Scholar
  17. 17.
    Garlan D, Cheng SW, Huang AC, Schmerl B, Steenkiste P (2004) Rainbow: architecture-based self-adaptation with reusable infrastructure. IEEE Comput 37(10):46–54CrossRefGoogle Scholar
  18. 18.
    GNU (last visited in January 2013) GCC—The GNU compiler collection.
  19. 19.
    González S, Cardozo N, Mens K, Cádiz A, Libbrecht JC, Goffaux J (2010) Subjective-C: Bringing context to mobile platform programming. In: Proceedings of the 3rd International Conference on Software Language Engineering (SLE’10), vol 6563. Springer, LNCS, New york, pp 246–265Google Scholar
  20. 20.
    Harris C, Stephens M (1988) A combined corner and edge detector. In: Proceedings of the 4th Alvey Vision Conference. Manchester, UK, pp 147–151Google Scholar
  21. 21.
    Hopcroft JE, Ullman JD (1979) Introduction to automata theory, languages, and computation, 1st edn. Addison-Wesley, Boston. ISBN: 81-7808-347-7Google Scholar
  22. 22.
    Kamina T, Aotani T, Masuhara H (2011) EventCJ: A context-oriented programming language with declarative event-based context transition. In: Proceedings of the 10th International Conference on Aspect-Oriented Software Development (AOSD’11). ACM, USA, pp 253–264Google Scholar
  23. 23.
    van Kasteren T, Noulas A, Englebienne G, Kröse B (2008) Accurate activity recognition in a home setting. In: Proceedings of the 10th International Conference on Ubiquitous Computing (UbiComp ’08). ACM, USA, pp 1–9Google Scholar
  24. 24.
    Kell S (2008) A survey of practical software adaptation techniques. J Univers Comput Sci 14(13):2110–2157Google Scholar
  25. 25.
    Kiczales G, Lamping J, Mendhekar A, Maeda C, Lopes C, Marc Loingtier J, Irwin J (1997) Aspect-oriented programming. In: Proceedings of the 11th European Conference on Object-Oriented Programming (ECOOP’97). Springer, New York, pp 220–242Google Scholar
  26. 26.
    Kiczales G, Hilsdale E, Hugunin J, Kersten M, Palm J, Griswold W (2001) An overview of AspectJ. In: Proceedings of the 15th European Conference on Object-Oriented Programming (ECOOP’01), LNCS, vol 2072. Springer, New York, pp 327–354Google Scholar
  27. 27.
    Marwedel P (2010) Embedded system design: embedded systems foundations of cyber-physical systems. Embedded systems. Springer, New YorkGoogle Scholar
  28. 28.
    McConnell S (2004) Code complete. Microsoft Press, Redmond (DV-Professional)Google Scholar
  29. 29.
    Mernik M, Heering J, Sloane AM (2005) When and how to develop domain-specific languages. ACM Comput Surv 37:316–344CrossRefGoogle Scholar
  30. 30.
    Mikalsen M, Floch J, Paspallis N, Papadopoulos G, Ruiz P (2006) Putting context in context: the role and design of context management in a mobility and adaptation enabling middleware. In: Proceedings of the 7th International Conference on Mobile Data Management (MDM’06), pp 76–83Google Scholar
  31. 31.
    Oracle (last visited in January 2013) Java programming language compiler.
  32. 32.
    REFLECT Consortium (2009a) Rendering FPGAs to multi-core embedded computing (REFLECT)—technical report about application requirements for reconfigurability and hardware templates. Tech. rep., Deliverable D1.5—FP7 THEME ICT-2009-4Google Scholar
  33. 33.
    REFLECT Consortium (2009b) Rendering FPGAs to multi-core embedded computing (REFLECT)—technical report of applications delivered by Honeywell. Tech. rep., Deliverable D1.2 - FP7 THEME ICT-2009-4Google Scholar
  34. 34.
    REFLECT Consortium (2009c) Rendering FPGAs to multi-core embedded computing (REFLECT)—technical report on generic architectures and reconfigurable schemes. Tech. rep., Deliverable D2.4—FP7 THEME ICT-2009-4Google Scholar
  35. 35.
    Sánchez P, Jiménez M, Rosique F, Álvarez B, Iborra A (2011) A framework for developing home automation systems: from requirements to code. J Syst Softw Elsevier 84(6):1008–1021CrossRefGoogle Scholar
  36. 36.
    Santos AC, Diniz PC, Cardoso JM, Ferreira DR (2011) A domain-specific language for the specification of adaptable context inference. In: Proceedings of the IEEE/IFIP International Conference on Embedded and Ubiquitous Computing (EUC’11), IEEE Computer Society, pp 268–273Google Scholar
  37. 37.
    Santos AC, Cardoso JMP, Diniz PC, Ferreira DR (2013) Specifying adaptations through a DSL with an application to mobile robot navigation. In: Leal JP, Rocha R, Simões A (eds) 2nd Symposium on languages, applications and technologies, Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik, Dagstuhl, Germany, OpenAccess Series in Informatics (OASIcs), vol 29, pp 219–234Google Scholar
  38. 38.
    Spinellis D (2001) Notable design patterns for domain-specific languages. J Syst Softw 56(1):91–99CrossRefGoogle Scholar
  39. 39.
    Spinellis D, Guruprasad V (1997) Lightweight languages as software engineering tools. In: Proceedings of the Conference on domain-specific languages on conference on domain-specific languages (DSL’97), USENIX, pp 6–6Google Scholar
  40. 40.
    Tartler R, Lohmann D, Scheler F, Spinczyk O (2010) AspectC++: an integrated approach for static and dynamic adaptation of system software. Knowl Based Syst 23(7):704–720CrossRefGoogle Scholar
  41. 41.
    Zhuang Z, Kim KH, Singh JP (2010) Improving energy efficiency of location sensing on smartphones. In: Proceedings of the 8th International Conference on Mobile Systems, Applications, and Services (MobiSys’10). ACM, USA, pp 315–330Google Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • André C. Santos
    • 1
    Email author
  • João M. P. Cardoso
    • 2
  • Pedro C. Diniz
    • 3
  • Diogo R. Ferreira
    • 1
  • Zlatko Petrov
    • 4
  1. 1.Instituto Superior Técnico (IST)Technical University of LisbonLisbonPortugal
  2. 2.Informatics Engineering Department, Faculty of Engineering (FEUP)University of PortoPortoPortugal
  3. 3.INESC–IDLisbonPortugal
  4. 4.Honeywell International s.r.o.PragueCzech Republic

Personalised recommendations