‹Programming› 2022
Mon 11 - Thu 14 April 2022
Thu 14 Apr 2022 06:50 - 07:15 at Virtual Space - ‹Programming› Online Thursday Chair(s): Jeremy Gibbons

Domain-specific languages (DSLs) are touted as both easy to embed in programs and easy to optimize. Yet these goals are often in tension. Embedded or internal DSLs fit naturally with a host language, while inheriting the host’s performance characteristics. External DSLs can use external optimizers and languages but sit apart from the host.

We present Sham, a toolkit designed to enable internal DSLs with high performance. Sham provides a domain-specific language (embedded in Racket) for implementing other high-performance DSLs, with transparent compilation to assembly code at runtime. Sham is well suited as both a compilation target for other embedded DSLs and for transparently replacing DSL support code with faster versions. Sham provides seamless inter-operation with its host language without requiring any additional effort from its users. Sham also provides a framework for defining language syntax which implements Sham’s own language interface as well.

We validate Sham’s design on a series of case studies, ranging from Krishnamurthi’s classic automata DSL to a sound synthesis DSL and a probabilistic programming language. All of these are existing DSLs where we replaced the backend using Sham, resulting in major performance gains. We present an example-driven description of how Sham can smoothly enhance an existing DSL into a high-performance one.

When compared to existing approaches for implementing high-performance DSLs, Sham’s design aims for both simplicity and programmer control. This makes it easier to port our techniques to other languages and frameworks, or borrow Sham’s innovations “à la carte” without adopting the whole approach. Sham builds a sophisticated and powerful DSL construction toolkit atop fundamental language features including higher-order functions, data structures, and a foreign-function interface (FFI), all readily available in other languages. Furthermore, Sham’s approach allows DSL developers to simply write functions, either using Sham or generating Sham, without needing to work through complex staging or partial evaluation systems.

Thu 14 Apr

Displayed time zone: Lisbon change

06:00 - 09:00
‹Programming› Online ThursdayResearch Papers / at Virtual Space
Chair(s): Jeremy Gibbons Department of Computer Science, University of Oxford
06:00
25m
Talk
Day 4 Opening | N Things I Hate About \nu*
James Noble Creative Research & Programming
06:25
25m
Research paper
Topology-level Reactivity in Distributed Reactive Programs: Reactive Acquaintance Management using Proximity SetsVol. 6
Research Papers
Sam Van den Vonder Vrije Universiteit Brussel, Thierry Renaux Vrije Universiteit Brussel, Wolfgang De Meuter Vrije Universiteit Brussel
Link to publication DOI
06:50
25m
Research paper
Sham: A DSL for Fast DSLsVol. 6
Research Papers
Rajan Walia Indiana University, Chung-chieh Shan Indiana University, USA, Sam Tobin-Hochstadt Indiana University
Link to publication
07:15
25m
Research paper
Debootstrapping without archeology: Stacked implementations in CamlbootVol. 6
Research Papers
Nathanaëlle Courant INRIA, Julien Lepiller Yale University, Gabriel Scherer INRIA Saclay
07:40
25m
Other
Conference Closing
G: Ademar Aguiar FEUP, Universidade do Porto, G: Shigeru Chiba The University of Tokyo