Documentation

Control-Flow Graphs

Cubix has two interesting innovations in building and using control-flow graphs.

The first is a way of building highly compact CFG-generators, which enabled us to build a complete CFG-generator for JavaScript, which has 184 distinct node types, in only 79 lines.

The second is the control-flow based inserter, which provides the operation "insert statement S such that it always executes before expression E." This operation makes it possible to build 1-line program transformations that handle special cases across multiple languages.

These are the subject of their own paper.

One CFG-Generator to Rule Them All