paperbot · PL 论文追踪

全部论文 待读 收藏

P2 MGQL: An Executable, Small-Step Semantics of GQL

MGQL:GQL 的可执行小步语义
OOPSLA 10(OOPSLA2)2026匹配度 1/10 · 该论文研究图查询语言 GQL 的形式语义与类型系统,属于形式化方法领域,但未涉及用户画像中的任何核心方向:PL→AI、AI→PL、浮点程序分析或贝叶斯程序分析,也未与 LLM/Agent 或工业落地案例产生关联。引用 1 inbox
Aditya Thimmaiah, Tong-Nong Lin, Milos Gligoric
crossref: 2026-10-02

AI 速览

一句话:提出 MGQL:GQL 只读子片段的首个机械化小步操作语义与可靠类型系统,连接 ISO 39075 标准与可执行实现。

ISO/IEC 39075(2024)标准化了属性图查询语言 GQL,但其语义以 600 多页自然语言给出,难以形式推理与忠实实现。已有形式化或省略 bag 语义、schema 与多图复合查询,或只覆盖模式匹配等片段。本文提出 MGQL:GQL 只读子片段的首个机械化小步操作语义,直接以 ISO 标准为依据;它建模多图属性图与混合边方向,支持量化路径/边、有向与无向匹配、标签表达式、模式列表及复合查询。语义配有 schema 感知类型系统,用闭合图 schema 细化变量类型、跟踪可空性,并用列表类型建模量化路径绑定。作者证明该类型系统可靠,保证良构查询结果符合声明 schema,从而连接 GQL 的非形式规范与可执行实现。

问题
GQL 的 ISO/IEC 39075 标准仅用 600 多页自然语言描述语义,现有形式化工作要么弱化 bag 语义、schema 与多图复合查询等语义复杂度,要么只形式化模式匹配等孤立语法片段,难以支撑形式推理和标准忠实实现。
方法
提出 MGQL,一个基于 ISO 标准的机械化小步操作语义,覆盖多图属性图、混合边方向、量化路径/边、标签表达式、模式列表和复合查询,并配套带 schema 感知的类型系统来细化变量类型、跟踪可空性并建模量化路径绑定。
评估
通过机器化证明类型系统可靠性(soundness),保证端到端良构查询的结果符合其声明 schema;摘要未报告实现性能或基准评估。
原文摘要(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.

链接与引用

DOI 原文 · arXiv ·

BibTeX
@article{paperbot12100,
  title = {MGQL: An Executable, Small-Step Semantics of GQL},
  author = {Aditya Thimmaiah and Tong-Nong Lin and Milos Gligoric},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {OOPSLA2},
  year = {2026},
  doi = {10.1145/3839459}
}