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 Ř.