Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [qvto-dev] Incremental assignment on unique feature

Hi Christopher

I presume you mean unique, ordered feature. For a non-ordered feature the order is clearly specified as indeterminate.

I've raised a QVT issue

AssignExp to an Collection should make clear that the results is

target->including(source)->excluding(null)

which should exploit an OCL definition of OrderedSet::including to be add at end if necessary.

Since Classic Eclipse OCL is a bit flaky on OrderedSet, QVTo may want its own utility method.

I don't see where '+=' is associated with 'append'. The spec is nice and vague: additive semantics.

    Regards

        Ed




On 12/02/2014 08:43, Christopher Gerking wrote:

Hi

 

I recently discovered an anomaly with respect to an incremental AssignExp, and I’m not quite sure whether this is simply underspecified or a bug.

What should happen if a += is executed on a unique feature which, however, does already contain the added element (but not in the last place)?

Obviously the element can’t be added twice, but should it move to the end? Currently, it does not move.

 

Section 8.2.2.11 AssignExp is kind of vague, but at least states that the required behavior is to “append it depending on the isReset property”. A call to “append” on an ordered OCL collection (and also += as a shorthand in QVTo) will always “move” the element to the end. Thus, we have different behaviors for += depending on whether there is an OCL collection or an EMF feature on the left-hand side.

 

What do you think?

 

 

Kind regards

Christopher

 

 

 

 



_______________________________________________
qvto-dev mailing list
qvto-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/qvto-dev


No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4259 / Virus Database: 3697/7084 - Release Date: 02/11/14



Back to the top