[Paper Review] MAR: A structure-based search engine for models
MAR is a generic, structure-based search engine for software models that indexes models using a 'bag of paths' representation to enable efficient, query-by-example retrieval. It supports over 50,000 models from diverse sources, achieves high precision in retrieval, and offers low-latency responses via HBase-backed indexing, with applications in meta-model classification and model repository search.
The availability of shared software models provides opportunities for reusing, adapting and learning from them. Public models are typically stored in a variety of locations, including model repositories, regular source code repositories, web pages, etc. To profit from them developers need effective search mechanisms to locate the models relevant for their tasks. However, to date, there has been little success in creating a generic and efficient search engine specially tailored to the modelling domain. In this paper we present MAR, a search engine for models. MAR is generic in the sense that it can index any type of model if its meta-model is known. MAR uses a query-by-example approach, that is, it uses example models as queries. The search takes the model structure into account using the notion of bag of paths, which encodes the structure of a model using paths between model elements and is a representation amenable for indexing. MAR is built over HBase using a specific design to deal with large repositories. Our benchmarks show that the engine is efficient and has fast response times in most cases. We have also evaluated the precision of the search engine by creating model mutants which simulate user queries. A REST API is available to perform queries and an Eclipse plug-in allows end users to connect to the search engine from model editors. We have currently indexed more than 50.000 models of different kinds, including Ecore meta-models, BPMN diagrams and UML models. MAR is available at http://mar-search.org.
Motivation & Objective
- Address the lack of generic, efficient search engines tailored for software models in the MDE (Model-Driven Engineering) ecosystem.
- Enable developers to search for reusable models using example models rather than keywords or complex queries.
- Support large-scale model repositories (over 50,000 models) with fast response times and high precision.
- Provide a scalable, extensible architecture that indexes models based on structural patterns rather than syntactic or textual features.
- Enable novel applications such as meta-model classification using the same indexing and retrieval infrastructure.
Proposed method
- Represent model structure using a 'bag of paths'—paths of configurable maximum length between model elements and attribute values—enabling structural indexing.
- Store indexed paths in an inverted index using HBase for efficient look-up and scalability across large repositories.
- Implement a query-by-example mechanism where users submit a model fragment; the system extracts its paths and matches them against the index.
- Rank results using a scoring function based on path overlap between query and indexed models.
- Build a REST API, web interface, and Eclipse plug-in to integrate MAR into modeling workflows and external tools.
- Use model mutation techniques to automatically generate synthetic queries for precision evaluation.
Experimental results
Research questions
- RQ1Can a structure-based search engine using path-based indexing achieve high precision and low latency in retrieving relevant models from large repositories?
- RQ2How effective is the query-by-example approach using model fragments compared to keyword or OCL-based queries in model retrieval?
- RQ3To what extent can MAR’s indexing and retrieval mechanism support generic, meta-model-agnostic model search across diverse modeling languages?
- RQ4Can MAR’s indexing infrastructure be reused for secondary tasks such as meta-model classification with competitive accuracy?
- RQ5How does MAR’s performance scale with increasing repository size and model diversity?
Key findings
- MAR indexed over 50,000 models from diverse sources, including Ecore, UML, and BPMN, making it one of the largest publicly available model repositories with search capabilities.
- The system achieved high precision in retrieval, with mutation-based evaluation showing strong performance on synthetic queries derived from real models.
- Response times were consistently fast across benchmarks, demonstrating practical usability in real-world modeling workflows.
- MAR’s path-based indexing enabled effective meta-model classification using a k-Nearest Neighbors approach, achieving precision comparable to state-of-the-art methods.
- The integration with Eclipse and REST API enables seamless use in modeling environments, enhancing developer productivity.
- The system outperforms prior search engines in scale, supporting orders of magnitude more indexed models than existing solutions like MOOGLE or WebML search engines.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.