Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF query model
EMF query model [message #1066012] Fri, 28 June 2013 20:48 Go to next message
Tobias Jenkner is currently offline Tobias JenknerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi everybody,

Is there something like a EMF model to represent queries on other EMF models?

As far as I have understood there exist several possibilities to perform queries on EMF models such as
- EMF query
- OCL
- EMF inc-query
- ... ?

But for all of these possibilities the actual queries have to be defined in an implementation specific format, right? A format / DSL / EMF model to define these queries independently of the query implementation does not exist so far, does it?

Thanks in advance for your thoughts and ideas,
Tobias.
Re: EMF query model [message #1066025 is a reply to message #1066012] Sat, 29 June 2013 05:57 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Tobias,

Comments below.

On 28/06/2013 10:48 PM, Tobias Jenkner wrote:
> Hi everybody,
> Is there something like a EMF model to represent queries on other EMF
> models?
>
> As far as I have understood there exist several possibilities to
> perform queries on EMF models such as - EMF query
> - OCL
> - EMF inc-query
The EMF Query2 project was terminated, and the EMF Query project is not
so useful
> - ... ?
>
> But for all of these possibilities the actual queries have to be
> defined in an implementation specific format, right?
That will always be the case, even if there's only a model, not a format...
> A format / DSL / EMF model to define these queries independently of
> the query implementation does not exist so far, does it?
You mean a something with a pluggable query engine under the covers?
No, there isn't such a thing that I know of...
>
> Thanks in advance for your thoughts and ideas, Tobias.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF query model [message #1066111 is a reply to message #1066025] Sun, 30 June 2013 20:18 Go to previous messageGo to next message
Tobias Jenkner is currently offline Tobias JenknerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi Ed,

thanks for your prompt reply. Additional thoughts below:

>> But for all of these possibilities the actual queries have to be
>> defined in an implementation specific format, right?
> That will always be the case, even if there's only a model, not a format...
Sure, I thought of a model from that the code for the different query implementations can be generated.

>> A format / DSL / EMF model to define these queries independently of
>> the query implementation does not exist so far, does it?
> You mean a something with a pluggable query engine under the covers?
> No, there isn't such a thing that I know of...
Yes, something like pluggable through the choice of a generator for the specific query engine.

Based on this query model there could be a common editor (or editing framework) for queries. Just like there is the standard editor for EMF models wouldn't it be nice to have a common editor for queries targeting an EMF model, for example with auto completion based on this target model, offering the attributes and relations of the target classes? Or does something like this already exist?

What do you think?
Tobias.
Re: EMF query model [message #1066172 is a reply to message #1066111] Mon, 01 July 2013 11:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Your comments seem to be liitle different from, wouldn't it be great if
we all spoke English, or Esperanto?

The different query languages have their virtues and tools that support
them. You could create yet another one and try to persuade the world
that it is better than OCL, SQL, Xpath, ...

[You can use the Xtext OCL Console to edit OCL queries against models
with many of the good features of Xtext editors.]

Regards

Ed Willink


On 30/06/2013 21:18, Tobias Jenkner wrote:
> Hi Ed,
> thanks for your prompt reply. Additional thoughts below:
>>> But for all of these possibilities the actual queries have to be
>>> defined in an implementation specific format, right?
>> That will always be the case, even if there's only a model, not a
>> format...
> Sure, I thought of a model from that the code for the different query
> implementations can be generated.
>
>>> A format / DSL / EMF model to define these queries independently of
>>> the query implementation does not exist so far, does it?
>> You mean a something with a pluggable query engine under the covers?
>> No, there isn't such a thing that I know of...
> Yes, something like pluggable through the choice of a generator for
> the specific query engine.
>
> Based on this query model there could be a common editor (or editing
> framework) for queries. Just like there is the standard editor for EMF
> models wouldn't it be nice to have a common editor for queries
> targeting an EMF model, for example with auto completion based on this
> target model, offering the attributes and relations of the target
> classes? Or does something like this already exist?
>
> What do you think?
> Tobias.
Re: EMF query model [message #1066302 is a reply to message #1066111] Tue, 02 July 2013 05:32 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Tobias,

Comments below.

On 30/06/2013 10:18 PM, Tobias Jenkner wrote:
> Hi Ed,
> thanks for your prompt reply. Additional thoughts below:
>>> But for all of these possibilities the actual queries have to be
>>> defined in an implementation specific format, right?
>> That will always be the case, even if there's only a model, not a
>> format...
> Sure, I thought of a model from that the code for the different query
> implementations can be generated.
Yes, that's certainly a possibility, but not something already available.
>
>>> A format / DSL / EMF model to define these queries independently of
>>> the query implementation does not exist so far, does it?
>> You mean a something with a pluggable query engine under the covers?
>> No, there isn't such a thing that I know of...
> Yes, something like pluggable through the choice of a generator for
> the specific query engine.
Anything you can generate you can also generally interpret...
>
> Based on this query model there could be a common editor (or editing
> framework) for queries.
Yes, though any such approach will generally constrain how one specifies
a query or be so general that it's so general purpose as to become a
programming language...
> Just like there is the standard editor for EMF models wouldn't it be
> nice to have a common editor for queries targeting an EMF model, for
> example with auto completion based on this target model, offering the
> attributes and relations of the target classes?
Both OCL and IncQuery support something of that nature via the
Xtext-based editors...
> Or does something like this already exist?
Perhaps not in the form you're imagining, but I sense is that any query
model pretty much is a language and that pretty much prescribes a great
deal about the engine being targeted...
>
> What do you think?
> Tobias.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF query model [message #1066367 is a reply to message #1066302] Tue, 02 July 2013 11:09 Go to previous messageGo to next message
Tobias Jenkner is currently offline Tobias JenknerFriend
Messages: 5
Registered: July 2009
Junior Member
Hi guys,

thanks again for the comments.

> Anything you can generate you can also generally interpret...
> [...]
> Both OCL and IncQuery support something of that nature via the
> Xtext-based editors...

> Perhaps not in the form you're imagining, but I sense is that any query
> model pretty much is a language and that pretty much prescribes a great
> deal about the engine being targeted...
So basically you propose to take a look at OCL and IncQuery and see if it is possible to reuse their query models and editors, right? I will do that then.

One more question: Do you know if there is something like a static analysis for these query models ? For example I would like to check if two or more queries intersect (-> is there a model object that is returned by all queries) ?

Tobias.
Re: EMF query model [message #1066370 is a reply to message #1066367] Tue, 02 July 2013 11:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33141
Registered: July 2009
Senior Member
Tobias,

Certainly it makes sense to look closely at the existing technologies
before you reinvent something analogous. Interesting of two sets is
something you should be able to do with either of these technologies.


On 02/07/2013 1:09 PM, Tobias Jenkner wrote:
> Hi guys,
> thanks again for the comments.
>> Anything you can generate you can also generally interpret...
>> [...]
>> Both OCL and IncQuery support something of that nature via the
>> Xtext-based editors...
>
>> Perhaps not in the form you're imagining, but I sense is that any
>> query model pretty much is a language and that pretty much prescribes
>> a great deal about the engine being targeted...
> So basically you propose to take a look at OCL and IncQuery and see if
> it is possible to reuse their query models and editors, right? I will
> do that then.
> One more question: Do you know if there is something like a static
> analysis for these query models ? For example I would like to check if
> two or more queries intersect (-> is there a model object that is
> returned by all queries) ?
>
> Tobias.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF query model [message #1066373 is a reply to message #1066367] Tue, 02 July 2013 11:32 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Checking whether the actual results of two queries intersect is trivial.

Checking whether two queries intersect is a non-trivial problem
requiring symbolic analysis. IncQuery is less expressive, so the
analysis is probably easier. OCL is more powerful and correspondingly
harder, but OCL has been an international standard for many years and so
there is a body of research work that you can consult. I recall a paper,
but not the name, by the USE group at Bremen in which they looked for
redundancy amongst OCL invariants.

Regards

Ed Willink


On 02/07/2013 12:09, Tobias Jenkner wrote:
> Hi guys,
> thanks again for the comments.
>> Anything you can generate you can also generally interpret...
>> [...]
>> Both OCL and IncQuery support something of that nature via the
>> Xtext-based editors...
>
>> Perhaps not in the form you're imagining, but I sense is that any
>> query model pretty much is a language and that pretty much prescribes
>> a great deal about the engine being targeted...
> So basically you propose to take a look at OCL and IncQuery and see if
> it is possible to reuse their query models and editors, right? I will
> do that then.
> One more question: Do you know if there is something like a static
> analysis for these query models ? For example I would like to check if
> two or more queries intersect (-> is there a model object that is
> returned by all queries) ?
>
> Tobias.
Previous Topic:[CDO]
Next Topic:can href resolve packages via ns-uri?
Goto Forum:
  


Current Time: Fri Apr 26 06:10:55 GMT 2024

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

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

Back to the top