|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
| Zoltan Ujhelyi
Registered: July 2015
although I am not Ábel, maybe even I could help you a little.
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.
|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
| Abel Hegedus
Registered: September 2015
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 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.
Powered by FUDForum
. Page generated in 0.03443 seconds