Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmt-dev] Relation and Type Cardinalities

Hi All

Adi: I don't know whether you subscribe to [gmt-dev].

I've been getting concerned about the silent do-nothingness of matches.

Extension of the GReAT concepts to full UML, with arc cardinalities and
inheritance matching, means that each relationship has two separate
opportunities to not match.

A match may fail because the relationship connectivity of cardinality fails,
or because the target object is of an inappropriate type.

It must be possible to write transformations that positive;ly do something,
rather than only if nothing is wrong. In particular matching dies not
support
input type checking.

If the actual input type is the formal type, it obviously matches.
If the actual input type derives from the formal type, it also matches.
If the actual input type shares a base type with the formal type (e.g.
Object)
  then the match fails but reports no error since it could be one of a
  polymorphic family of match alternatives.

It must therefore be possible to perform the type match independently
of the cardinality/connectivity match.

A solution to this is to add a new relationship 'self', conveniently drawn
as a bi-composition in GME. If A contians B and B contains A then A is B.

With a 'self' relationship the connectivity/cardinality may establish the
match for the base type, which will succeed. Then a 1:1 'self' relationship
from the base-type to the intended derived type will succeed if the type
osok, and a separate 1:0 'self' relationship from the base-type to the
intended type will succeed if the type check fails. This therefore acts as
an if-then-else to support error diagnosis locally, end ensure that a match
did exist hierarchically.

	Regards
			
		Ed Willink

------------------------------------------------------------------------
E.D.Willink,                             Email: mailto:EdWillink@xxxxxxx
Thales Research and Technology (UK) Ltd, Tel:  +44 118 923 8278 (direct)
Worton Drive,                            or  +44 118 986 8601 (ext 8278)
Worton Grange Business Park,             Fax:  +44 118 923 8399
Reading,   RG2 0SB
ENGLAND          http://www.computing.surrey.ac.uk/personal/pg/E.Willink
------------------------------------------------------------------------
(formerly Racal Research and Thomson-CSF)

As the originator, I grant the addressee permission to divulge
this email and any files transmitted with it to relevant third parties.


Back to the top