AGAviral Goel

Aviral Goel

*This is an algorithmically generated author record based on publicly available information.

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article

Previous Organizations / Institutes

The organizations / institutes from the scholar's other articles in the past ten years


Aviral Goel has a total of 20 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    First-class environments in R

    by Aviral Goel, 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.

  • Open Access

    Promises are made to be broken: migrating R to strict semantics

    by Aviral Goel, Jan Ječmen, Sebastián Krynski, Olivier Flückiger, 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.


  • Open Access

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

    by Aviral Goel, Pierre Donat-Bouillud, Filip Křikava, Christoph M. Kirsch, 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.


  • Open Access

    Why We Eval in the Shadows (Dataset)

    by Aviral Goel, Pierre Donat Bouillud, Filip Krikava, Christoph Kirsch, Jan Vitek

  • Open Access

    Why We Eval in the Shadows (Dataset)

    by Aviral Goel, Pierre Donat Bouillud, Filip Krikava, Christoph Kirsch, Jan Vitek

  • Open Access

    On the design, implementation, and use of laziness in R

    by Aviral Goel, 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.


  • Open Access

    Correctness of speculative optimizations with dynamic deoptimization

    by Olivier Flückiger, Gabriel Scherer, Ming-Ho Yee, Aviral Goel, Amal Ahmed, 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.


  • De-Noising, Clustering, Classification, and Representation of Microarray Data for Disease Diagnostics

    by Nitin Baharadwaj, Sheena Wadhwa, Pragya Goel, Isha Sethi, Chanpreet Singh Arora, Aviral Goel, Sonika Bhatnagar, Harish Parthasarathy

    De-Noising, Clustering, Classification, and Representation of Microarray Data for Disease Diagnostics: 10.4018/978-1-4666-4558-5.ch009: A microarray works by exploiting the ability of a given mRNA molecule to bind specifically to the DNA template from which it originated under specific high