Home » Modeling » EMF » EMF query model
EMF query model [message #1066012] |
Fri, 28 June 2013 16:48  |
Eclipse User |
|
|
|
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 01:57   |
Eclipse User |
|
|
|
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.
|
|
|
Re: EMF query model [message #1066111 is a reply to message #1066025] |
Sun, 30 June 2013 16:18   |
Eclipse User |
|
|
|
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 07:32   |
Eclipse User |
|
|
|
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 01:32   |
Eclipse User |
|
|
|
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.
|
|
| | |
Re: EMF query model [message #1066373 is a reply to message #1066367] |
Tue, 02 July 2013 07:32  |
Eclipse User |
|
|
|
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.
|
|
|
Goto Forum:
Current Time: Mon Jul 14 14:55:10 EDT 2025
Powered by FUDForum. Page generated in 0.58383 seconds
|