Answering Constraint Path Queries over Graphs

📅 2025-12-01
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
This work addresses the inefficiency of path queries on property graphs with equality and Linear Real Arithmetic (LRA) constraints. To this end, we propose an extension of Regular Path Queries (RPQs) that natively supports SMT-constrained path patterns. Our method jointly models path matching and SMT solving, introduces a macro-state optimization technique to compress constraint propagation states, and tightly integrates a high-performance SMT solver with a property graph query engine. The implementation is built upon MillenniumDB and adheres to the GQL standard. Experimental evaluation on real-world datasets demonstrates that our approach significantly accelerates complex constrained path queries—achieving speedups of one to two orders of magnitude over baseline methods—and enables, for the first time, efficient and precise evaluation of LRA-constrained path queries over large-scale property graphs.

Technology Category

Application Category

📝 Abstract
Constraints are powerful declarative constructs that allow users to conveniently restrict variable values that potentially range over an infinite domain. In this paper, we propose a constraint path query language over property graphs, which extends Regular Path Queries (RPQs) with SMT constraints on data attributes in the form of equality constraints and Linear Real Arithmetic (LRA) constraints. We provide efficient algorithms for evaluating such path queries over property graphs, which exploits optimization of macro-states (among others, using theory-specific techniques). In particular, we demonstrate how such an algorithm may effectively utilize highly optimized SMT solvers for resolving such constraints over paths. We implement our algorithm in MillenniumDB, an open-source graph engine supporting property graph queries and GQL. Our extensive empirical evaluation in a real-world setting demonstrates the viability of our approach.
Problem

Research questions and friction points this paper is trying to address.

Extends Regular Path Queries with SMT constraints on graph data attributes
Proposes efficient algorithms for evaluating constraint path queries over property graphs
Demonstrates integration of optimized SMT solvers to resolve constraints over paths
Innovation

Methods, ideas, or system contributions that make the work stand out.

Extends RPQs with SMT constraints on data attributes
Uses macro-state optimization and theory-specific techniques
Integrates highly optimized SMT solvers for constraint resolution