Font Size: a A A

Domain Specific Languages for Small Embedded System

Posted on:2019-08-16Degree:Ph.DType:Dissertation
University:University of KansasCandidate:Grebe, MarkFull Text:PDF
GTID:1478390017986647Subject:Computer Science
Abstract/Summary:
Resource limited embedded systems provide a great challenge to programming using functional languages. Although these embedded systems cannot be programmed directly with Haskell, I show that an embedded domain specific language is able to be used to program them, and provides a user friendly environment for both prototyping and full development. The Arduino line of microcontroller boards provide a versatile, low cost and popular platform for development of these resource limited systems, and I use these boards as the platform for my DSL research.;First, I provide a shallowly embedded domain specific language, and a firmware interpreter, allowing the user to program the Arduino while tethered to a host computer. Shallow EDSLs allow a programmer to program using many of the features of a host language and its syntax, but sacrifice performance. Next, I add a deeply embedded version, allowing the interpreter to run standalone from the host computer, as well as allowing the code to be compiled to C and then machine code for efficient operation. Deep EDSLs provide better performance and flexibility, through the ability to manipulate the abstract syntax tree of the DSL program, but sacrifice syntactical similarity to the host language. Using Haskino, my EDSL designed for Arduino microcontrollers, and a compiler plugin for the Haskell GHC compiler, I show a method for combining the best aspects of shallow and deep EDSLs. The programmer is able to write in the shallow EDSL, and have it automatically transformed into the deep EDSL. This allows the EDSL user to benefit from powerful aspects of the host language, Haskell, while meeting the demanding resource constraints of the small embedded processing environment.
Keywords/Search Tags:Embedded, Language, Domain specific, EDSL, Provide, Program
Related items