Re: isa and hasa in UML

This is interesting, and a little bit shocking.  I can't tell from this
what the goal of the action item is.  If I knew that, I might make a
helpful suggestion.

IN GENERAL, although UML might not be the formal modeling
venue of choice, there is a reality check which UML can be
used to perform:  See if UML is capable of capturing the essence
of the WSA, without becoming too "AR" in the process ("R" stands
for "retentive").  If it is not, consider the thing being modeled as
a prime candidate for the bit bucket.  KISS and all that...

> The problem is that it becomes really difficult to talk about weird or
> abstract sets. Basing is-a on this would lead to the following
> counter-intuitive result: every unicorn is a yeti. (There are no
> documented instances of either, so the set of unicorns and yetis is
> indistinguishable.)

True, the empty set is equal to itself, and that leads to some
counter-intuition, but not to logical inconsistency.  Nor are you
prevented from saying: "there exists no Unicorn u and Yeti y
such that y = u."  So empty sets don't force undersired logical
equivalence, as you imply.

> A more serious issue, sticking with birds for the moment, is that it is
> similarly hard to talk about properties of birds such as flying: we
> could not express the fact that all birds except penguins fly.

Why not?  There are birds that fly and birds that don't.  There
is the set of individuals that are birds.  There is the set of individuals
that fly.  There is intersection between the sets, also differences.

>
> An even more serious issue is that we need to capture the following
> situation:
>
> A service has an identifier
>
> A Web service is a service
> A Web service has a URI
>
> The Web service's URI counts_as the service identifier
>
> It is that counts_as that is beyond the capabilities of UML's
> generalization. We *could* extend UML's generalization, and that may be
> the best overall approach. In fact, we would really need to do that for
> all our relationships, use «is-a» and «has-a» and *never* rely on UML's
> built-in relationships. «is-a» and «has-a» could probably be defined in
> OCL.

A service *is identified by* an identifier
A Web Service *is-a* service
A URI *is-a(n)* identifier
A Web Service *is identified by* a URI

"Counts-as" is bogus, sorry.  It's simply an inherited relation, with
constraint added.  And "has-a" is wrong in this context, too, because
identifiers are not part of the composition of the thing identified.

If you don't find UML satisfactory for modeling the WSA, perhaps
I could interest you in Alloy?

Walden

Received on Friday, 30 May 2003 15:01:14 UTC