ICFP 2024
Mon 2 - Sat 7 September 2024 Milan, Italy
Thu 5 Sep 2024 16:06 - 16:24 at Green 1-2-3 - Distributed Systems, Concurrency Chair(s): Michael Sperber

We present an executable, proven-safe, faithful, and future-proof Coq mechanization of JavaScript regular expression (regex) matching, as specified by the latest published edition of ECMA-262 section 22.2. This is, to our knowledge, the first time that an industrial-strength regex language has been faithfully mechanized in an interactive theorem prover. We highlight interesting challenges that arose in the process (including issues of encoding, corner cases, and executability), and we document the steps that we took to ensure that the result is straightforwardly auditable and that our understanding of the specification aligns with existing implementations.

We demonstrate the usability and versatility of the mechanization through a broad collection of analyses, case studies, and experiments: we prove that JavaScript regex matching always terminates and is safe (no assertion failures); we identify subtle corner cases that led to mistakes in previous publications; we verify an optimization extracted from a state-of-the-art regex engine; we show that some classic properties described in automata textbooks and used in derivatives-based matchers do not hold in JavaScript regexes; and we demonstrate that the cost of updating the mechanization to account for changes in the original specification is reasonably low.

Our mechanization can be extracted to OCaml and JavaScript and linked with Unicode libraries to produce an executable regex engine that passes the relevant parts of the official Test262 conformance test suite.

Thu 5 Sep

Displayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

15:30 - 17:00
Distributed Systems, ConcurrencyICFP Papers and Events / JFP First Papers at Green 1-2-3
Chair(s): Michael Sperber Active Group GmbH
15:30
18m
Talk
The Functional, the Imperative, and the Sudoku: Getting Good, Bad, and Ugly to Get Along (Functional Pearl)Functional Pearl
ICFP Papers and Events
Manuel Serrano Inria; Université Côte d’Azur, Robert Bruce Findler Northwestern University
DOI
15:48
18m
Talk
Blame-Correct Support for Receiver Properties in Recursively-Structured Actor Contracts
ICFP Papers and Events
Bram Vandenbogaerde Vrije Universiteit Brussel, Quentin Stiévenart Université du Québec à Montréal, Coen De Roover Vrije Universiteit Brussel
DOI Pre-print
16:06
18m
Talk
A Coq Mechanization of JavaScript Regular Expression Semantics
ICFP Papers and Events
Link to publication DOI Pre-print
16:24
18m
Talk
Alice or Bob?: Process polymorphism in choreographiesJFP First Paper
JFP First Papers
Eva Graversen University of Southern Denmark, Andrew K. Hirsch University at Buffalo, SUNY, Fabrizio Montesi University of Southern Denmark
DOI
16:42
18m
Talk
Functional Programming in Financial Markets (Experience Report)Experience Report
ICFP Papers and Events
Atze Dijkstra Standard Chartered Bank, José Pedro Magalhães Standard Chartered Bank, Pierre Néron Standard Chartered Bank
DOI Pre-print