Skip to main content
QUICK REVIEW

[Paper Review] Containment of Nested Regular Expressions

Juan L. Reutter|arXiv (Cornell University)|Apr 9, 2013
Advanced Database Systems and QueriesComputer Science13 references11 citations
TL;DR

This paper investigates the containment problem for Nested Regular Expressions (NREs), a formalism for querying graph databases with existential nesting and inverse edges. It establishes that NRE containment is decidable in PSPACE, matching the complexity of standard regular path query containment, by reducing the problem to automata-based analysis over semipaths with special markers for root and leaf nodes.

ABSTRACT

Nested regular expressions (NREs) have been proposed as a powerful formalism for querying RDFS graphs, but research in a more general graph database context has been scarce, and static analysis results are currently lacking. In this paper we investigate the problem of containment of NREs, and show that it can be solved in PSPACE, i.e., the same complexity as the problem of containment of regular expressions or regular path queries (RPQs).

Motivation & Objective

  • To address the lack of static analysis results for Nested Regular Expressions (NREs) in graph database contexts.
  • To formally define and analyze the containment problem for NREs, where one query is contained within another if it always returns a subset of results.
  • To show that NRE containment is decidable in PSPACE, matching the complexity of standard regular path query containment.
  • To develop a reduction technique using automata and marked semipaths to encode query semantics for containment checking.
  • To establish a theoretical foundation for query optimization and equivalence checking in graph databases using NREs.

Proposed method

  • The paper reduces the NRE containment problem to checking emptiness of an automaton language constructed from complementary automata for the two NREs.
  • It introduces a translation function that maps k-branch semipaths into labeled strings with special markers S and E for root and leaf nodes.
  • For each NRE, it constructs an automaton A_R^{S,E} that accepts the translation of all semipaths where the NRE matches a pair of nodes.
  • It combines the automata for R1, the complement of R2, and constraints for valid semipath structure into a single alternating 2-way finite automaton (A2FA).
  • The containment check reduces to verifying whether the language of the resulting A2FA is empty, which is decidable in PSPACE.
  • The construction relies on standard automata-theoretic techniques, including complementation and intersection of automata languages.

Experimental results

Research questions

  • RQ1Is the containment problem for Nested Regular Expressions decidable, and what is its computational complexity?
  • RQ2Can the containment of NREs be reduced to a problem solvable within PSPACE?
  • RQ3How can the semantics of NREs with nesting and inverse edges be encoded for formal analysis on graph structures?
  • RQ4What role do semipaths and marked node sequences play in characterizing NRE behavior?
  • RQ5Can the containment problem be reduced to emptiness checking of an automaton language constructed from complementary NRE automata?

Key findings

  • The containment problem for Nested Regular Expressions is decidable in PSPACE, matching the complexity of regular path query containment.
  • The paper provides a formal reduction of NRE containment to emptiness checking of an alternating 2-way finite automaton (A2FA).
  • The construction uses a translation of k-branch semipaths into labeled strings with special markers S and E to represent root and leaf nodes.
  • The method ensures that a pair of nodes (u,v) is in the result of an NRE R if and only if the translated semipath is accepted by the corresponding automaton A_R^{S,E}.
  • The algorithm correctly determines containment by checking whether the intersection of the automata for R1, the complement of R2, and structural constraints yields an empty language.
  • The proof establishes that the language emptiness check is both necessary and sufficient for containment, ensuring correctness of the decision procedure.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.