Lune

OOPSLA2021Top-tier venue

What we eval in the shadows: a large-scale study of eval in R programs

Aviral Goel, Pierre Donat-Bouillud, Filip Krikava, Christoph M. Kirsch, Jan Vitek

Abstract

Most dynamic languages allow users to turn text into code using various functions, often named eval, with language-dependent semantics. The widespread use of these reflective functions hinders static analysis and prevents compilers from performing optimizations. This paper aims to provide a better sense of why programmers use eval. Understanding why eval is used in practice is key to finding ways to mitigate its negative impact. We have reasons to believe that reflective feature usage is language and application domain-specific; we focus on data science code written in R and compare our results to previous work that analyzed web programming in JavaScript. We analyze 49,296,059 calls to eval from 240,327 scripts extracted from 15,401 R packages. We find that eval is indeed in widespread use; R’s eval is more pervasive and arguably dangerous than what was previously reported for JavaScript.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • An Empirical Study of WebAssembly Usage in Node.js cites A study of inline assembly in solidity smart contracts
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. A study of inline assembly in solidity smart contractsStefanos Chaliasos, Arthur Gervais, Benjamin LivshitsOOPSLA 2022 · 22 citations
  2. An Empirical Study of WebAssembly Usage in Node.jsMichelle Thalakottur, Maxwell Bernstein, Daniel Lehmann, Michael Pradel et al.ICSE 2026

Builds on1

  1. World age in Julia: optimizing method dispatch in the presence of evalJulia Belyakova, Benjamin Chung, Jack Gelinas, Jameson Nash et al.OOPSLA 2020 · 9 citations

Related papers

  1. Designing types for R, empiricallyAlexi Turcotte, Aviral Goel, Filip Krikava, Jan VitekOOPSLA 2020 · 9 citations
  2. Statically Analyzing the Dataflow of R ProgramsFlorian Sihler, Matthias TichyOOPSLA 2025 · 3 citations
  3. Promises are made to be broken: migrating R to strict semanticsAviral Goel, Jan Jecmen, Sebastián Krynski, Olivier Flückiger et al.OOPSLA 2021 · 2 citations
  4. Subtle Bugs Everywhere: Generating Documentation for Data Wrangling CodeChenyang Yang, Shurui Zhou, Jin L. C. Guo, Christian KästnerASE 2021 · 25 citations
  5. Demystifying Compiler Unstable Feature Usage and Impacts in the Rust EcosystemChenghao Li, Yifei Wu, Wenbo Shen, Zichen Zhao et al.ICSE 2024 · 6 citations
Dusk over the sea between two cliffs drawn in fine vertical lines