Demonstration of Composable SPARQL Parsing and Query Execution with Traqula and Comunica

Abstract

Linked Data and SPARQL are becoming increasingly diverse, with engines supporting different dialects and extensions. With SPARQL 1.2 nearing completion and its planned maintenance mode, this diversity is expected to grow. There is a growing need for language tools that can handle multiple versions and dialects in a unified way. In response, we introduced Traqula, a modular framework for parsing, generating, and transforming queries, allowing components to be created and adapted incrementally. This paper showcases a web client that brings together Traqula and the modular Comunica query engine, enabling users to experiment with queries across multiple parser and engine variants while interactively visualizing their configuration, illustrating the power of modularity for both language tools and query engines.

Video: https:/​/​youtu.be/7VFJGvxbRsI

Online Demo: https:/​/​compose-parser-engine.demo.jitsedesmet.be/

Canonical Version: https:/​/​2026-eswc-demo.jitsedesmet.be/

Introduction

Linked Data on the Web exists in diverse forms [1, 2, 3], enabling the RDF model to support varied environments and querying algorithms across single or multiple sources. The modular query engine Comunica [4] was introduced to unify querying over these different RDF interfaces while supporting multiple data access and processing algorithms. It’s modular architecture has proven effective, enabling sustainable maintenance of a SPARQL 1.1 [5] query engine that supports many dataset types and execution strategies. However, Comunica has so far been limited to processing basic SPARQL 1.1 queries and –through conversion step– a subset of GraphQL [6].

This limitation was not arbitrary, but technical. The software responsible for parsing and generating SPARQL queries—transforming query strings to and from SPARQL algebra—was implemented as a large monolithic component. Extending this component would require either: 1. maintaining a long-term fork 2. introducing language extensions that change the behaviour of the upstream parser beyond SPARQL 1.1, or 3. preserving backward compatibility through extensive conditional logic, ultimately harming maintainability.

At the same time, SPARQL itself has evolved heterogeneously. Different engines implement their own dialects [7, 8] and extensions: Virtuoso supports full text search [9], Jena supports constructing quads [10], and oxigraph supports the built-in Adjust [11, 12]. This diversity is expected to increase further with the emergence of SPARQL 1.2 [13] and its planned maintenance mode [14].

To address these challenges, we developed Traqula [15], a toolkit for parsing, generating, and transforming query languages. As described in our accepted ESWC 2026 resource paper [15], Traqula enables incremental modification of existing SPARQL 1.1 and SPARQL 1.2 parsing setups while remaining generic enough to support future query languages such as GQL [16], SHACL compact [17], or SHACL rules [18].

In this demo paper, we present an interactive showcase of the Traqula framework and its benefits. We developed a web client that dynamically constructs parsers, generators, and transformers using Traqula, and dynamically constructs a Comunica query engine also based on the user’s choice. Starting from a SPARQL 1.1 baseline, users can enable or disable language features, after which the system adapts both the parsing configuration and query engine accordingly. The configured setup can then be used to query remote data sources through an integrated query interface. While this demonstration highlights a single use case in which Traqula excels, interested readers are encouraged to consult our Traqula paper [15] and explore the framework’s documentation: https:/​/​github.com/comunica/traqula#documentation

Traqula

Traqula [15] is a modular framework for query parsing, generation and transformation. It enables the construction of parsers, generators, and query transformers by starting from an existing component and incrementally adapting it to create a new variant. This composability is achieved by modeling grammar rules and their counterparts as first-class entities, combined with a builder-based approach that supports structured construction and modification.

Parser and generator rules, as well as transformation steps, are represented as simple objects defined by a name and an implementation. At runtime, when a rule invokes another rule, it performs a name-based lookup to resolve the corresponding subrule. This design allows rules to be added, replaced, or removed without modifying the surrounding system, enabling lightweight customization of parsing, generation, and transformation pipelines.

Traqula currently supports parsing, transforming, and generating SPARQL 1.1, SPARQL 1.1 extended with ADJUST, and SPARQL 1.2. Thanks to its modular architecture, downstream projects can build their own language variants by extending these existing components. Within Comunica, for example, Traqula has been used to introduce an open algebraic model that allows new algebra operations to be added without modifying the core engine.

Demonstration

In this demonstration, users can interactively configure both the query parsing setup and the query engine they use. Starting from a SPARQL 1.1 baseline, users may extend the configuration with additional features: 1. SPARQL 1.2 functionality, 2. the built-in ADJUST function, and 3. the lateral operation.

Based on the selected options, the system dynamically generates and displays the corresponding configuration files. For Traqula, this includes the builders used to construct the lexer, parser, generator, and the toAst and fromAst transformers, allowing users to observe how the parsing pipeline is adapted. For the query engine, we expose the relevant configuration files used by Comunica through its dependency injection framework, Components.js [19].

After configuring both Traqula and Comunica, users can execute federated queries through an integrated web interface using the selected setup. During query execution, new functionalities emerge as users experiment with different parser and engine configurations, showcasing capabilities that are enabled when the components are properly aligned. This behavior highlights the benefits of composability, as both the parsing software and the engine work together seamlessly when their configurations match.

A screenshot of the demonstration webUI

Fig. 1: Screenshot of the web interface demonstrating Traqula and it’s integration in Comunica.

Acknowledgements. Jitse De Smet is a predoctoral fellow of the Research Foundation – Flanders (FWO) (1SB8525N). Ruben Taelman is a postdoctoral fellow of the Research Foundation – Flanders (FWO) (1202124N).


Disclosure of Interests. The authors are a subset of the developers of both Traqula and Comunica demonstrated in this paper.