Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its Applications

We present the first mechanized, succinct, practical, complete, and proven-faithful semantics for a modern regular expression language with backtracking semantics. We ensure its faithfulness by proving it equivalent to a preexisting line-by-line embedding of the official ECMAScript specification of JavaScript regular expressions. We demonstrate its practicality by presenting two real-world applications. First, a new notion of contextual equivalence for modern regular expressions, which we use to prove or disprove rewrites drawn from previous work. Second, the first formal proof of the PikeVM algorithm used in many real-world engines. In contrast with the specification and other formalization work, our semantics captures not only the top-priority match, but a full backtracking tree recording all possible matches and their respective priority. All our definitions and results have been mechanized in the Rocq proof assistant.

Authors

Institutions

Publication Details

Journal
Proceedings of the ACM on Programming Languages
Published
2026-01-08
DOI
https://doi.org/10.1145/3776710
Primary Topic
Logic, programming, and type systems
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its Applications

Clément Pit-Claudel, Aurèle Barrière, Victor Deng
Proceedings of the ACM on Programming Languages
Logic, programming, and type systems
article

Formal Verification for JavaScript Regular Expressions: A Proven Mechanized Semantics and Its Applications

Clément Pit-Claudel, Aurèle Barrière, Victor Deng
article en

Abstract

We present the first mechanized, succinct, practical, complete, and proven-faithful semantics for a modern regular expression language with backtracking semantics. We ensure its faithfulness by proving it equivalent to a preexisting line-by-line embedding of the official ECMAScript specification of JavaScript regular expressions. We demonstrate its practicality by presenting two real-world applications. First, a new notion of contextual equivalence for modern regular expressions, which we use to prove or disprove rewrites drawn from previous work. Second, the first formal proof of the PikeVM algorithm used in many real-world engines. In contrast with the specification and other formalization work, our semantics captures not only the top-priority match, but a full backtracking tree recording all possible matches and their respective priority. All our definitions and results have been mechanized in the Rocq proof assistant.

Proceedings of the ACM on Programming LanguagesVol. 10(POPL)
Centre National de la Recherche Scientifique (FR), École Normale Supérieure - PSL (FR), École Normale Supérieure (BI), École Polytechnique Fédérale de Lausanne (CH)
Openalex Percentile: Top 93%
Logic, programming, and type systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.