Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-Relations » Transforming Ecore diagrams with mediniQVT(Exception thrown at the transformation execution)
Transforming Ecore diagrams with mediniQVT [message #1695594] Sun, 17 May 2015 16:01 Go to next message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
Dear Community, i dont know if this is the place of this post

I have the MoDisco Java metamodel and i need transform a plus sign in the source model in a minus sign in the target model. Is it functionally possible?

The code por this part is the following:

relation InfixExpression2InfixExpression {

tvl : String;
tvr : String;


checkonly domain sourcemodel s: java::InfixExpression {

leftOperand = sLOperand : java::NumberLiteral {
tokenValue = tvl
},
rightOperand = sROperand : java::NumberLiteral {
tokenValue = tvr
},
operator = java::InfixExpressionKind::PLUS
};

enforce domain targetmodel t: java1::InfixExpression {

leftOperand = tLOperand : java1::NumberLiteral {
tokenValue = tvl
},
rightOperand = tROperand : java1::NumberLiteral {
tokenValue = tvr
},
operator = java1::InfixExpressionKind::MINUS
};
}


I attach the qvt file and the source model. Initially, the target model don't exist, this is created after at transformation execution.

I recieve the following error at the transformation execution.

Exception occured in transformation
The value 'PLUS' is not a valid enumerator of 'InfixExpressionKind'

I don't understand what is wrong.

I hope you can help me.

Thanks.
Re: Transforming Ecore diagrams with mediniQVT [message #1695642 is a reply to message #1695594] Mon, 18 May 2015 11:11 Go to previous messageGo to next message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member

As you can see below, the PLUS sign belongs to the MoDico Java metamodel:

https://ci6.googleusercontent.com/proxy/CkzcH137UXttqGEZS6Oi6GrVK-Wddx_67bVM2BP6mgNmTg090oe-Kry2ZlDsH-c5_RexTgtkOFAJaKVKZDl0PRO8o302LG9SqE8=s0-d-e1-ft#https://www.eclipse.org/forums/index.php/fa/21724/0/

Thamks.
Re: Transforming Ecore diagrams with mediniQVT [message #1695647 is a reply to message #1695594] Mon, 18 May 2015 11:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7593
Registered: July 2009
Senior Member
Hi

This is the Eclipse QVTd newsgroup. You should try a Medini QVT
newsgroup for Medini QVT issues.

Eclipse QVTd will finally have a very preliminary QVTr and QVTc compiled
and optimized execution capability in the Mars release (June), but you
will have to wait till next year before it is suitable for more that
academic research.

In place transformations are rather hard with QVTr / QVTc that lack a
default 'copy' capability; a prototype should be avilable in Eclipse
QVTd next year.

For now I would recommend QVTo (or plain Java) for such a task.

Regards

Ed Willink


On 17/05/2015 17:01, Gonzalo Bressan Zuber wrote:
> Dear Community, i dont know if this is the place of this post
>
> I have the MoDisco Java metamodel and i need transform a plus sign in the source model in a minus sign in the target model. Is it functionally possible?
>
> The code por this part is the following:
>
> relation InfixExpression2InfixExpression {
>
> tvl : String;
> tvr : String;
>
>
> checkonly domain sourcemodel s: java::InfixExpression {
>
> leftOperand = sLOperand : java::NumberLiteral {
> tokenValue = tvl
> },
> rightOperand = sROperand : java::NumberLiteral {
> tokenValue = tvr
> },
> operator = java::InfixExpressionKind::PLUS
> };
>
> enforce domain targetmodel t: java1::InfixExpression {
>
> leftOperand = tLOperand : java1::NumberLiteral {
> tokenValue = tvl
> },
> rightOperand = tROperand : java1::NumberLiteral {
> tokenValue = tvr
> },
> operator = java1::InfixExpressionKind::MINUS
> };
> }
>
>
> I attach the qvt file and the source model. Initially, the target model don't exist, this is created after at transformation execution.
>
> I recieve the following error at the transformation execution.
>
> Exception occured in transformation
> The value 'PLUS' is not a valid enumerator of 'InfixExpressionKind'
>
> I don't understand what is wrong.
>
> I hope you can help me.
>
> Thanks.
Re: Transforming Ecore diagrams with mediniQVT [message #1695681 is a reply to message #1695647] Mon, 18 May 2015 13:00 Go to previous message
Gonzalo Bressan Zuber is currently offline Gonzalo Bressan ZuberFriend
Messages: 35
Registered: May 2015
Member
Hello, thanks, I will investigate about QVTo.

Regards.

Previous Topic:QVTd 1.0.0 reversion to 0.12.0
Next Topic:QVTo Pivot query
Goto Forum:
  


Current Time: Sun May 28 01:26:34 GMT 2023

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

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

Back to the top