Skip to content
0:00 / 0:00

#rlanguage#pir#intermediaterepresentation

R Melts Brains -- An IR for First-Class Environments and Lazy Effectful Arguments

ACM SIGPLAN

11K subscribers • 53 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Olivier Flückiger

Advanced. Deep dive for people who know the field.

399 views7 years ago1 recommendation

Programming languagesSystems programmingCompilers and interpretersLanguage design and type systems

Olivier Flückiger presents PIR, an intermediate representation designed to optimize the R language's first-class environments and lazy evaluation.

The R programming language combines a number of fea- tures considered hard to analyze and implement efficiently: dynamic typing, reflection, lazy evaluation, vectorized prim- itive types, first-class closures, and extensive use of native code. Additionally, variable scopes are reified at runtime as first-class environments. The combination of these features renders most static program analysis techniques impractical, and thus, compiler optimizations based on them ineffective. We present our work on PIR, an intermediate representa- tion with explicit support for first-class environments and effectful lazy evaluation. We describe two dataflow analyses on PIR: the first enables reasoning about variables and their environments, and the second infers where arguments are evaluated. Leveraging their results, we show how to elide environment creation and inline functions. Presenter: Olivier Flückiger Authors: Olivier Flückiger, Guido Chari, Jan Jecmen, Ming-Ho Yee, Jakob Hain, Jan Vitek Paper: janvitek.org/pubs/dls19.pdf Presented at DLS 2019 (conf.researchr.org/home/dls-2019#About), part of SPLASH 2019 (2019.splashcon.org/)

Why it's here

1 person recommends this

What people say. Recommended as a great explanation of R's unique design choices and why it is difficult to compile.

u/Disjunction181in r/ProgrammingLanguages • Recommends

On “Thoughts on R's design as a programming language?”

There was a good video from some time ago that explained R's weird choices and why it's very difficult to compile: R melts brains.