다음을 통해 공유


UML and DSLs

So is UML really contradictory to DSLs?  Do they really represent different philosophies? I don’t think so.  After all, UML is just a set of domain specific languages.  If you want to model use cases, or state transition diagrams, what other DSLs would you use?

Software architecture is all about tradeoffs, and there’s obviously one here. On the one hand UML is relatively standard, so that costs of implementation, documentation, training, deployment etc can be amortized across multiple installations.  On the other hand, it may not match your target problem very well.  There are plenty of domains that UML does not encompass.  That is why the OMG has branched out into business modelling.  Database design is another; user interface a third; and we could list many more, including vertical domains - the design of software radio, mobile phone, or insurance systems - and very platform-oriented domains, such as the direct visual depiction of code.

The UML-oriented approach to DSLs is “profiles” – adding extra data to UML models so that they appear to target more specialized domains than the original UML definitions do.  A frequent question about the DSL approach is the danger of proliferation of different approaches to the same problem, and I think that’s a valid concern.  On the other hand, the UML+profile approach can end up with cumbersome solutions to essentially simple problems, and can lead to ghastly chimeras, like class diagrams with classes labelled “Web page” or “marketing department”.

To resolve these issues long-term I think we need a new architecture for modelling languages in which the false distinction between UML and DSLs would evaporate.  Widely used languages would be standardized; new languages could emerge and evolve; different languages could be loosely-coupled yet interoperate. To achieve such architecture we first need to understand some basics about language anatomy, such as making an accurate distinction between syntax and semantics.  I'll talk more about this in future postings.

Comments

  • Anonymous
    October 06, 2008
    PingBack from http://www.easycoded.com/uml-and-dsls/

  • Anonymous
    October 07, 2008
    Indeed. As Andrew Watson wrote back in 2007 (see http://doc.omg.org/omg/08-09-03), choosing between UML and DSLs predicates a false dichotomy...

  • Anonymous
    October 07, 2008
    Steve, in addition to syntax and semantics, a good starting point for defining this architecture includes the following four concepts: languages, logics, models and theories. Note the multiplicity for each concept. This multiplicity provides the appropriate level of paramaterization which is essential to the goal you have defined. These key concepts properly set the stage for later refining your proposed architecture. In terms of semantics, unfortunately, the current state of formal semantics is underspecified to achieve your goal. A colleague of mine calls this goal, "living, liasing languages." In order to achieve this goal, two new elements would have to be introduced: semiotics and pragmatics. Is there a collaborative approach that Microsoft would consider in stewarding this type of architecture ? Today, with the wide variety of social media capabilities available, standards bodies as only one way of achieving consensus.    

  • Anonymous
    October 07, 2008
    Unit testing Udi Dahan wrote a post about unit testing - Unit Testing for Developers and Managers Architecture

  • Anonymous
    October 07, 2008
    The comment has been removed

  • Anonymous
    October 07, 2008
    The comment has been removed

  • Anonymous
    October 07, 2008
    Jim - profiles are ok, I think, when you want to constrain/extend a retargetable syntax to map onto another language, so we can have UML diagrams that directly represent Java, C#, VB or Smalltalk programs.  Just like we do on whiteboards.

  • Anonymous
    October 08, 2008
    Steve, retargetable syntax implies a best case scenario of structure preserving transformations between languages. More formally, an isomorphism that preserves structure in the target meta language and object language has been part of Query View Transform (QVT) for a while. However, structure preserving transformations across languages can result in unfavorbale outcomes. Example, the structure class, association, class in UML transforms to an identical class, property, class structure in OWL with the unfavorable side effect that the structure would be classified as undecideable. This implies the underlying requirement for this new architecture is semantic preserving transformations also known as semiotic morphisms. As I mentioned in a previous comment, today's current semantics which are based on Alfred Tarski's Semantic Conception of Truth, underspecify the model theory required to support semiotic morphisms. Although I endorse the whiteboard analogy, I see one of Microsoft's most valuable contributions to the OMG process as bringing a more formal level of specification early in the debate. For example, specifying a requirement to validate a proposed language against a standard set of reasoning services such as classification, realization, consistency and satisfiablility as is the case with description logic, would begin to elevate the level of debate in within the OMG.    

  • Anonymous
    October 09, 2008
    Yes, I can remember reading Burstall and Goguen and learning about abstract algebra. But actually I think we can solve some important UML problems without everybody having to understand category theory.  "Keep it simple" and "the devil is in the detail" are my mottos for this.

  • Anonymous
    November 18, 2008
    Doug has published a response to an Open Letter addressed to him from Lars Corneliussen . I think Doug