Skip to content
chibash edited this page Oct 2, 2018 · 17 revisions

Yadriggy -- a hemi-parasitic DSL framework for Ruby

Ruby is known as a cradle of embedded DSLs. Although the code of typical DSLs embedded in Ruby is executed by the Ruby VM, this framework helps the embedded DSL code run by its dedicated execution engine such as an interpreter or native hardware. Yadriggy provides a method for reifying a lambda expression or a method body. You can write a program that receives a lambda expression or a method, reify it to obtain its abstract syntax tree, and execute it as DSL code with semantics different from Ruby.

Hemi-parasitic DSLs

This framework comes with example DSLs.

A C-like DSL embedded in Ruby, which is for computation offloading by translating the DSL code into C or OpenCL code.

A power-assert library built with Yadriggy.

Reference

The idea of the reification provided by Yadriggy was proposed here:

  • Shigeru Chiba, YungYu Zhuang, Maximilian Scherr, "Deeply Reifying Running Code for Constructing a Domain-Specific Language", PPPJ'16, Article No. 1, ACM, August 2016.
Clone this wiki locally