[QVT] result of allSubobjects on sets [message #727429] |
Wed, 21 September 2011 09:33  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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.
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.03588 seconds