Assess Applicability of the Functional Programming Paradigms in Embedded Hardware

Authors

  • Danny Benlin Oswan Program Studi Teknik Informatika
  • Michiel W. Koehorst Fontys Hogeschool ICT
  • Marcin Gramza Philips Lighting

Keywords:

Pergeseran identitas, subordinasi, foto esai, etnis, kelas

Abstract

Programming in embedded lighting domain is commonly done using the C language with the Object Oriented programming paradigm at Philips Lighting. However applying that paradigm in combination with the low-level language like C creates a conceptual gap between the requirements and design and actual implementation. This results in reduced source code readability and maintainability. Functional programming paradigm was expected to alleviate this problem by reducing the gap and enhancing readability. A proof of concept was built on an advanced, IP-connected, digital LED driver (Power over Ethernet) device. The actual code was inspired by the rule-based decision engine concept developed by EnLight.

Based on the hardware specifications of the device, the existing code to communicate with, and adherence to the functional paradigm, Lua was chosen to build the proof with. The implementation of the decision engine was altered to exploit characteristics of functional programming, such as representing actions as functions rather than as an enumeration value, using the common filter function to replace loops, and many more.

The proof of concept was able to run in the device. It was also relatively more readable and maintainable. However, it was slightly slower, less memory efficient, and less capable in dealing with low-level problems such as garbage compared to the engine in C language.

References

[1] Barendregt, H. P., Manzonetto, G., and Plasmeijer, M. J. The imperative and functional programming paradigm. in Cooper, B. and van Leeuwen, J. ed. Alan Turing — His Work and Impact, Elsevier, Boston, 2013, 121-126.

[2] Chisholm, J. A Functional Introduction to Lua. Pragpub: The First Iteration, 47. 2013. 11-17.

[3] Ierusalimschy, R. Programming in Lua. Lua.Org, Rio de Janeiro, 2013.

[4] Lua. 2012. About. URI=http:// www.lua.org/about.html.

[5] Michaelson, G. An introduction to functional programming through Lambda calculus. Dover Publications, Mineola, N.Y., 2011.

[6] Turner, D. A. Some History of Functional Programming Languages. in 13th International Symposium, TFP 2012, (St. Andrews, United Kingdom, 2012), Springer Berlin Heidelberg, 1-20.

[7] van Tujil, F., James, L., Creusen, M., and Stalpers, M. EnLight Project Outcomes. LED Professional Review, 48. 2015. 66-79.

Downloads

Published

2015-08-14

Issue

Section

Articles