YUML and YPL Database Manual

Don Batory
Department of Computer Science
The University of Texas at Austin
Austin, TX, USA

Yuml is a free web service for drawing UML class diagrams given a Yuml input specification.  As this is a for-profit company, the "free" service comes with some strings attached.  Namely, it will produce a pretty class diagram for you provided that your specification is not too complicated.  To familiarize yourself with Yuml:
:::test/BuildDocumentation/test/x.yuml.yuml:::


Draw some diagrams of your own.  When you feel comfortable, proceed to the next section.

Yuml Specifications

A Yuml specification is elegant.  Here is a BNF of a subset of Yuml that MDELite uses for class diagrams. Literals (a.k.a. tokens) are in single `quotes'.
:::src/Yuml/ReadMe.txt:::
Note that a String token is mentioned above.  This not a Java String, but one that is devoid of the characters:

comma ,
left brace [
right brace ]
less than <
greater than >
minus -

Further, a semicolon ";" means new line.  Some hints:
Consider the following Yuml specification:
:::test/BuildDocumentation/test/y.yuml.yuml:::
Yuml produces this beauty:



Warning! Do not read the above specification too deeply!  'Interface;Closable' is a String.  The word 'Interface' means nothing to Yuml.  It could just as well have been 'George', which also means nothing to Yuml.  What Yuml does understand is ';' (semicolon), which means add a new line.  So 'Interface;Closable' produces a 2-line name in the above figure.  And the string 'bind();getLocalAdddress()' means print strings 'bind()' and 'getLocalAddress()' on separate lines.

The YPL Schema

Here is the YPL schema (ypl.schema.pl), which can encode YUML diagrams as a database of tuples:
:::libpl/ypl.schema.pl:::
Here is a translation of (i.e., the database of tuples that encodes)  the specification of the first figure:
:::outYuml1.txt:::
And here is a MDL.ClassYumlParser translation of the specification of the second figure:
:::outYuml2.txt:::
Of course, you can take these databases and convert them back into Yuml specs using MDL.ClassYumlUnParser.  See the MDELite Manual for more details.

YPL Constraints

There indeed are YPL constraints.  I have not posted them, as they are good examples for homework assignments.