Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVT] result of allSubobjects on sets
[QVT] result of allSubobjects on sets [message #727429] Wed, 21 September 2011 09:33 Go to next message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Hi,

I'm having some troubles understanding the effect of invoking allSubobjects() on a set.

Assume that self.persons represents a set of Person.
Assume that a Person might have other references to Persons.

What is the difference between:
-1- self.persons.allSubobjects() and
-2- self.persons->allSubobjects()
when invoked in a QVT transformation?

Obviously I tried it and got
-1- [ p1, p2 ]
-2- [[ p1, p2 ]]

allSubobjects is specified as an operation that returns a Set(Element) when invoked on an Element.
However, what happens when allSubobjects is invokved on a Set(Element)?

Greetings,
Wilbert.

Re: [QVT] result of allSubobjects on sets [message #727518 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727523 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727536 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727538 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727544 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727560 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727562 is a reply to message #727429] Wed, 21 September 2011 13:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

self.persons.allSubobjects() is a shortform for
self.persons->collect(allSubobjects()) so it should evaluate to a Bag.

self.persons->allSubobjects() is wrong; raise a Bugzilla.
allSubObjects() is defined on Element and Collections do not conform to
Element; therefore a semantic error should be reported. It looks as if
the implementation just uses eContents() behind the scenes and so
creates a Set of the internal collection. Even if QVT were to define
allSubObjects(), I doubt it would be defined as Set{self} when just self
would be simpler.

Regards

Ed Willink

On 21/09/2011 10:33, Wilbert Alberts wrote:
> Hi,
>
> I'm having some troubles understanding the effect of invoking
> allSubobjects() on a set.
>
> Assume that self.persons represents a set of Person.
> Assume that a Person might have other references to Persons.
>
> What is the difference between:
> -1- self.persons.allSubobjects() and
> -2- self.persons->allSubobjects()
> when invoked in a QVT transformation?
>
> Obviously I tried it and got
> -1- [ p1, p2 ]
> -2- [[ p1, p2 ]]
>
> allSubobjects is specified as an operation that returns a Set(Element)
> when invoked on an Element.
> However, what happens when allSubobjects is invokved on a Set(Element)?
>
> Greetings,
> Wilbert.
>
>
Re: [QVT] result of allSubobjects on sets [message #727873 is a reply to message #727518] Thu, 22 September 2011 06:28 Go to previous message
Wilbert Alberts is currently offline Wilbert AlbertsFriend
Messages: 209
Registered: June 2010
Senior Member
Quote:
self.persons->allSubobjects() is wrong; raise a Bugzilla.


Done so.

Thanks,
Wilbert.
Previous Topic:[QVTo] Metamodels list "reloading" in QVTo plugin
Next Topic:[QVTO] Accessing Java class members from transformations
Goto Forum:
  


Current Time: Thu Apr 18 19:03:52 GMT 2024

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

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

Back to the top