Aviral Goel

Aviral Goel

Auto-generated profile, based on publicly available information

Aviral Goel

Northeastern University, USA

Research Focus & Metrics

Academic Career Length

13Years (2014-Present)

(Calculated once Scilit publication data is synced: current year − year of first publication + 1)

Representative Publications

View All Publications
27 December 2017 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
OFOlivier Flückiger
Olivier Flückiger
GSGabriel Scherer
Gabriel Scherer
MYMing-Ho Yee
Ming-Ho Yee
AGAviral Goel
Aviral Goel
AAAmal Ahmed
Amal Ahmed
JVJan Vitek
Jan Vitek
High-performance dynamic language implementations make heavy use of speculative optimizations to achieve speeds close to statically compiled languages. These optimizations are typically performed by a just-in-time compiler that generates code under a set of assumptions about the state of the program and its environment. In certain cases, a program may execute code compiled under assumptions that are no longer valid. The implementation must then deoptimize the program on-the-fly; this entails finding semantically equivalent code that does not rely on invalid assumptions, translating program state to that expected by the target code, and transferring control. This paper looks at the interaction between optimization and deoptimization, and shows that reasoning about speculation is surprisingly easy when assumptions are made explicit in the program representation. This insight is demonstrated on a compiler intermediate representation, named sourir, modeled after the high-level representation for a dynamic language. Traditional compiler optimizations such as constant folding, unreachable code elimination, and function inlining are shown to be correct in the presence of assumptions. Furthermore, the paper establishes the correctness of compiler transformations specific to deoptimization: namely unrestricted deoptimization, predicate hoisting, and assume composition.

10 October 2019 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
PDF file
AGAviral Goel
Aviral Goel
JVJan Vitek
Jan Vitek
The R programming language has been lazy for over twenty-five years. This paper presents a review of the design and implementation of call-by-need in R, and a data-driven study of how generations of programmers have put laziness to use in their code. We analyze 16,707 packages and observe the creation of 270.9 B promises. Our data suggests that there is little supporting evidence to assert that programmers use laziness to avoid unnecessary computation or to operate over infinite data structures. For the most part R code appears to have been written without reliance on, and in many cases even knowledge of, delayed argument evaluation. The only significant exception is a small number of packages which leverage call-by-need for meta-programming.

15 October 2021 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
AGAviral Goel
Aviral Goel
PDPierre Donat-Bouillud
Pierre Donat-Bouillud
FKFilip Křikava
Filip Křikava
CKChristoph M. Kirsch
Christoph M. Kirsch
JVJan Vitek
Jan Vitek
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.

15 October 2021 in Proceedings of the ACM on Programming Languages
Verified
Journal Article
Open access
AGAviral Goel
Aviral Goel
JJJan Ječmen
Jan Ječmen
SKSebastián Krynski
Sebastián Krynski
OFOlivier Flückiger
Olivier Flückiger
JVJan Vitek
Jan Vitek
Function calls in the R language do not evaluate their arguments, these are passed to the callee as suspended computations and evaluated if needed. After 25 years of experience with the language, there are very few cases where programmers leverage delayed evaluation intentionally and laziness comes at a price in performance and complexity. This paper explores how to evolve the semantics of a lazy language towards strictness-by-default and laziness-on-demand. To provide a migration path, it is necessary to provide tooling for developers to migrate libraries without introducing errors. This paper reports on a dynamic analysis that infers strictness signatures for functions to capture both intentional and accidental laziness. Over 99% of the inferred signatures were correct when tested against clients of the libraries.

7 September 2021
Verified
Dataset
Open access
AGAviral Goel
Aviral Goel
PBPierre Donat Bouillud
Pierre Donat Bouillud
FKFilip Krikava
Filip Krikava
CKChristoph Kirsch
Christoph Kirsch
JVJan Vitek
Jan Vitek
Dataset for the artifact (https://doi.org/10.5281/zenodo.5415229) and the paper Why We Eval in the Shadows? It corresponds to the alternative step in the artifact, for those who want to reproduce our results without having a cluster, and with the same version of CRAN as we had.

19 October 2021
Verified
Conference Paper
Open access
AGAviral Goel
Aviral Goel
JVJan Vitek
Jan Vitek
The R programming language is widely used for statistical computing. To enable interactive data exploration and rapid prototyping, R encourages a dynamic programming style. This programming style is supported by features such as first-class environments. Amongst widely used languages, R has the richest interface for programmatically manipulating environments. With the flexibility afforded by reflective operations on first-class environments, come significant challenges for reasoning and optimizing user-defined code. This paper documents the reflective interface used to operate over first-class environment. We explain the rationale behind its design and conduct a large-scale study of how the interface is used in popular libraries.