Context: 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. Contribution: To mitigate the outlined shortcoming, in this paper 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. Results: We empirically evaluate the presented approach via experiments inspired by a scenario from software development and 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 linear overhead in unfavorable cases.
翻译:背景:在模型驱动工程中,基于图的建模工件规模日益增长,亟需能够高效执行图查询的技术。基于RETE算法的增量方法在许多场景中提供了合适的解决方案,但通常设计为在整个图上搜索查询结果。然而在某些情况下,用户可能仅对子图的查询结果感兴趣,例如当开发人员处理大型模型而仅部分内容加载至其工作空间时。此时,全局执行语义可能导致显著的计算开销。贡献:为缓解上述不足,本文提出一种RETE方法的扩展方案,支持图查询的局部化且完全增量式执行,同时保证相关子图内结果的完备性。结果:我们通过受软件开发场景启发的实验和独立社交网络基准测试对所提方法进行实证评估。实验结果表明,在有利情况下,所提技术能显著改善内存消耗和执行时间的性能;但在不利情况下可能产生明显的线性开销。