JVJan Vitek

Jan Vitek

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

Current Organizations / Institutes

The organizations/institutes from the scholar's latest article


Jan Vitek has a total of 56 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    What Do R Benchmarks Measure

    by Matěj Kocourek, Filip Říha, Oliver Tušla, Pierre Donat-Bouillud, Filip KřIkava, Jan Vitek

  • Open Access

    Revisiting Row Polymorphism for Set-Theoretic Types

    by Mickaël Laurent, Pierre Donat-Bouillud, Filip KřIkava, Jan Vitek

    Set-theoretic types support expressive record types through unions, intersections, and negations, but they lack the row polymorphism needed to type operations that propagate unknown fields across records. Prior work addresses this by allowing Boolean combinations of rows in type substitutions, which complicates the formalism and prevents the tallying algorithm from being complete. We propose an alternative: instead of enriching substitutions, we allow Boolean combinations of row variables directly within record type constructors, where the tail of a record has the same shape as any field. This design keeps substitutions simple---a row variable maps to a single row---and yields a natural extension of the subtyping and tallying algorithms. Tallying is complete for all solutions whose rows are constant over labels not mentioned in the constraints. We implement our approach in the set-theoretic type library SSTT and the type checker MLsem, providing the first implementation of a type system that combines semantic subtyping with row polymorphism. We demonstrate the expressiveness of the system by encoding several data structures from the R programming language: heterogeneous lists, variadic function arguments, and class-based dispatch.


  • Open Access

    Leveraging Copy-and-Patch JIT for Low-Overhead Dynamic Program Analysis

    by Matěj Kocourek, Filip KřIkava, Pierre Donat-Bouillud, Jan Vitek

    Copy-and-patch compilation is an approach for building baseline just-in-time compilers from AST or bytecode interpreters. It features very fast compilation times while generating good quality code. It has been used as a baseline tier for a number of languages including Lua, Python, and R. In this paper, we explore copy-and-patch as a foundation for dynamic program analysis, and implement four analyses on top of an existing copy-and-patch JIT for R: code instrumentation, code coverage, performance profiling, and native debugging. Two properties make copy-and-patch particularly well-suited for this purpose. First, since the code templates (stencils) are compiled by a standard C compiler, DWARF debug information is available as a by-product. This lets us reuse native tooling for profiling and debugging directly, with R and native code appearing in a single unified view. Second, analyses that operate at the bytecode level reduce to injecting stencils into the bytecode stream at JIT compile time, incurring minimal overhead. Our prototype evaluation yields instrumentation with no measurable overhead; code coverage that is faster than the existing solution while covering 17% more lines; and profiling that remains, on average, faster than GNU R.

  • Open Access

    A Typed Intermediate Representation for Dynamic Languages

    by Mickaël Laurent, Jakob Hain, Filip KřIkava, Sebastián Krynski, Jan Vitek

    Dynamic programming languages pose significant challenges for optimizing compilers due to features such as dynamic typing, late binding, reflection, copy-on-write, and delayed evaluation. To generate efficient code, compilers must speculate on which dynamic features will be exercised and produce specialized code based on these assumptions. This article presents the design of a statically typed, high-level intermediate representation (IR) that makes dynamic behaviors explicit and amenable to static analysis. Our IR combines gradual typing with ownership tracking, and explicitly represents promises, multiple function versions, and contextual dispatch. Together, these features directly support optimizations such as specialization, inlining, scope elision, and copy elimination. We formalize a core calculus, called FIŘ, that captures the essential features required for these optimizations. We provide an operational semantics, a type system, and flow and reflection analyses, and we prove the soundness of the type system.

  • Open Access

    Type Inference for Functional and Imperative Dynamic Languages

    by Mickaël Laurent, Jan Vitek

    In this paper, we formalize a type system based on set-theoretic types for dynamic languages that support both functional and imperative programming paradigms. We adapt prior work in the typing of overloaded and generic functions to support an impure lambda-calculus, focusing on imperative features commonly found in dynamic languages such as JavaScript, Python, and Julia. We introduce a general notion of parametric opaque data types using set-theoretic types, enabling precise modeling of mutable data structures while promoting modularity, clarity, and readability. Finally, we compare our approach to existing work and evaluate our prototype implementation on a range of examples.


  • Open Access

    Copy-and-Patch Just-in-Time Compiler for R

    by Matěj Kocourek, Filip Křikava, Jan Vitek


  • Open Access

    R4R: Reproducibility for R

    by Pierre Donat-Bouillud, Filip Křikava, Sebastian Krynski, Jan Vitek


  • Open Access

    Reducing Feedback Pollution

    by Sebastián Krynski, Michal Štěpánek, Filip Říha, Filip Křikava, Jan Vitek

    Just-in-time compilers enhance the performance of future invocations of a function by generating code tailored to past behavior. To achieve this, compilers use a data structure, often referred to as a feedback vector, to record information about each function’s invocations. However, over time, feedback vectors tend to become less precise, leading to lower-quality code – a phenomenon known as feedback vector pollution. This paper examines feedback vector pollution within the context of a compiler for the R language. We provide data, discuss an approach to reduce pollution in practice, and implement a proof-of-concept implementation of this approach. The preliminary results of the implementation indicate ∼30% decrease in polluted compilations and ∼37% decrease in function pollution throughout our corpus.


  • Open Access

    Decidable Subtyping of Existential Types for Julia

    by Julia Belyakova, Benjamin Chung, Ross Tate, Jan Vitek

    Julia is a modern scientific-computing language that relies on multiple dispatch to implement generic libraries. While the language does not have a static type system, method declarations are decorated with expressive type annotations to determine when they are applicable. To find applicable methods, the implementation uses subtyping at run-time. We show that Julia’s subtyping is undecidable, and we propose a restriction on types to recover decidability by stratifying types into method signatures over value types—where the former can freely use bounded existential types but the latter are restricted to use-site variance. A corpus analysis suggests that nearly all Julia programs written in practice already conform to this restriction.


  • Open Access

    Reusing Just-in-Time Compiled Code

    by Meetesh Kalpesh Mehta, Sebastián Krynski, Hugo Musso Gualandi, Manas Thakur, Jan Vitek

    Most code is executed more than once. If not entire programs then libraries remain unchanged from one run to the next. Just-in-time compilers expend considerable effort gathering insights about code they compiled many times, and often end up generating the same binary over and over again. We explore how to reuse compiled code across runs of different programs to reduce warm-up costs of dynamic languages. We propose to use speculative contextual dispatch to select versions of functions from an off-line curated code repository . That repository is a persistent database of previously compiled functions indexed by the context under which they were compiled. The repository is curated to remove redundant code and to optimize dispatch. We assess practicality by extending Ř, a compiler for the R language, and evaluating its performance. Our results suggest that the approach improves warmup times while preserving peak performance.