Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » Generating an EReference (containment = false)
Generating an EReference (containment = false) [message #94223] Fri, 31 October 2008 09:46
Eclipse UserFriend
I have a little problem generating a reference to an already generated
element. Fir instance i have an abstract class with a stereotype "memory"
(example), then another class (memoryDevice) that realizes that memory
class. So i generate a memory for each abstract memory class then i
generate a memoryDevice class for each class stereotyped memoryDevice.
Then i want to reference for each memoryDevice, the memory that it
realizes.

Here is the code:

rule myMemory {
from s : UML2!Class
to t : MM!Memory (
name <- s.name,
)
}
rule myMemoryDevice {
from s : UML2!Class
to t : MM!MemoryDevice (
name <- s.name,
memoryRealized <- myMemory
),
myMemory : MM!Memory( ###Is it true to choose this type if
###the reference is not a
containment?
###(i don't think so)
--name <- s.name
)}

Questions:
- What is the target type that i have to use in the rule
(myMemoryDevice) when the metamodel it is an EReference with containment =
false (by default)
- In ATL, can we do such things : references (other than containments)?

Thanks in advance!
Previous Topic:[ATL] How to write a standalone Java application for model tranformation?
Next Topic:[ATL] Transformation of Petri nets models
Goto Forum:
  


Current Time: Sun Jun 08 08:24:07 EDT 2025

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

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

Back to the top