Rete Network Slicing for Model Queries

Declarative model queries captured by graph patterns are frequently used in model driven engineering tools for the validation of well-formedness constraint or the calculation of various model metrics. However, their high level nature might make it hard to

  • PDF / 2,013,020 Bytes
  • 16 Pages / 439.37 x 666.142 pts Page_size
  • 71 Downloads / 203 Views

DOWNLOAD

REPORT


partment of Measurement and Information Systems, MTA-BME Lend¨ ulet Research Group on Cyber-Physical Systems, Budapest University of Technology and Economics, Magyar Tud´ osok Krt. 2, Budapest 1117, Hungary {bergmann,varro}@mit.bme.hu 2 IncQuery Labs Ltd., Bocskai u ´ t 77-79, Budapest 1113, Hungary [email protected] Abstract. Declarative model queries captured by graph patterns are frequently used in model driven engineering tools for the validation of well-formedness constraint or the calculation of various model metrics. However, their high level nature might make it hard to understand all corner cases of complex queries. When debugging erroneous patterns, a common task is to identify which conditions or constraints of a query caused some model elements to appear in the results. Slicing techniques in traditional programming environments are used to calculate similar dependencies between program statements. Here, we introduce a slicing approach for model queries based on Rete networks, a cache structure applied for the incremental evaluation of model queries. The proposed method reuses the structural information encoded in the Rete networks to calculate and present a trace of operations resulting in some model elements to appear in the result set. The approach is illustrated on a running example of validating well-formedness over UML state machine models using graph patterns as a model query formalism. Keywords: Program slicing

1

· Model queries · Graph patterns

Introduction

Modern industrial and open source modeling tools frequently rely upon various services built on top of incremental query evaluation techniques [1,2] for efficient revalidation of well-formedness constraints, recalculation of view models, re-execution of code generators or maintenance of traceability links [3,4]. EMF-IncQuery [3] is an open source Eclipse project which offers a declarative graph query language [5] for capturing queries and a scalable query engine for incremental query evaluation using the Rete algorithm [6]. Industrial domain-specific languages and tools (e.g. in the automotive, avionics or telecommunications domain) necessitate the development of large number of complex, interrelated queries, which turns out to be an error prone task in industrial practice. Some constraints may accidentally be omitted, other constraints may be added to a query unintentionally, while patterns may be composed using a wrong order of parameters. While the EMF-IncQuery framework c Springer International Publishing Switzerland 2016  R. Echahed and M. Minas (Eds.): ICGT 2016, LNCS 9761, pp. 137–152, 2016. DOI: 10.1007/978-3-319-40530-8 9

138

Z. Ujhelyi et al.

contains a type checker and various well-formedness constraints are also checked, such static checks still do not guarantee that query specifications are free of flaws, thus runtime debugging of queries need to be carried out in practice. Unfortunately, the declarative nature of query languages makes debugging of query specifications a challenging task. The order of clauses in a q