6–9 Jul 2026
Europe/Warsaw timezone

A Type System for the R Language

8 Jul 2026, 16:00
2h
Poster Poster

Speaker

Dr Filip Křikava (Czech Technical University in Prague)

Description

Dynamic programming languages are increasingly adopting explicit type annotations. Not only do they serve as documentation, but they also enable static type checking to eliminate entire classes of bugs and help tools provide a better development experience. In this talk, we will present our advancements in bringing types to R, including a type system with a static type checker with type inference.

R's flexibility and design for interactive use make it challenging to type statically. Our approach is built on the novel theory of set-theoretic types. This foundation allows us to natively support R's core structures, data frames, polymorphic functions, and classes. Rather than imposing rigid constraints, the system uses set operations to model practical behaviors. For example, intersection types can elegantly handle overloaded functions: a function annotated as $\texttt{(int -> int) & ({a:int} -> {b:int})}$ clearly documents that it returns an integer when given an integer, but returns a list with name $\texttt{b}$ when passed a list with name $\texttt{a}$.

Because spelling out every type can be tedious during rapid development, our constraint-solving inference engine deduces types automatically wherever possible. Additionally, the checker supports a subset of the C FFI, enabling the analysis of R packages that rely on native C or Fortran code.

Additional Material or Paper

Type algebra : https://github.com/E-Sh4rk/rstt ; type checking and inference for R : https://github.com/E-Sh4rk/typed-r ; type checking and inference for the C (and Fortran) FFI : https://github.com/programLyrique/r-c-typing

If you used AI tools or services to support the preparation of this submission, please state the name and reason for using each of them.

GitHub Copilot: helped for the development of the type checking and inference engine (smart completion, agents for the plumbing parts)

Keywords: Please list up to 5 keywords to help us find the right session for your contribution. types, packages, type inference, FFI, bug detection
Virtual Option This submission is for onsite presentation only
Video Recording Video sharing is fine
The author(s) agree(s) to take responsibility and be accountable for the contents of the submission and is/are authorized to present it. Confirm
Interested in serving as reviewer? pierre.donat.bouillud@gmail.com

Authors

Dr Pierre Donat-Bouillud (Czech Technical University in Prague) Dr Mickael Laurent (Charles university) Dr Filip Křikava (Czech Technical University in Prague)

Presentation materials

There are no materials yet.