Memoized Derivatives for Fast Filtering and Schema Validation of Semi-Structured Data

We present a high-performance filtering and schema-validation algorithm based on Brzozowski’s derivatives, extended to regular hedge grammars for semi-structured data. Our algorithm inherits the expressiveness of regular hedge grammars to support a wide range of schema languages and serialization formats, such as JSON Schema, RELAX NG for XML, and Protocol Buffers. High performance is achieved by refactoring the derivative algorithm to make it more amenable to memoization of hedges. We verify in Lean that our memoization technique is correct: our memoized filtering and validation algorithm is equivalent to the denotational semantics of regular hedge grammars. This is the first proof of correctness in an interactive theorem prover of a derivative algorithm for regular hedge grammars or schema languages. We combine the memoization technique with the fusion of the parsing and derivative algorithms to avoid creating intermediate parsing data structures. Benchmarking is done on an implementation in Go against several other JSON Schema implementations. We end up with the fastest library in the filtering use case when considering median latency, providing evidence that derivatives are a competitive approach for validation, even for semi-structured data.

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-07-02
DOI
https://doi.org/10.5281/zenodo.21134537
Primary Topic
Advanced Database Systems and Queries
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Memoized Derivatives for Fast Filtering and Schema Validation of Semi-Structured Data

Brink van der Merwe, Walter Schulze, Christiaan Maasdorp, Paul Cadman
Zenodo (CERN European Organization for Nuclear Research)
Advanced Database Systems and Queries
preprint

Memoized Derivatives for Fast Filtering and Schema Validation of Semi-Structured Data

Brink van der Merwe, Walter Schulze, Christiaan Maasdorp, Paul Cadman
preprint en

Abstract

We present a high-performance filtering and schema-validation algorithm based on Brzozowski’s derivatives, extended to regular hedge grammars for semi-structured data. Our algorithm inherits the expressiveness of regular hedge grammars to support a wide range of schema languages and serialization formats, such as JSON Schema, RELAX NG for XML, and Protocol Buffers. High performance is achieved by refactoring the derivative algorithm to make it more amenable to memoization of hedges. We verify in Lean that our memoization technique is correct: our memoized filtering and validation algorithm is equivalent to the denotational semantics of regular hedge grammars. This is the first proof of correctness in an interactive theorem prover of a derivative algorithm for regular hedge grammars or schema languages. We combine the memoization technique with the fusion of the parsing and derivative algorithms to avoid creating intermediate parsing data structures. Benchmarking is done on an implementation in Go against several other JSON Schema implementations. We end up with the fastest library in the filtering use case when considering median latency, providing evidence that derivatives are a competitive approach for validation, even for semi-structured data.

Zenodo (CERN European Organization for Nuclear Research)
Stellenbosch University (ZA)
Advanced Database Systems and Queries
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.

Memoized Derivatives for Fast Filtering and Schema Validation of Semi-Structured Data — Brink van der Merwe, Walter Schulze, et al. · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS