All publications

Thesis / report · 2015

Integrating Domain-specific Languages to General-purpose Languages

Vassilios Karakoidas

The PhD thesis: how domain-specific languages can be embedded in general-purpose ones so that the host compiler checks them, rather than discovering their errors at run time.

Published in
PhD Thesis, Athens University of Economics and Business, 2015
Citations
Not indexed by Google Scholar.
Cite as
KARA15
J%

The idea

Modern development uses domain-specific languages alongside general-purpose ones — SQL inside Java being the everyday case. The standard way of joining them, JDBC, hands the query to the compiler as a string. The compiler is therefore blind to it, and type errors and syntax errors in the embedded language are found when the program runs, if they are found at all. The thesis treats that as a language design problem rather than a tooling one, and builds a compiler that can check an open set of embedded languages.

What it contains

  • A survey and classification of DSL embedding methods against the classifications in the literature.
  • The design of J%: a minimal Java extension in which each embedded DSL is a compiler module, keeping its own concrete syntax, with a declared mapping for values crossing the boundary.
  • The implementation, and the DSL modules written for it — SQL, regular expressions, JSON and typed get/set accessors.
  • An evaluation: embedding effort, run-time overhead against hand-written code, and which classes of error move from run time to compile time.

Where it sits

The compiler is J%, still maintained; the applications converted for the evaluation are J% Ports. Chapter 3 was revised in 2026 and is published separately as Design Concepts of the J% Programming Language.

Written from the thesis (the PDF linked above, in Greek) and from its 2026 revised chapter, which restates the design questions in English.