Compartilhar via


UML Semantics

Grady has blogged about Microsoft’s position on UML. His article is a masterpiece of technopolitical spin. He says Microsoft “rejects UML”, and of course we don’t; as my colleague Alan Cameron Wills says, “we don’t want to limit ourselves to UML as a basis for our users’ domain specific languages”. We support UML in our Visio product, and we use it extensively for documentation.

Grady also attributes several mistakes to Alan, who actually got his facts right. But getting facts right is never the important issue in technopolitics; and UML is primarily a political artifact, not a technical one. In this vein, I’m going to write about UML semantics.

What is “semantics”? Grady talks about it a lot. For example: “In many cases, the semantics of the UML are pretty close to what you need, although they are deeper than necessary; in such cases, a suitable UML profile is sufficient to focus the language, which allows you to leverage standard UML tools and training and yet eliminate the bloat.” There are some interesting words in there: “close”, “deep”, “focus”.

George Lakoff’s interesting book “Woman, Fire and Dangerous Things” distinguishes between “objectivist” semantics and “cognitive” semantics. Objectivist semantics involves defining precise mappings from symbols to abstract entities and sets, and thus giving meanings to symbols by virtue of the logical properties of the corresponding abstract entities and sets. Lakoff goes to some lengths to dismiss objectivist semantics as an appropriate theory about the mind and language. To give semantics to real experiences in real languages, he says, requires a different kind of cognitive semantics based ultimately in categories of bodily experience.

Providing semantics for computer programming languages has historically been a completely objectivist matter. Programming languages can be given semantics in various ways, operational, axiomatic and denotational methods being customary. What these methods have in common is that they ascribe exactly the same meaning to a particular set of symbols under all possible circumstances; where exactly the same can be objectively assessed according to basic laws of equality in set theory. Users of such languages really do expect different implementations of them to behave the same.

Now UML is different. Its semantics is given by prose headed Semantics, containing sentences such as “The representing collaboration may be used to provide a description of the behavior of the classifier at a different level of abstraction than is offered by the internal structure of the classifier.”   It’s immediately obvious that an objectivist method is not being applied here, and that we have to appeal to a more cognitive understanding of the language used. The problem, of course, is that we can no longer make any objective assessment of what symbols mean. Users may not expect different implementations to behave the same; it simply is not set up like that. The best we can expect is for implementations to be similar.

The bottom line is that discussions of UML semantics become political, rather than objective. In consequence, discussions of UML compliance become political, rather than objective. Tool interoperability becomes a political, rather than an objective matter: two UML tools will interoperate if their vendors decide to make this work, rather than by virtue of any objective tests.

None of this would be a problem if UML were widely recognized for what it really is: an informally defined, popular set of conventions, which can be put to use in whatever ways are appropriate. The problem is that many of its proponents insist on pretending that it is in some way objectively defined; for example the OMG describes it as normative. Now interestingly, Grady does not seem to go this way – for example he says:  “... there really is no "illegal" UML graphical syntax.” I was surprised to read that – but it’s good. I hope it stays that way.

Comments

  • Anonymous
    December 10, 2004
    I hope all of you will maintain the dignity! There is no and will never be a single universal solution for all the problems.

    Consider this debate, "one" said "something" while keeping in mind "one domain", "other" interpreted completely in "other domain". Does any one think, there is any UML diagram or any DSL can resolve this issue, or clearly represent this debate (consider it either a debate or a problem)?

    What Grady, team and many known and unknown persons did has been proven for many, including MS. No matter what "One" says and what "Other" interprets, it doesn't reduce importance of "One"'s work.

    No matter what "One" and "Other" thinks about one another, in this universe there is plenty of room for both.

    Again, pleeeeeeeeee...ase, don't loose the dignity.

  • Anonymous
    December 12, 2004
    Blog link of the week 50

  • Anonymous
    December 13, 2004
    So Exiting !

  • Anonymous
    December 14, 2004
    Support UML all the time.

  • Anonymous
    December 16, 2004
    It's quite obvious that we support our children, so as booch...But there must be a way to comment on Booch's blog...

  • Anonymous
    December 16, 2004
    I asked the question over on Alan's blog, but I'll ask it here.

    If not UML as the foundation, then what? What is Microsoft proposing as the semantic foundation for their DSL's? What will be the fundamental concept tying them altogether? Will it simply be boxes and lines? Will it be a hierarchy of inherited and extended building blocks?

    If UML is "an informally defined, popular set of conventions", what will Microsoft's formally defined, specified set of conventions be?



  • Anonymous
    December 17, 2004
    Re. "semantic foundation" - it's important to distinguish between syntax and semantics. I'll do this in a future posting. In the meantime, you can see what we are proposing by going to http://lab.msdn.microsoft.com/vs2005/teamsystem/workshop/dsltools/ where we are making our tools available for preview. A new release is imminent.

  • Anonymous
    August 20, 2006
    PingBack from http://lethe.blogdns.net/~sylin/wp/?p=163

  • Anonymous
    November 07, 2007
    pc magazine yahoo mail email alerts mobile

  • Anonymous
    March 29, 2008
    PingBack from http://www.mingli-yuan.info/archives/128