PlantUML Composite

Ken Webb 2010-03-10T23:31:35Z

PlantUML does not (yet?) natively support the UML Composite Structure Diagram, but in the interim its State Diagram capability can be used. This is possible because both the UML State Diagram and the UML Composite Structure Diagram are organized hierarchically. The UML State Diagram is based on Harel statecharts, and the UML Composite Structure Diagram is related to Harel's further ideas on visual formalisms.

The following sort-of Composite Structure Diagram was created by having a Xholon application write itself out in PlantUML state diagram format, and then running PlantUML with Graphviz to produce a .png file.

The following diagram was produced in the same way. It's only a small part of another Xholon application.

The complete PlantUML code for the robot_0 diagram is:

' Automatically generated by Xholon version 0.8.1, using
' Wed Mar 10 10:12:49 EST 2010 1268233969221
' model: Ctrnn - AdapSysLab example

@startuml ./Robot_0_Composite_1268233969221.png
state robot_0 {
  photoreceptor_1 --> sensorNeuron_4
  photoreceptor_2 --> sensorNeuron_5
  state ctrnn_3 {
    sensorNeuron_4 --> connection_9
    sensorNeuron_4 --> connection_15
    sensorNeuron_5 --> connection_10
    sensorNeuron_5 --> connection_12
    neuron_6 --> connection_11
    neuron_6 --> connection_13
    neuron_6 --> connection_16
    neuron_7 --> motor_18
    neuron_7 --> connection_14
    neuron_8 --> motor_19
    neuron_8 --> connection_17
    connection_9 --> neuron_6
    connection_10 --> neuron_6
    connection_11 --> neuron_6
    connection_12 --> neuron_7
    connection_13 --> neuron_7
    connection_14 --> neuron_7
    connection_15 --> neuron_8
    connection_16 --> neuron_8
    connection_17 --> neuron_8

return to main page