Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » VIATRA2 » Question concerning my use case for pattern search via EMF-IncQuery(Not sure whether EMF-IncQuery can be used for my use case)
Question concerning my use case for pattern search via EMF-IncQuery [message #1064149] Mon, 17 June 2013 20:06 Go to next message
Alexander Fülleborn is currently offline Alexander FüllebornFriend
Messages: 106
Registered: April 2013
Senior Member
Hi Ábel,

in parallel to my research activities of documenting analysis and design patterns via VIATRA2 by a "pattern provider" (here I have asked you already quite often for help Very Happy ), I am trying to find out a means to efficiently retrieve these patterns from a pattern library afterwards by a "pattern consumer".

Hence, I have a requirement to store my patterns created with VIATRA2 in a pattern/UML model database and then be able to search for relations and other quite generic model semantics in this UML model/pattern data base. I have roughly read about your approach of EMF-IncQuery and now ask myself whether this is also the approach that fits to my requirements.

At the moment, I create my UML models via the model platform "MID Innovator". Then, I export these models in *.uml format files and import them to the VIATRA2 model space where I do some transformations that result in patterns.

Now, the next logical step would be to store these patterns in a database/repository. My question to you is: Would it be possible to use the model space as a data base/repository for the models/patterns and directly access this database via EMF-IncQuery? Or would it be better (or even only possible) to export them from a model space to another UML modeling environment? Which environment would you recommend? I guess that I have no support for EMF-IncQuery (or other techniques) e.g. other tools outside Eclipse - like MID Innovator-, do I?

It would be great if you could tell me your "point of research view" about whether your approach fits to my requirements? Or do you have better proposals how to set up a senseful tool chain?

Thanks a lot in advance and kind regards, Alex
Re: Question concerning my use case for pattern search via EMF-IncQuery [message #1064156 is a reply to message #1064149] Mon, 17 June 2013 20:58 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 222
Registered: July 2009
Senior Member
Hi Alexander,

although I am not Ábel, maybe even I could help you a little. Smile

First of all, EMF-IncQuery and VIATRA2 assume very different internal model storage mechanism, namely EMF for IncQuery and VPM for VIATRA2, so directly applying IncQuery over the VIATRA2 model space is not working (and is neither planned).

However, if you can express your patterns in the transformation language of VIATRA2, they can be evaluated programmatically - for details see the console commands developed for debugging graph patterns in our public SVN: https://viatra.inf.mit.bme.hu/svn/experimental/trunk/xformdev/org.eclipse.viatra2.gui.patterns/src/org/eclipse/viatra2/gui/patterns/consolecommands/PrintMatchSet.java

There are some issues with this approach, most importantly that the command implementation only shows how to use the incremental pattern matcher, neither the localsearch nor the hybrid engine is available (at least on the queried patterns) - for that, a different implementation would be required

On the other hand, you could write an exporter for almost all possible formats (maybe the UML exporter might be some use), so you could rely on your existing techniques (if there are any).

Alltogether, if you have an already existing way to handle the collected data, I would suggest to export the data from the VPM model to allow reuse; however if you plan to implement it right now, it might make more sense to do it over the VIATRA2 implementation.

Cheers,
Zoltán
Re: Question concerning my use case for pattern search via EMF-IncQuery [message #1064158 is a reply to message #1064149] Mon, 17 June 2013 21:17 Go to previous messageGo to next message
Abel Hegedus is currently offline Abel HegedusFriend
Messages: 105
Registered: July 2009
Senior Member
Hi Alex,

TL;DR Yes, if the result of your transformation is an EMF (UML) model, you can use EMF-IncQuery to evaluate model queries over that model.

I spent so much with writing my reply, that Zoltán also replied Very Happy Still, here are my thoughts.

-----------------

first of all, the EMF-IncQuery project (http://www.eclipse.org/incquery) is developed by the same group that developed VIATRA2.

In essence, we took the pattern language of VTCL and applied it for EMF models with the same incremental pattern matcher engine that works with VPM models.

Graph patterns (or model queries) written in EMF-IncQuery can be evaluated over EMF models directly, without additional importing or programming.

So, if the result of your transformation is a UML model, you could export it into an EMF model (VIATRA2 has an experimental EMF model exporter) and query those models using patterns written in EMF-IncQuery using the concepts of the UML Ecore model.

This is assuming that you want to use the resulting model as an instance model to be queried. If you want create "patterns" that are themselves evaluated over a different EMF model. That is a bit more difficult, but doable.

Currently, EMF-IncQuery requires OSGi and a number of plugins, but you can use it as a small application that is accessable by console commands. For details on headless execution, see http://wiki.eclipse.org/EMFIncQuery/UserDocumentation/HeadlessExecution
You could use this to integrate with another tool, of course, there could be more sophisticated options.
Re: Question concerning my use case for pattern search via EMF-IncQuery [message #1064358 is a reply to message #1064158] Tue, 18 June 2013 20:54 Go to previous message
Alexander Fülleborn is currently offline Alexander FüllebornFriend
Messages: 106
Registered: April 2013
Senior Member
Hi Ábel, hi Zoltán,

thank you for this "double pack care" Wink). Great answers. I will check the best way to proceed - your approaches sound very promising.

Have a nice time - Alex
Previous Topic:Help needed for implementing entity match pattern
Next Topic:Error with copy rule
Goto Forum:
  


Current Time: Sun Dec 21 01:09:27 GMT 2014

Powered by FUDForum. Page generated in 0.01581 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software