What We Eval in the Shadows: A Large-Scale Study of Eval in R Programs - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

What We Eval in the Shadows: A Large-Scale Study of Eval in R Programs

Résumé

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.
Fichier principal
Vignette du fichier
oopsla21main-p121-p-5fdea6b58e-54088-final.pdf (1.99 Mo) Télécharger le fichier
Origine : Fichiers éditeurs autorisés sur une archive ouverte

Dates et versions

hal-03373248 , version 1 (11-10-2021)

Identifiants

Citer

Aviral Goel, Pierre Donat-Bouillud, Filip Křikava, Christoph M Kirsch, Jan Vitek. What We Eval in the Shadows: A Large-Scale Study of Eval in R Programs. ACM on Programming Languages, Oct 2021, Chicago, United States. ⟨10.1145/3485502⟩. ⟨hal-03373248⟩
46 Consultations
58 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More