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.
翻译:模型驱动工程中基于图的建模构件规模日益增长,亟需能够高效执行图查询的技术。基于RETE算法的增量方法在许多场景中提供了合适的解决方案,但通常设计用于在整个图上搜索查询结果。然而在某些情况下,用户可能仅对子图的查询结果感兴趣,例如当开发人员处理大型模型而仅部分模型加载至其工作空间时。此时全局执行语义可能导致显著的计算开销。为缓解上述缺陷,本文提出一种RETE方法的扩展方案,支持图查询的局部化完全增量执行,同时保证相关子图内结果的完备性。我们通过软件开发展景启发的实验以及独立社交网络基准的查询与数据,对所提方法进行实证评估。实验结果表明,所提技术在有利情况下能显著改善内存消耗与执行时间的性能,但在不利情况下可能产生明显开销。