~/talk

Lean Formalization of Extended Regular Expression Matching with Lookarounds

Talkat CPP 2024 · 2024-01-15..01-16· [software-architecture]
links:none on file
links:none on file
links:none on file
slides:none on file

Formalizes an extended regular‑expression matcher in Lean 4 formalization that models predicates with an effective Boolean algebra, represents positions as locations and spans, and implements a derivative‑based engine mirroring the .NET NonBacktracking approach. Proves correctness and completeness of a leftmost‑longest matching algorithm, gives a custom termination metric (lookaround depth, remaining string, regex size), handles intersection, complement and lookarounds, and notes linear-time guarantees only hold when lookaround length is bounded.

AI-written summary · about

  1. 0:00Introduction
  2. 0:26Formalizing extended regex
  3. 1:29Anchors in regex rules
  4. 2:53Derivatives and lookarounds
  5. 3:58Symbolic regex and Boolean algebra
  6. 5:42Extended symbolic regular expressions with lookarounds
  7. 6:44Reversal operation on regular expressions
  8. 7:28Lookaround context
  9. 8:09String traversal with zippers
  10. 9:13Match boundaries with spans
  11. 10:39Match semantics
  12. 13:18Classical regex derivatives
  13. 14:43Derivative in Lean
  14. 16:29Nullability and termination
  15. 17:56Nullable points
  16. 19:01Leftmost longest match
  17. 20:06Match helper functions
  18. 21:35Algorithm correctness
  19. 22:36Future work
  20. 24:06Questions and answers on algorithm complexity
  21. 25:34Lookaround restrictions
  22. 26:18Functional vs imperative
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.