The core innovation of Cubix is incremental parametric syntax. With incremental parametric syntax, we can build support for languages by surgically altering third-party language definitions to be slightly more generic. We can then write transformations on multiple languages using a hybrid of language-specific and generic-code. The upshot is that Cubix is the world's only framework that allows programmers to build a single source-to-source tool that runs on multiple languages.
Outside of that, Cubix offers many additional features for building generic tools. There is no single ingredient to these, save a commitment to the practice of identifying commonalities between languages, and building a generic interface to query their differences. For example:
"use strict";is not considered part of the block, enabling transformations to support this case with no language-specific code.
Cubix is still in its infancy escaping the walls of MIT, and we are being proactive in helping all interested users. If ever anything confuses you, or you just want to mention that you're thinking of using Cubix for a project, do not hesitate to write our mailing list.
Welcome, Cubix programmer.
We suggest the following order for learning Cubix:
We have given many talks presenting an overview of the ideas behind Cubix over the years.
Here is the shorter version of the presentation, as given at OOPSLA 2018. (slides)
And here is a longer version of the talk, presented to many groups; this recording is from the presentation at the Boston Haskell meetup. (slides)
The following papers can help to get the necessary background in generic programming to understand Cubix:
Transformations in Cubix use our
compstrat library of strategy combinators.
To understand strategy combinators, we recommend the following paper: