12

UML classdiagrams are a standard graphical notation to describe classes and their relationships.

Is there a standard textual notation (DSL) to describe the same? Don't say XMI or EMF;-)

I think you could do that with Corba IDL and use Interfaces for classes, but this is somehow too much on the Corba side. You could use Java Interfaces, but this is too Java.

Background of my question is writing generators. I think it is easier to write a generator based on the syntax tree of a DSL than to parse a graphical notation. A graphical notation first has to be translated into a syntax tree (that would be the same you'd get from the corresponding DSL). I think translating a graphical notation into the syntax tree is harder than to translate a DSL (where you can use ANTLR).

2
  • What do you expect to be different from XMI or EMF?
    – Doc Brown
    Commented Nov 10, 2010 at 12:00
  • 2
    @Doc Brown: Just a guess, but being human readable would probably rate highly... :-)
    – sfinnie
    Commented Nov 10, 2010 at 12:50

4 Answers 4

12

You've got the answer already, but I'd like to clarify. There is a standard notation, it's called HUTN, and nobody uses it.

1
  • LOL. Indeed the first time I hear about that. Another OMG product xD
    – qwerty_so
    Commented Jun 6, 2022 at 19:27
10

Check this complete list of textual notations to describe UML models. Btw, the reasons to create one of these tools (in particular TextUML) can be find here.

1
  • Great, TextUML is exactly what I was thinking of. Thanks.
    – weberjn
    Commented Nov 10, 2010 at 15:27
2

It is no coincidence that UML separates abstract and concrete syntax.

Tying up code generation to a user-facing notation is a bad idea. Tools (code generators) and people (modelers) have totally distinct needs, so no single syntax can serve both audiences well. Not to mention you lose the ability of applying the same code generator to models created using different notations.

TextUML is a concrete syntax tailored to modelers. XMI is a much better notation for tools, and the UML2 object model makes it very easy to handle.

Rafael

http://abstratt.com/blog

0

No standard notation to my knowledge but a good summary of options here.

hth.

Not the answer you're looking for? Browse other questions tagged or ask your own question.