Assess Applicability of the Functional Programming Paradigms in Embedded Hardware

Danny Benlin Oswan(1*), Michiel W. Koehorst(2), Marcin Gramza(3),


(1) Program Studi Teknik Informatika
(2) Fontys Hogeschool ICT
(3) Philips Lighting
(*) Corresponding Author

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.

Keywords


Functional Programming Paradigm; Decision Engine; Embedded; Lighting

Full Text:

PDF

References


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.

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

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

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

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

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.

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


Refbacks

  • There are currently no refbacks.


Jurnal telah terindeks oleh :