Difference between revisions of "Diagram"

From PKC
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 30: Line 30:
</graphviz>
</graphviz>


==UML==
==mscgen==
<uml>
<mscgen caption="Message sequence chart for example no. 4">
Alice -> Bob: Authentication Request
msc {
Bob --> Alice: Authentication Response
  a,b,c;
</uml>


  a->b  [label="ab()"];
  b->c  [label="bc(TRUE)"];
  c=>c  [label="process(1)"];
  c=>c  [label="process(2)"];
  ...;
  c=>c  [label="process(n)"];
  c=>c  [label="process(END)"];
  a<<=c [label="callback()"];
  ---  [label="If more to run", ID="*"];
  a->a  [label="next()"];
  a->c  [label="ac()"];
  b<-c  [label="cb(TRUE)"];
  b->b  [label="stalled(...)"];
  a<-b  [label="ab() = FALSE"];
}
</mscgen>
<noinclude>
<noinclude>



Latest revision as of 09:40, 8 September 2021

Diagrams are pictorial representations of ideas. It associate semantic meanings to graphical artifacts.

Useful reading materials

There are some books on that directly relates to this concept:

On PKC, one may use simple textual data to generate diagrams, using the Diagrams extension.

Sample Diagrams

The Diagrams package supports at least two flavors of diagrams

GraphViz

<graphviz renderer="neato" caption="Graph for example no. 2"> graph example2 {

 run -- intr;
 intr -- runbl;
 runbl -- run;
 run -- kernel;
 kernel -- zombie;
 kernel -- sleep;
 kernel -- runmem;
 sleep -- swap;
 swap -- runswap;
 runswap -- new;
 runswap -- runmem;
 new -- runmem;
 sleep -- runmem;

} </graphviz>

mscgen

<mscgen caption="Message sequence chart for example no. 4"> msc {

 a,b,c;
 a->b  [label="ab()"];
 b->c  [label="bc(TRUE)"];
 c=>c  [label="process(1)"];
 c=>c  [label="process(2)"];
 ...;
 c=>c  [label="process(n)"];
 c=>c  [label="process(END)"];
 a<<=c [label="callback()"];
 ---   [label="If more to run", ID="*"];
 a->a  [label="next()"];
 a->c  [label="ac()"];
 b<-c  [label="cb(TRUE)"];
 b->b  [label="stalled(...)"];
 a<-b  [label="ab() = FALSE"];

} </mscgen>


References

Related Pages