Skip to main content


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 15:43 Go to next message
Eclipse UserFriend
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 18:56 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
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 07:59 Go to previous messageGo to next message
Eclipse UserFriend
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 08:58 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
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: Thu Apr 25 13:51:07 GMT 2024

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

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

Back to the top