mirror of https://github.com/dspinellis/UMLGraph
132 lines
4.3 KiB
HTML
132 lines
4.3 KiB
HTML
<?xml version="1.0" encoding="us-ascii"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<!-- No not edit this page in the web directory. -->
|
|
<!-- $Id$ -->
|
|
<head>
|
|
<title>UMLGraph - Declarative Drawing of UML Diagrams</title>
|
|
<meta name="AUTHOR" content="Diomidis Spinellis" />
|
|
</head>
|
|
<body>
|
|
<h1 align="right"><tt><font color="#ff0000">UMLGraph dds</font></tt></h1>
|
|
<h2>UMLGraph - Declarative Drawing of UML Diagrams</h2>
|
|
<!-- Introduction {{{1 -->
|
|
UMLGraph allows the declarative specification and drawing of
|
|
UML class and sequence diagrams.
|
|
The current features
|
|
are part of an ongoing effort aiming to provide support for
|
|
all types UML diagrams.
|
|
An <em>IEEE Software</em> article titled
|
|
<a href="../../pubs/jrnl/2003-IEEESW-umlgraph/html/article.html">On the declarative specification of models</a>
|
|
explains the rationale behind this approach.
|
|
The tehnology behind UMLGraph was used to draw many of the diagrams
|
|
appearing in the book
|
|
<a href="http://www.spinellis.gr/codereading">Code Reading: The Open Source Perspective</a> (Addison Wesley, 2003).
|
|
In addition, Adam Feuer's
|
|
<a href="http://www.zipcon.net/~adamf/software/PyUMLGraph/">PyUMLGraph</a>
|
|
system extends the concept to Python programs.
|
|
|
|
<h3>Class Diagrams</h3> <!-- {{{1 -->
|
|
One specifies a class diagram using the Java syntax complemented by
|
|
<a href="http://java.sun.com/j2se/javadoc/"><em>javadoc</em></a>
|
|
tags.
|
|
Running the UmlGraph doclet on the specification will generate
|
|
a
|
|
<a href="http://www.research.att.com/sw/tools/graphviz/">Graphviz</a>
|
|
diagram specification that can be automatically processed to
|
|
create Postscript, GIF, SVG, JPEG, fig, or Framemaker drawings.
|
|
<p />
|
|
The following is an example of a class diagram specification and the resulting UML
|
|
diagram:
|
|
<table>
|
|
<tr><td>
|
|
<pre>
|
|
class Person {
|
|
String Name;
|
|
}
|
|
|
|
class Employee extends Person {}
|
|
|
|
class Client extends Person {}
|
|
</pre>
|
|
</td><td>
|
|
<img src="doc/class-eg.gif" alt="Simple UML class diagram" />
|
|
</td></tr></table>
|
|
|
|
<h3>Sequence Diagrams</h3> <!-- {{{1 -->
|
|
One specifies a sequence diagram using <em>pic</em> macros to define
|
|
objects and method invocations.
|
|
The <a href="http://www.gnu.org/software/plotutils/plotutils.html">GNU plotutils</a>
|
|
<em>pic2plot</em> program can then process the sequence diagram to create a
|
|
PNG, PNM, (pseudo)GIF, SVG, AI, Postscript, CGM, FIG, PCL, HPGL, Regis, or TEK
|
|
drawing.
|
|
<p />
|
|
The following is an example of a sequence diagram specification and the
|
|
resulting UML diagram:
|
|
<table>
|
|
<tr><td>
|
|
<pre>
|
|
# 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);
|
|
</pre>
|
|
</td><td>
|
|
<img src="doc/seq-eg.gif" alt="Simple UML sequence diagram" />
|
|
</td></tr></table>
|
|
|
|
<h3>Download and Links</h3> <!-- {{{1 -->
|
|
UMLGraph is hereby made freely available as Open Source Software.
|
|
You can download it in source and compiled format from the following links:
|
|
<ul>
|
|
<li> <a href="UmlGraph.java">UmlGraph package (.tar.gz)</a>
|
|
(source code, compiled doclet, and documentation).
|
|
</li>
|
|
<li> <a href="doc/index.html">Documentation</a>
|
|
(table of contents - suitable for web browsing).
|
|
</li>
|
|
<li> <a href="doc/index.html">Printable documentation</a>
|
|
(the above as a single printable page).
|
|
</li>
|
|
<li> <a href="doc/ver.html">Version history</a>
|
|
</li>
|
|
</ul>
|
|
|
|
<!-- End matter {{{1 -->
|
|
<p />
|
|
<a href="../../">Diomidis Spinellis home page</a>
|
|
<hr />
|
|
<table>
|
|
<tr><td>
|
|
<a href="http://validator.w3.org/check/referer"><img src="../../valid-xhtml10.png" border="0" alt="Valid XHTML 1.0!" height="31" width="88" /></a>
|
|
<a href="http://www.w3.org/WAI/WCAG1AAA-Conformance" title="Explanation of Level Triple-A Conformance"><img border="0" height="32" width="88" src="../../wcag1AAA.gif" alt="Level Triple-A conformance icon, W3C-WAI Web Content Accessibility Guidelines 1.0" /></a>
|
|
</td><td>
|
|
<font size="-2">
|
|
(C) Copyright 2002-2004 D. Spinellis.
|
|
May be freely uploaded by WWW viewers and similar programs.
|
|
All other rights reserved.
|
|
<br />
|
|
Last modified: $Date$
|
|
</font>
|
|
</td></tr>
|
|
</table>
|
|
</body>
|
|
</html>
|