Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » Unsupported registration: QS
Unsupported registration: QS [message #478803] Fri, 07 August 2009 01:01 Go to next message
Eclipse UserFriend
Originally posted by: valerio.cosentino.gmail.com

hi, i have a problem.
I have created 3 methods..checkName check if two string are igual or
similar, thanks to matches and getSimilarity.
When i launch the atl transformation i get a warning (
Unsupported registration: QS) and an error

What's the warning?
and how i can solved the error?

thank you


helper context String def: matches(s : String) : Boolean =
if( self <> '' and s <> '') then
if self = s then
true
else
false
endif
else
false
endif;

helper context Sequence(String) def: getSimilarity(s : Sequence(String),
sim : Integer) : Integer =
if( self = '' or s = '') then
sim
else
if( self->first() = s->first()) then
(self->excluding(self->first())).getSimilarity(s->excluding(self- >first()),sim+1)
else
(self->excluding(self->first())).getSimilarity(s->excluding(self- >first()),sim)
endif
endif;


helper def: checkName(bpmn : String , uml : String) : Integer =
if bpmn.matches(uml) then
1
else
(bpmn.toSequence()).getSimilarity((uml.toSequence()),0)
endif;


Unsupported registration: QS
Operation not found: Sequence {'R', 'e', 'q', 'u', 'e', 's', 't', ' ',
'C', 'a', 't', 'o', 'l', 'o', 'g', '
'}.getSimilarity(java.util.ArrayList,java.lang.Integer)
at checkName(modelmatching.atl[82:6-82:63])
local variables: self=thisModule, bpmn='Request Catolog ', uml='Activity'
at __applyClassifierToMatch(modelmatching.atl[136:8-136:49])
local variables: self=thisModule,
link=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@60e9fa,
bpmn=IN1!Request Catolog :BPMN!Activity, uml=IN2!Activity:UML2!Activity,
t1=OUT!<unnamed>:Gambuse!Iguality, t2=OUT!<unnamed>:Gambuse!Disparity
at __exec__(modelmatching.atl)
local variables: self=thisModule,
e=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@60e9fa
at main(modelmatching.atl)
local variables: self=thisModule
[ATL] Re: Unsupported registration: QS [message #482640 is a reply to message #478803] Thu, 27 August 2009 12:30 Go to previous message
William Piers is currently offline William PiersFriend
Messages: 301
Registered: July 2009
Senior Member
Hello,

"QS" is the encoded type for Sequence(String), this warning indicates
that ATL doesn't support Sequence as context for helpers.

You have to refactor the getSimilarity helper, for example it could be
defined at the ATLModule level (e.g. as checkName):

helper def: getSimilarity(self_seq: Sequence(String), s :
Sequence(String), sim : Integer) : Integer =
if( self = '' or s = '') then
sim
else
if( self_seq->first() = s->first()) then
(self_seq->excluding(self->first())).getSimilarity(s->excluding(self_seq- >first()),sim+1)

else
(self_seq->excluding(self_seq->first())).getSimilarity(s->excluding(self_seq- >first()),sim)

endif
endif;

Best regards,

William

valerio a écrit :
> hi, i have a problem.
> I have created 3 methods..checkName check if two string are igual or
> similar, thanks to matches and getSimilarity.
> When i launch the atl transformation i get a warning (
> Unsupported registration: QS) and an error
>
> What's the warning?
> and how i can solved the error?
>
> thank you
>
> helper context String def: matches(s : String) : Boolean = if( self
> <> '' and s <> '') then
> if self = s then
> true
> else
> false
> endif
> else
> false
> endif;
>
> helper context Sequence(String) def: getSimilarity(s : Sequence(String),
> sim : Integer) : Integer =
> if( self = '' or s = '') then
> sim
> else
> if( self->first() = s->first()) then
>
> (self->excluding(self->first())).getSimilarity(s->excluding(self- >first()),sim+1)
>
> else
>
> (self->excluding(self->first())).getSimilarity(s->excluding(self- >first()),sim)
>
> endif
> endif;
>
>
> helper def: checkName(bpmn : String , uml : String) : Integer =
> if bpmn.matches(uml) then
> 1
> else
> (bpmn.toSequence()).getSimilarity((uml.toSequence()),0)
> endif;
>
>
> Unsupported registration: QS
> Operation not found: Sequence {'R', 'e', 'q', 'u', 'e', 's', 't', ' ',
> 'C', 'a', 't', 'o', 'l', 'o', 'g', '
> '}.getSimilarity(java.util.ArrayList,java.lang.Integer)
> at checkName(modelmatching.atl[82:6-82:63])
> local variables: self=thisModule, bpmn='Request Catolog ',
> uml='Activity'
> at __applyClassifierToMatch(modelmatching.atl[136:8-136:49])
> local variables: self=thisModule,
> link=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@60e9fa,
> bpmn=IN1!Request Catolog :BPMN!Activity, uml=IN2!Activity:UML2!Activity,
> t1=OUT!<unnamed>:Gambuse!Iguality, t2=OUT!<unnamed>:Gambuse!Disparity
> at __exec__(modelmatching.atl)
> local variables: self=thisModule,
> e=org.eclipse.m2m.atl.engine.emfvm.lib.TransientLink@60e9fa
> at main(modelmatching.atl)
> local variables: self=thisModule
>
Previous Topic:[ATL] OrderedSet.indexOf operation not found
Next Topic:ATL:Multiple assignments in an iterator
Goto Forum:
  


Current Time: Sun Sep 22 08:38:32 GMT 2024

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

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

Back to the top