JuliaCon 2026

Type-stable Symbolic Computation
2026-08-12 , Room 6

Symbolic computation is inherently very dynamic. It needs to support representing arbitrary function calls, on arbitrary symbolic types. Older versions of Symbolics.jl and SymbolicUtils.jl were notoriously type-unstable. This talk goes over the methods used and challenges involved in making the latest major versions of those packages type-stable and precompilation-friendly. The techniques and insights discussed are generally applicable to other packages as well.


There are various different approaches taken to represent programs. Data representations can vary from SSA-IR to expression-trees. Some tools may choose to specialize on very specific types of expressions - polynomial algebra, or real numbers. In contrast, SymbolicUtils.jl (the core of the Symbolics.jl CAS) aims to be a framework for representing arbitrary symbolic expressions in arbitrary algebras, where different parts of the expression can have different types. It even allows (in fact, requires) the ability to represent different types of expressions in different ways. For example, the expressions for associative-commutative + and * uses a completely different representation than the standard tree-based approach. So how is all this made possible, while retaining type-stability and precompiling common workflows?

The answer lies in the recent SymbolicUtils version 4 release. Older versions had significant historical baggage, and were victims of the tooling available when they were written. Since then, the language and package ecosystem have grown in leaps and bounds. The new release rewrote most of the core package to use modern alternatives to many core packages, with an emphasis on benchmarking and performance. This talk walks through the design of SymbolicUtils today, contrasting it with older versions and illustrating how we solved the innumerable problems along the way. In doing so, it also highlights the idiosyncrasies of the language, the various useful tooling for debugging type-stability and precompilation, and pain-points that make such investigation difficult.

Software Engineer at JuliaHub

Lead developer of ModelingToolkit.jl and underlying symbolic infrastructure