Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Proper use of libraries
Proper use of libraries [message #871639] Mon, 14 May 2012 11:43 Go to next message
Eclipse User
Hello,

I have several transformations with partial functional overlaps. The
shared mappings/queries are in several libraries. Loading and modifying
one of the toplevel scripts is now very slow (the qvt compiler/analyzer
takes a lot of time until the syntax coloring is done). I'm wondering if
I'm using the library facility correctly:

Transformation:
import LibA;

LibA:
import LibB;
import LibC;

LibB:
import a;
import b;
import c;

LibC:
import LibD;

LibD:
import a;
import b;
import c;

liba, libb, libc contain no further imports

Each library contains a number of "modeltype ... uses ..." statements.

Specifically, I'm not sure whether:
- it's ok that essential liba, libb and libc are referenced twice in the
above example. Is that ok? Is there a way around it?
- it's ok that all units are referencing the modeltypes over and over again.

I've tried to understand the spec wrt this, but so far I could not find
what I might do differently.

Any hints?

Thanks
Marius
Re: Proper use of libraries [message #873231 is a reply to message #871639] Thu, 17 May 2012 14:56 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4035
Registered: July 2009
Senior Member
Hi Marius

In the absence of a more inforned response...

I suspect you're at the boundary of usage and identifying limitations
that could be addressed by the specification/tool.

My only suggestion is to remodularize to see if you can eliminate some
of the sharing that you suspect may be a problem.

If your libraries are of helper functions, you might try using
OCLinEcore to embed the helpers as OCL in the models; or even code as Java.

Regards

Ed Willink

On 14/05/2012 16:43, Marius Gröger wrote:
> Hello,
>
> I have several transformations with partial functional overlaps. The
> shared mappings/queries are in several libraries. Loading and modifying
> one of the toplevel scripts is now very slow (the qvt compiler/analyzer
> takes a lot of time until the syntax coloring is done). I'm wondering if
> I'm using the library facility correctly:
>
> Transformation:
> import LibA;
>
> LibA:
> import LibB;
> import LibC;
>
> LibB:
> import a;
> import b;
> import c;
>
> LibC:
> import LibD;
>
> LibD:
> import a;
> import b;
> import c;
>
> liba, libb, libc contain no further imports
>
> Each library contains a number of "modeltype ... uses ..." statements.
>
> Specifically, I'm not sure whether:
> - it's ok that essential liba, libb and libc are referenced twice in the
> above example. Is that ok? Is there a way around it?
> - it's ok that all units are referencing the modeltypes over and over again.
>
> I've tried to understand the spec wrt this, but so far I could not find
> what I might do differently.
>
> Any hints?
>
> Thanks
> Marius
Re: Proper use of libraries [message #873425 is a reply to message #873231] Fri, 18 May 2012 03:59 Go to previous messageGo to next message
Eclipse User
Hello Ed,

On 17.05.2012 20:56, Ed Willink wrote:
> I suspect you're at the boundary of usage and identifying limitations
> that could be addressed by the specification/tool.
>
> My only suggestion is to remodularize to see if you can eliminate some
> of the sharing that you suspect may be a problem.

I'm now pretty sure that there is some underlying inefficiency in the
library handling that somehow causes the compiler to run through the
included libraries multiple times. So indeed my best option is to
optimize the sharing as much as possible, and to avoid multiple levels
of inclusion where possible.

Thanks for answering anyway!

Marius
Re: Proper use of libraries [message #873446 is a reply to message #873425] Fri, 18 May 2012 04:58 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4035
Registered: July 2009
Senior Member
Hi

If you can produce a simple repro for the deficiency, please raise a
Bugzilla. I can't promise a rapid
response but ultimately the repro may become a JUnit for future code.

Regards

Ed Willink

On 18/05/2012 08:59, Marius Gröger wrote:
> Hello Ed,
>
> On 17.05.2012 20:56, Ed Willink wrote:
>> I suspect you're at the boundary of usage and identifying limitations
>> that could be addressed by the specification/tool.
>>
>> My only suggestion is to remodularize to see if you can eliminate some
>> of the sharing that you suspect may be a problem.
> I'm now pretty sure that there is some underlying inefficiency in the
> library handling that somehow causes the compiler to run through the
> included libraries multiple times. So indeed my best option is to
> optimize the sharing as much as possible, and to avoid multiple levels
> of inclusion where possible.
>
> Thanks for answering anyway!
>
> Marius
Previous Topic:Using oclIsTypeOf() with a variable argument
Next Topic:[QVTO] Default initialization of * features
Goto Forum:
  


Current Time: Fri Aug 29 18:21:20 EDT 2014

Powered by FUDForum. Page generated in 0.02555 seconds