Run-Based Semantics for RPQs - Archive ouverte HAL Access content directly
Conference Papers Year : 2023

Run-Based Semantics for RPQs

Claire David
Nadime Francis
Victor Marsault


RPQs (regular path queries) are an important building block of most query languages for graph databases. They are generally evaluated under homomorphism semantics; in particular only the endpoints of the matched walks are returned. However, practical applications often need the full matched walks to compute aggregate values. In those cases, homomorphism semantics are not suitable since the number of matched walks can be infinite. Hence, graph-database engines adapt the semantics of RPQs, often neglecting theoretical red flags. For instance, the popular query language Cypher uses trail semantics, which ensures the result to be finite at the cost of making computational problems intractable. We propose a new kind of semantics for RPQs, including in particular simple-run and binding-trail semantics, as a candidate to reconcile theoretical considerations with practical aspirations. Both ensure the output to be finite in a way that is compatible with homomorphism semantics: projection on endpoints coincides with homomorphism semantics. Hence, testing the emptiness of result is tractable, and known methods readily apply. Moreover, simple-run and binding-trail semantics support bag semantics, and enumeration of the bag of results is tractable.
Fichier principal
Vignette du fichier
Run_based_semantics_for_RPQs.pdf (690.83 Ko) Télécharger le fichier
Origin : Files produced by the author(s)

Dates and versions

hal-03882187 , version 1 (22-09-2023)



Claire David, Nadime Francis, Victor Marsault. Run-Based Semantics for RPQs. 20th International Conference on Principles of Knowledge Representation and Reasoning (KR'23), Sep 2023, Rhodes, Greece. pp.178-187, ⟨10.24963/kr.2023/18⟩. ⟨hal-03882187⟩
58 View
19 Download



Gmail Facebook X LinkedIn More