Back to search

Computer Science, Lund University

Techniques for implementing embedded domain specific languages in dynamic languages

Abstract

dc:description

Computer programming should be expressing the complicated in easily understandable parts. General languages provide tools and abstractions that allow many different problems to be formulated and solved. Unfortunately, these abstraction only rarely match the problem area precisely, resulting in solutions that are obscured by the need for support code unrelated to the problem. This can be avoided, by constructing a language tailored to the specific problem, solutions can be expressed more clearly, resulting in programs that are easy to read, debug, and maintain. Designing a new language from scratch, however, is a costly venture, which has hindered the adoption of such domain specific languages (DSLs). In this thesis, we explore and describe methods for constructing and implementing DSLs. By using an existing host language, DSLs can be implemented as embedded languages, inheriting the syntax and capabilities of the host language. We argue that the embedded language approach to implementing DSLs gives many benefits over traditional language implementation techniques. Furthermore, by using a dynamic programming language as host, we can take advantage of the high-level nature of such a language; both to facilitate the implementation of the DSL and to provide high-level programming constructs in the DSL. This thesis describes two prototype languages; PyFX and PyGPU, both embedded in Python, for programming and controlling different aspects of modern graphics cards. PyFX is a language for constructing real-time graphics effects. It views effects as active entities, allowing them to be expressed concisely and clearly, without introducing the glue-code requirements of previous approaches. The second language, PyGPU, is targeted at writing high-level image processing algorithms that execute on the high performing graphics processing unit (GPU) present on modern graphics cards. PyGPU uses a combination of a high-level image abstraction and a novel compilation strategy to translate high-level PyGPU code to efficient native code running on the GPU.

Degree

thesis:*
Grantor dc:publisher
Computer Science, Lund University
Year dc:date
2006

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Lejdfors, Calle

Subjects

dc:subject × 1

Rights

dc:rights
Statement dc:rights
  • info:eu-repo/semantics/openAccess
Language dc:language
eng

Identifiers

dc:identifier.*
Repository record dc:identifier
https://lup.lub.lu.se/record/954418

Chain of custody

source
Harvested from
University of Lund
Base URL
lup.lub.lu.se/oai
Last updated
2026-11-19
Source record
OAI-PMH GetRecord
related terms
citation

Lejdfors, Calle. Techniques for implementing embedded domain specific languages in dynamic languages. Computer Science, Lund University, 2006. https://lup.lub.lu.se/record/954418