Guillaume Duboc

Guillaume Duboc

PhD Student at Dashbit + IRIF

Paris, France

I am working on set-theoretic type systems for dynamic languages such as Elixir.

Publications

Talks

Projects

ElixirConf 2026

Slides and Guard Analysis Test Files

These are the slides and .exs files I shared after From Guards to Types. The downloads include the 1.19.5 baseline and the 1.20.0-rc.4 snapshot used in the talk.

The 1.20.0-rc.4 files load Elixir's own test helper from a matching checkout via ELIXIR_CHECKOUT.

Files

guard_refinement_examples_elixir_1.20.0_rc4.exs
Loading…

Run

Elixir 1.20.0-rc.4

ELIXIR_CHECKOUT=/path/to/elixir-checkout elixir guard_negation_examples_elixir_1.20.0_rc4.exs
ELIXIR_CHECKOUT=/path/to/elixir-checkout elixir guard_refinement_examples_elixir_1.20.0_rc4.exs

Elixir 1.19.5

elixir guard_negation_examples_elixir_1.19.5.exs
elixir guard_refinement_examples_elixir_1.19.5.exs
PhD Thesis

Typing Dynamic Languages with Set-Theoretic Types: The Case of Elixir

Author Guillaume Duboc
Institutions IRIF, Universite Paris Cite, and Dashbit
Defense January 19, 2026 Turing Amphitheater, IRIF, Paris
Didier Rémy Reviewer
Éric Tanter Reviewer
Annette Bieniusa Examiner
Mariangiola Dezani Examiner
Ben Greenman Examiner
Giuseppe Castagna Thesis Director
José Valim Co-supervisor, Elixir Creator
Abstract

Adding static types to dynamic languages requires balancing expressiveness, safety, and backward compatibility. These trade-offs often limit the practical adoption of type systems. This thesis presents a gradual type system for Elixir grounded in set-theoretic types, where types denote sets of values and support union, intersection, and negation operations.

The central hypothesis is that set-theoretic types are particularly well-suited for capturing the programming patterns of dynamic languages. Union types reflect the branching nature of dynamic programs; intersection types express data flow and function overloading; negation types enable precise analysis of pattern matching by excluding values captured by preceding branches.

A key challenge is articulating gradual typing with semantic subtyping. We represent gradual types as intervals bounded below by the precise static type of all known values and above by the dynamic type of all possible values, enabling fine-grained tracking of type information at the boundaries between typed and untyped code.

On the theoretical side, we present a safe-erasure gradual typing discipline exploiting runtime checks already in the Erlang VM, an extensive typed analysis of pattern matching, and an extension of semantic subtyping to handle Elixir's data structures. To prevent the unchecked spread of dynamic types, we introduce strong function refinements, a crucial aspect for maintaining type safety in a gradually typed system.

On the practical side, we address implementation within the Elixir compiler. We present efficient algorithms and data structures for type operations, evaluate compilation performance, and document design choices that minimize overhead while preserving expressiveness, constituting a guide for language implementers seeking to integrate gradual set-theoretic types into dynamic languages.