expltools: two years of latex3 static analysis

expltools two years of latex3 static analysis vít starý novotný ( ) tug 2026, calgary july 2026

Google Docs

In the upcoming v0.22.0 release of explcheck, planned for the end of May, I aim to add flow-aware analysis of the expandability of functions and boolean expressions, which we have been building towards over the past several releases.

For users, this will introduce support for the following new issue types:

1. E508 (Unexpandable or restricted-expandable boolean expression)
2. E512 (Defined an unexpandable function as unprotected)

This is another major step towards the first stable release of explcheck. I also plan to publish a blog post describing the underlying algorithm and its trade-offs. The current design is being discussed in https://github.com/Witiko/expltools/issues/215.

#LaTeX #expl3 #programming #TeXLaTeX #expltools

Report issues E508 (Unexpandable or restricted-expandable boolean expression) and E512 (Defined an unexpandable function as unprotected) · Issue #215 · Witiko/expltools

This PR continues #201 based on the tasks outlined there: In the syntactic analysis, consider a standalone variable or constant control sequence \⟨name⟩_⟨type⟩ to be a variable use like \⟨type⟩_use...

GitHub
オシャレなtcolorboxを誰でも作る方法(LaTeX確認シリーズ#5) - Qiita

オシャレな tcolorbox を誰でも作る方法(LaTeX確認シリーズ#5) LaTeX で「ちょっと装飾されたボックス」を作りたくなったとき、そのためのパッケージの最有力候補が tcolorbox パッケージです。デフォルトのままでも十分使えますが、本気で作り込むと、...

Qiita

Five new flow-analysis issue types have been added in https://github.com/Witiko/expltools/pull/188 over the past two days:

1. E500 (Multiply defined function)
2. W501 (Multiply defined function variant)
3. E504 (Function variant for an undefined function)
4. E506 (Indirect function definition from an undefined function)
5. W507 (Setting a function before definition)

These will be included in explcheck v0.19.0, planned for release by the end of the month.

#LaTeX #expl3 #programming #TeXLaTeX #expltools

Support flow analysis by Witiko · Pull Request #188 · Witiko/expltools

This PR continues #176 based on the tasks outlined there and the recent blog post: Report issues from Section 5.1 (Functions and conditional functions) from the document titled Warnings and error...

GitHub

The v0.18.2 release of explcheck https://github.com/Witiko/expltools/releases/tag/2026-03-13 speeds up the flow analysis by another order of magnitude, reducing runtimes on corner-case examples from months in v0.18.0 to a little over an hour.

There are still plenty of optimization opportunities for a motivated master's student https://github.com/Witiko/expltools/issues/156 but nothing that can't wait until after v1.0.0. 🚀

#LaTeX #expl3 #programming #TeXLaTeX #expltools #explcheck

Release 2026-03-13 · Witiko/expltools

expltools 2026-03-13 explcheck v0.18.2 Fixes This version of explcheck has fixed the following problems: Support c-type arguments in variable and constants declarations, definitions, and uses. (#...

GitHub

After the v0.18.0 release of explcheck, the first issues discovered by the flow analysis are now being reported by the linter, such as E505 (Calling an undefined function). https://github.com/Witiko/expltools/releases/tag/2026-03-04

Performance of the flow analysis has been a constant challenge: some artificial code examples would take months to analyze. https://github.com/Witiko/expltools/issues/156 Version 0.18.1 brought a hard-won speedup of up to two orders of magnitude, reducing those months to mere hours, though there is still significant room for further optimization. https://github.com/Witiko/expltools/releases/tag/2026-03-10 This might make a good topic for a master's thesis.

The plan is still to have a v1.0.0 release ready for TUG 2026, but the flow analysis is far from finished and the project is now almost half a year behind the original schedule. Development is active and healthy, just the initial time expectations were wildly optimistic, making the TUG 2026 deadline increasingly uncertain.

#LaTeX #expl3 #programming #TeXLaTeX

Release 2026-03-04 · Witiko/expltools

expltools 2026-03-04 explcheck v0.18.0 New features This version of explcheck has implemented the following new features: In human-readable output, mention that further issues may be reported aft...

GitHub
I’ve proposed adding built-in assertion statements to expl3. Curious what others think, would this be useful in your LaTeX code? https://github.com/latex3/latex3/issues/1840 #LaTeX #expl3 #TeX #programming
I am working on the flow analysis step. Despite the sardonic code comments, I am quite enjoying myself. https://github.com/witiko/expltools/pull/152 Code review is welcome. #LaTeX #expl3 #programming #TeXLaTeX
Just published a new explcheck devlog on flow graphs and how explcheck can use them to figure out which function definition each call refers to. More technical than usual, but hopefully it finds its audience. 🤞 https://witiko.github.io/Expl3-Linter-11.5/ #LaTeX #expl3 #programming #TeXLaTeX
Static analysis of expl3 programs (11½): Chunks, edges, flow graphs, confidence, and reaching definitions

Over the past two months, I released three new updates of expltools, the bundle that provides the explcheck static analyzer for the expl3 programming language. These updates include major improvements but did not yet advance the final stage of the pipeline, flow analysis, which I teased in the previous post. That’s because our work on flow analysis so far has been groundwork: figuring out how to adapt static-analysis techniques to expl3 before moving on to implementation. In this post, I outline the flow graph structure currently used to represent expl3 code and describe our adaptation of the reaching definitions algorithm for dynamically scoped languages like expl3.

Continuing with https://github.com/Witiko/expltools/pull/141, a tighter lower-bound estimate for explcheck's understanding of all expl3 code in TeX Live 2024 increases from 8% to 24% (~3% of all TeX code). This feels encouraging! #LaTeX #expl3 #programming #TeXLaTeX
Support flow analysis by Witiko · Pull Request #141 · Witiko/expltools

This PR makes the following changes: Recognize calls to known or defined functions and function variants as a new statement type FUNCTION_CALL distinct from OTHER_STATEMENT. Only mark expansion...

GitHub