Table of Contents
Fetching ...

Localized RETE for Incremental Graph Queries with Nested Graph Conditions

Matthias Barkowsky, Holger Giese

TL;DR

An extension of the RETE approach is proposed that enables local, yet fully incremental execution of graph queries, while still guaranteeing completeness of results with respect to the relevant subgraph.

Abstract

The growing size of graph-based modeling artifacts in model-driven engineering calls for techniques that enable efficient execution of graph queries. Incremental approaches based on the RETE algorithm provide an adequate solution in many scenarios, but are generally designed to search for query results over the entire graph. However, in certain situations, a user may only be interested in query results for a subgraph, for instance when a developer is working on a large model of which only a part is loaded into their workspace. In this case, the global execution semantics can result in significant computational overhead. To mitigate the outlined shortcoming, in this article we propose an extension of the RETE approach that enables local, yet fully incremental execution of graph queries, while still guaranteeing completeness of results with respect to the relevant subgraph. We empirically evaluate the presented approach via experiments inspired by a scenario from software development and with queries and data from an independent social network benchmark. The experimental results indicate that the proposed technique can significantly improve performance regarding memory consumption and execution time in favorable cases, but may incur a noticeable overhead in unfavorable cases.

Localized RETE for Incremental Graph Queries with Nested Graph Conditions

TL;DR

An extension of the RETE approach is proposed that enables local, yet fully incremental execution of graph queries, while still guaranteeing completeness of results with respect to the relevant subgraph.

Abstract

The growing size of graph-based modeling artifacts in model-driven engineering calls for techniques that enable efficient execution of graph queries. Incremental approaches based on the RETE algorithm provide an adequate solution in many scenarios, but are generally designed to search for query results over the entire graph. However, in certain situations, a user may only be interested in query results for a subgraph, for instance when a developer is working on a large model of which only a part is loaded into their workspace. In this case, the global execution semantics can result in significant computational overhead. To mitigate the outlined shortcoming, in this article we propose an extension of the RETE approach that enables local, yet fully incremental execution of graph queries, while still guaranteeing completeness of results with respect to the relevant subgraph. We empirically evaluate the presented approach via experiments inspired by a scenario from software development and with queries and data from an independent social network benchmark. The experimental results indicate that the proposed technique can significantly improve performance regarding memory consumption and execution time in favorable cases, but may incur a noticeable overhead in unfavorable cases.

Paper Structure

This paper contains 28 sections, 47 theorems, 1 equation, 42 figures.

Key Result

Theorem 3.5

(Consistent configurations for RETE nets localized via $localize$ yield complete query results under the relevant subgraph.) Let $H$ be a graph, $H_p \subseteq H$, $(N, p)$ a well-formed RETE net, and $Q = query(p)$. Furthermore, let $\mathcal{C}^\Phi$ be a consistent configuration for the localize

Figures (42)

  • Figure 1: Example plain graph query (left) and corresponding RETE net (right)
  • Figure 2: RETE net $(N_{(Q, \psi)}, p_{(Q, \psi)})$ for an extended graph query $(Q, \psi)$ with nested graph condition of the form $\psi = \texttt{true}$ (top left), $\psi = \exists(a : Q \rightarrow Q', \psi')$ (top right), $\psi = \neg\psi'$ (bottom left), and $\psi = \psi_1 \wedge \psi_2$ (bottom right)
  • Figure 3: Example extended graph query $(Q, \exists (a : Q \rightarrow Q', \texttt{true}))$ (left) and corresponding RETE net (right)
  • Figure 4: LNS (left), RPS (center), and localized RETE net (right)
  • Figure 5: Localized RETE net for the example query in Figure \ref{['fig:example_query_and_rete']} with a consistent configuration for the host graph in Figure \ref{['fig:example_host_graph']}
  • ...and 37 more figures

Theorems & Definitions (107)

  • Definition 2.1
  • Definition 2.2
  • Definition 2.3
  • Definition 2.4
  • Definition 3.1
  • Definition 3.2
  • Definition 3.3
  • Definition 3.4
  • Theorem 3.5
  • proof
  • ...and 97 more