Skip to content
#small language model Open access

MGQL: An Executable, Small-Step Semantics of GQL

Aug 2026 · Proceedings of the ACM on Programming Languages · Vol 10, pp. 348 - 374 · 1 citation · 31 references
Computer Science

TL;DR

MGQL is presented, the first mechanized, small-step operational semantics for a substantial read-only fragment of GQL that is grounded in the ISO/IEC 39075 standard, and it is proved that the type system is sound, ensuring an end-to-end guarantee of well-formed queries yielding results that conform to their declared schemas.

Abstract

Research and development of graph query languages has been gaining traction with the increase in popularity of graph databases, specifically due to the flexible schema and other rich semantic offerings of the latter’s most common underlying data model: the property graph. This has culminated in the standardization of the ISO Graph Query Language (GQL) as ISO/IEC 39075 in 2024, the first international standard for property graph- based graph query languages. However, ISO/IEC 39075 codifies its semantics informally across 600+ pages of prose, making it difficult to formally reason about the standard or for a standard-faithful implementation. Existing formalizations are not adequate because they either: (1) significantly reduce the semantic complexity by omitting bag semantics, schemas, and composite queries on multiple graphs; (2) or significantly reduce the syntactic complexity by only considering isolated fragments such as pattern-matching, leaving the full query pipeline unformalized. Yet it is these semantic–syntactic features that make formalizing GQL non-trivial. We present MGQL, the first mechanized, small-step operational semantics for a substantial read-only fragment of GQL that is grounded in the ISO/IEC 39075 standard. Our formalization models multi-graph property graphs with mixed edge directionality and supports a large fraction of GQL pattern constructs: quantified paths and edges, directional and undirected matching, label expressions, pattern lists, and composite queries. The semantics is supported by a schema-aware type system that refines variable types via closed-graph schemas, tracks nullability, supports multiple composite query operators, and models quantified-path bindings with list types. We prove that our type system is sound, ensuring an end-to-end guarantee of well-formed queries yielding results that conform to their declared schemas. MGQL provides the first bridge between GQL’s informal specification and a mechanized implementation, enabling formal reasoning about correctness.

Read PDF

Similar papers

Preprint Aug 2026

Rewriting Ontology-Mediated Property Graph Queries into GQL

Preliminary experiments with the proof-of-concept prototype suggest that querying graph data with ontological knowledge may finally be within reach.

Bianca Löhnert, N. Augsten, Cem Okulmus et al. · 0 citations
Preprint Aug 2026

Rewrite Once, Validate Anywhere: Producing OWL-Aware SHACL Constraints (Extended Version)

This work constructs a rewriting which takes as input both shapes and an OWL EL$^-$ ontology -- a fragment of OWL EL restricting the usage of existential restrictions -- and produces SHACL constraints, providing a powerful tool which simplifies combining reasoning with validation.

Anouk Oudshoorn, Piotr Gorczyca, D. Arndt · 0 citations
Preprint Aug 2026

Towards Researcher Agents for Knowledge-Graph Question Answering

This work presents an agentic text-to-SPARQL system that goes one step beyond static tool-using agents: a researcher agent that, after each round of inference on a validation set, proposes and tests changes to its own prompts, rules, and tool-orchestration code.

Tommaso Soru, Abdulsobur Oyewale · 0 citations
Preprint Aug 2026

A General Sufficient Condition for Rewriting Horn-ALCHI Atomic Queries into GQL

This work introduces DL automata, a novel formalism that captures the semantics of such OMQs via runs over fact sets via runs over fact sets, and identifies a large class of DL automata that can be rewritten into unions of conjunctive two-way regular path queries (UC2RPQs), a central fragment of GQL.

David Carral, Calixte Gruson, Quentin Manière · 0 citations

Related blog posts

Microsoft Research Blog Oct 12, 2026

Simulating student learning for better AI tutoring

StudentSim is a research system for evaluating and improving AI tutoring tools before they are tested with learners. It models how individuals may engage with tutors, giving feedback to improve tutor performance across subjects like chess, writing, and mathematics. The post Simulating student learning for better AI tutoring appeared first on Microsoft Research.

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.