Denotational Semantics and a Fast Interpreter for jq
Michael F\"arber

TL;DR
This paper introduces a formal denotational semantics for a subset of jq, along with a faster interpreter called jaq, enabling better reasoning and improved performance over the original jq tool.
Contribution
It provides the first formal semantics for jq and implements a novel, more efficient interpreter that outperforms jq on most benchmarks.
Findings
jaq is faster than jq on 10 out of 13 benchmarks
Provides a formal semantics for jq's subset
Enables better reasoning about jq programs
Abstract
jq is a widely used tool that provides a programming language to manipulate JSON data. However, its semantics are currently only specified by its implementation, making it difficult to reason about its behaviour. To this end, I provide a syntax and denotational semantics for a subset of the jq language. In particular, the semantics provide a new way to interpret updates. I implement an extended version of the semantics in a novel interpreter for the jq language called jaq. Although jaq uses a significantly simpler approach to execute jq programs than jq, jaq is faster than jq on ten out of thirteen benchmarks.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsScientific Computing and Data Management · Logic, programming, and type systems · Parallel Computing and Optimization Techniques
