Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » ATL issue(ATL issue)
ATL issue [message #559579] Fri, 17 September 2010 09:19
Kosala Yapa is currently offline Kosala YapaFriend
Messages: 159
Registered: September 2010
Senior Member
Hi,

I have two classes, Requirement and Constraint.

I want to write ATL program, to map requirements,

when Requirement.compOperator=equal, then
Requirement.Context -> Constraint. equal. op1
Requirement.Value->Constraint.equal.op2

when Requirement.compOperator=lessThan, then
Requirement.Context -> Constraint. lessThan. op1
Requirement.Value->Constraint.lessThan.op2

I tried to define a helper and use it in a rule, but not working. I am not clear about how to define helpers and their use.

can someone give me any hint/sample?

Requirement=>

package Requirement{
class Requirement{
attribute Context : String;
attribute compOperator : String;
attribute Value : String;
}
}

package PrimitiveTypes{
datatype String;
}

Constraint=>

package Constraint {

class Constraint {
attribute compOperator : String;
attribute op1t : String;
attribute op2t : String;
}

class equal{
attribute op1: String;
attribute op2: String;
}

class lessThan{
attribute op1: String;
attribute op2: String;
}
}

package PrimitiveTypes {
datatype String;
}

Thank you.
Kosala
Previous Topic:ecore model
Next Topic:ATL
Goto Forum:
  


Current Time: Tue Apr 23 07:18:01 GMT 2024

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

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

Back to the top