R Melts Brains


An IR for First-Class Environments and Lazy Effectful Arguments

Article by Olivier Flückiger, Guido Chari, Jan Ječmen, Ming-Ho Yee, Jakob Hain, Jan Vitek, published at DLS ‘19, Slides, Talk.

The R programming language combines a number of features considered hard to analyze and implement efficiently. Additionally, variable scopes are reified at runtime as first-class environments. This renders most static program analysis techniques impractical. We present our work on PIR, an intermediate representation with explicit support for first-class environments and effectful lazy evaluation.

Blog post about scoping in R.

PIR is used in our VM called Ř.