Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [] subsets support


Please see responses, in-line, below.



On Mon, Jun 14, 2010 at 2:52 AM, Ed Willink <ed@xxxxxxxxxxxxx> wrote:

I'm investigating how the Interactive OCL Console in the MDT/OCL project might support evaluation of an OCL query involving a UML {subsets} property.

The news://$g9a$1@xxxxxxxxxxxxxxxxx thread suggests that DerivedSubsetEObjectEList is available but not used.

I can't access that link, so I'm not sure what the context is. It's true that such a class exists and that it is not currently used by the UML2 code generator. The reason for this is that the derivation algorithm can't be automatically determined by the code generator. It's expected that specializations of this list implementation could be used to back derived subsets; if you look at the source code, you'll see that this is, in fact, the approach used for a couple of the features in the UML2 implementation...

Searching ecore and uml codegen for 'subsets' suggests that codegen support for subsets is limited to provision of an EAnnotation, although a ..._ESUBSETS feature may be created seemingly without any associated usage.

The process of converting a UML model (where subsets constraints are natively supported) to a corresponding Ecore representation will introduce the necessary annotations. Additional metadata is cached in the resulting generated code; the case you refer to is where the list of subsetting features is cached for a superset feature (which is, naturally, not annotated since there is no 'superset' constraint in UML).

What is the intended {subsets} support?

There are multiple alternative implementation approaches for {subsets}:

There are a number of use cases supported... and several factors affect the resulting implementation, e.g., whether the feature(s) is/are derived, composite, etc.. So it doesn't make sense for the user to be able to chose which approach they prefer; it really depends on the intended semantics.

a) implement the {subset} from the superset - space efficient, access inefficient  
b) implement the superset from the {subset}s - space inefficient, access efficient

should the user have a convert/codegen option?


       Ed Willink
_______________________________________________ mailing list

Back to the top