On 11/11/2011 07:34, Diego Bosc? wrote:
> Although this would work, I think that it would make ADL far less
> readable and would oblige people to know always the reference model

to be clear, I am not proposing to make any change at all to ADL. ADL is 
meant as a proper readable, mathematical formal expression of archetype 
semantics. It is the other serialisations we are concerned with here - 
i.e. serialisations of AOM structures.

> underneath AND their parent archetype (if for some reason the parent
> archetype is not available then you are completely screwed). Even if
> you say that people should know very well the model they are defining
> archetypes for, I think that you would agree with me that they should
> not be obliged to remember all archetypes on the specialization
> hierarchy.

yes, that is another issue here, which is whether you are seeing an 
archetype in differential or flattened form. If we use the ADL format 
for occurrences, cardinality and existence ranges, you can always just 
look at the most specialised archetype and you know the resulting 
occurrences / card/ ex, because you always have the full range e.g. occ 
= 2..5 or whatever. But in the scheme I am proposing, this is not so 
easy to work out visually. The tools of course should generate the right 
result in 'flat' view. If you play around with the AWB, you will see the 
diff & flat views, but currently these intervals are easy to understand 
because of always being in the full n..m form (even in the dADL and XML 
serialisation). So... good point....

>
> This could be even worse for the minimum, as if no constraint is
> expressed = RM min (and again, also taking into account parent
> archetype), which is almost always 0 or 1. And not being able to tell
> at first look if something is not needed is really bad (IMHO).

well it would be bad if there were no flattener, but it is always 
possible to implement a flattener. The way the AWB tool works is that 
the serialised form of a differential archetype is converted to AOM form 
- which has proper MULTIPLICITY_INTERVAL objects (these are essentially 
just Interval<Integer>) before flattening; then serialisation occurs in 
the other direction. So a flattened archetype will show the result of 
the archetype lineage and also the RM, if the 'flatten RM' option is on. 
I am not saying all tools have to work this way - this is the way I have 
done the reference compiler, but others may come up with more 
stream-based approaches in the future.

Anyway, this is a good point to be careful of.

- thomas


- thomas


Reply via email to