Wednesday, June 16, 2004

UMLGraph - Declarative Drawing of UML Diagrams

UMLGraph allows the declarative specification and drawing of UML class and sequence diagrams.

The following is an example of a sequence diagram specification and the resulting UML diagram:



Define the objects
object(O,"o:Toolkit");
placeholder_object(P);
step();

# Activation and messages
active(O);
message(O,O,"callbackLoop()");
create_message(O,P,"p:Peer");
message(O,P,"handleExpose()");
active(P);
return_message(P,O,"");
inactive(P);
destroy_message(O,P);
inactive(O);

# Complete the lifeline of O
step();
complete(O);

Simple UML sequence diagram

Comments: