Embedded Programming with Embedded Domain-Specific Languages (EDSLs) in Haskell

Schmidli, Eliane Irène (2023) Embedded Programming with Embedded Domain-Specific Languages (EDSLs) in Haskell. Masters thesis, OST Ostschweizer Fachhochschule.

[thumbnail of 2_ElianeSchmidli_Haskino_v2.pdf] Text
2_ElianeSchmidli_Haskino_v2.pdf - Supplemental Material

Download (345kB)

Abstract

Embedded domain-specific languages (EDSLs) make it possible to program embedded systems with Haskell. Programming in Haskell has many advantages such as the reduction of runtime errors and writing code more elegantly. The Haskell library Haskino provides two EDSLbased variants for programming Arduinos. In the first variant, commands are sent interactively to an Arduino that is connected to the computer. The second variant turns the Haskell code into an abstract syntax tree (AST) representing actions and computations. This structure can be used to generate C code that can be executed directly on the Arduino. The advantage of Haskell becomes apparent when using paradigms such as functional reactive programming (FRP). In the first variant offered by Haskino, FRP can be used without any problems because it is executed in the Haskell environment. In the second, it would be necessary to integrate the FRP functionality into the AST and to define the translation into C. The ability to run FRP code directly on Arduino is demonstrated by the frp-arduino library. This paper introduces EDSLs in Haskell, their application in the Haskino library, and shows an Arduino programming example using Haskell and FRP.

Item Type: Thesis (Masters)
Subjects: Area of Application > Development Tools
Technologies > Programming Languages > Haskell
Metatags > IFS (Institute for Software)
Divisions: Master of Advanced Studies in Software Engineering
Depositing User: Stud. I
Contributors:
Contribution
Name
Email
Thesis advisor
Mehta, Farhad
UNSPECIFIED
Date Deposited: 16 Oct 2023 07:27
Last Modified: 16 Oct 2023 07:27
URI: https://eprints.ost.ch/id/eprint/1127

Actions (login required)

View Item
View Item