Back to search

McMaster University

Type-Safe Domain-Specific Code Graph Construction Using Scala

Abstract

dc:description.abstract

As an extension to the ongoing Coconut (COde COnstructing User Tool) project at McMaster University, we present a Scala library for constructing type-safe domain-specific languages that uses Coconut’s hypergraph-based representation of code (code graphs) as the intermediate representation. Our library automatically produces strongly typed, deeply embedded DSLs given only a minimal specification of the DSL’s value types and primitives. We make extensive use of path-dependent types and implicit argument lookup to construct a type-safe interface on-the-fly, rather than requiring DSL designers to explicitly create a type-safe interface. In this thesis we present our library and demonstrate its utility as both a general-purpose DSL framework and as a suitable platform for continued research on the Coconut project. By giving practical examples of the library in use, we demonstrate both its general utility, and the striking swiftness with which new DSLs may be constructed, especially compared to the previously laborious Haskell DSLs of Coconut.

Degree

thesis:*
Department dc:contributor.department
Computing and Software
Year dc:date.issued
2016

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • Broadhead, Simon
Advisor dc:contributor.advisor
  • Anand, Christopher

Subjects

dc:subject × 6

Rights

Language dc:language.iso
en

Identifiers

dc:identifier.*

Chain of custody

source
Harvested from
McMaster University
Base URL
macsphere.mcmaster.ca/server/oai/request
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
citation

Broadhead, Simon. Type-Safe Domain-Specific Code Graph Construction Using Scala. 2016. http://hdl.handle.net/11375/18494