R融化大脑--一个适用于一流环境和懒惰的辩论的IR
R Melts Brains -- An IR for First-Class Environments and Lazy Effectful Arguments
摘要:
R程序设计语言结合了许多被认为很难有效分析和实现的特性:动态类型、反射、惰性求值、向量化原语类型、第一类闭包和大量使用本机代码。此外,变量作用域在运行时被具体化为一级环境。这些特性的组合使得大多数静态程序分析技术不切实际,因此,基于它们的编译器优化是无效的。我们提出了我们的工作PIR,一个中间表示,明确支持一流的环境和有效的懒惰评价。我们描述了两个PIR的分析:第一个使推理的变量和他们的环境,第二个推断参数进行评估。利用他们的结果,我们展示了如何省略环境创建和内联函数。
英文摘要:
The R programming language combines a number of features considered hard to analyze and implement efficiently: dynamic typing, reflection, lazy evaluation, vectorized primitive 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 representation 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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。