High-level Programming on Low-level Platforms: Two Domain-specific Languages based on Haskell
Licentiate thesis, 2023

In this thesis, we describe our research on how to program low-level platforms with high-level languages.
As an example, consider applications that run on microcontrollers. Such applications
may need to specify precise temporal behavior, carefully manage power usage, and handle cryptographic keys.
Low-level platforms are programmed using low-level languages such as C/C++, where the lack of expressiveness can
lead to error-prone code.

We investigate whether we can use high-level languages to program these platforms, by embedding domain-specific languages
in a host language, Haskell. A high-level language offers better expressivity and shields the developer from low-level
details, yielding code that more concretely describes what the application is supposed to do. Furthermore, a richer runtime
system could ease the burden of e.g. memory management and scheduling of coroutines.

The papers in this thesis indicate that it is possible to program these devices using a high-level language. We develop
two domain-specific languages, Scoria and HasTEE. Scoria is evaluated on NRF52 microcontrollers, where we run applications
that require precise, temporal behavior and perform I/O. HasTEE is evaluated on machines whose processor has support
for Intel Software Guard Extension and shows that the type system of Haskell can be used to automatically partition a Haskell
application and run it in a trusted execution environment.

Embedded Domain-specific Languages

Haskell

Confidential Computing

TEE

EC
Opponent: Troels Henriksen, DIKU, Denmark

Author

Robert Krook

Chalmers, Computer Science and Engineering (Chalmers), Functional Programming

Creating a Language for Writing Real-Time Applications for the Internet of Things

2022 20th ACM-IEEE International Conference on Formal Methods and Models for System Design, MEMOCODE 2022,; (2022)

Paper in proceeding

Sarkar, A. Krook, R. Russo, A. Claessen, K. HasTEE - Confidential Computing on Trusted Execution Environments with Haskell

Octopi: Secure Programming for the Internet of Things

Swedish Foundation for Strategic Research (SSF), 2018-05-01 -- .

Areas of Advance

Information and Communication Technology

Subject Categories

Embedded Systems

Computer Science

Computer Systems

Publisher

Chalmers

EC

Opponent: Troels Henriksen, DIKU, Denmark

More information

Latest update

5/23/2023