<p>The drawing of graphs described here uses <code class="code">graphviz</code> <a href="chapBib.html#biBKoutsofiosNorth:2002">[DEG+02]</a>, a software for drawing graphs developed at AT & T Labs, that can be obtained at <span class="URL"><a href="https://www.graphviz.org/">https://www.graphviz.org/</a></span>.</p>
<h4>B.1 <span class="Heading">
Installing some external programs
</span></h4>
<p>In order to create the drawings you should have <span class="URL"><a href="https://www.graphviz.org/">graphviz</a></span> installed and to view them you should have installed some <code class="code">pdf</code> viewer.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DrawAutomaton</code>( <var class="Arg">A</var>[, <var class="Arg">state_names</var>, <var class="Arg">L</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function draws automaton <var class="Arg">A</var>. The arguments <var class="Arg">state_names</var>, <var class="Arg">L</var> and <var class="Arg">file</var> are optional.</p>
<p>An automaton with <code class="code">n</code> states will be drawn with numbers <code class="code">1</code> to <code class="code">n</code> written inside the corresponding graph node. The argument <var class="Arg">state_names</var> is a list of <code class="code">n</code> strings which will be the new text written inside the corresponding graph node.</p>
<p>The argument <var class="Arg">L</var> is a list of lists of integers, each of which specifies a set of states to be drawn in a different color.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DotForDrawingAutomaton</code>( <var class="Arg">arg</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function computes the dot code that can be used to display an automaton. This can be done by using the function <code class="func">DrawAutomaton</code> (<a href="chapB.html#X7BC2FDA77FD0237B"><span class="RefLink">B.2-1</span></a>) (if the system is properly configured) or by the user in some independent way. The arguments and options are the same than those of <code class="func">DrawAutomaton</code> (<a href="chapB.html#X7BC2FDA77FD0237B"><span class="RefLink">B.2-1</span></a>).</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DrawSubAutomaton</code>( <var class="Arg">A</var>, <var class="Arg">B</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function tests if automaton <code class="code"> A </code> is a subautomaton of <code class="code"> B </code> in which case draws <code class="code"> B </code> highlighting the edges not in <code class="code"> A </code> by drawing them in a dotted style, while the others are drawn in a plain style.</p>
<p>The output is as follows, in case the configuration of your computer permits. Otherwise, you may be interested in the dot code, as pshown below.</p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DotStringForDrawingSubAutomaton</code>( <var class="Arg">A</var>, <var class="Arg">B</var> )</td><td class="tdright">( function )</td></tr></table></div>
<p>This function computes the dot code that can be used to draw automata A, with the subsutomaton B emphasized. It is silently used by the function <code class="func">DrawSubAutomaton</code> (<a href="chapB.html#X84DF99868747DD69"><span class="RefLink">B.2-3</span></a>) (if the system is properly configured) or can be used by the user in some independent way.</p>
<p>The dot code can be used to produce the following picture (which may also be produced by typing <code class="code">DrawGraph(G);</code> <br><center><img src="graph2.jpg"></center><br></p>
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DrawSCCAutomaton</code>( <var class="Arg">A</var>[, <var class="Arg">state_names</var>, <var class="Arg">L</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Draws automaton <code class="code"> A </code> and highlights it's strongly connected components by drawing the other edges in a dotted style.
<p>The optional arguments <var class="Arg">state_names</var> and <var class="Arg">L</var> are as described in <code class="func">DrawAutomaton</code> (<a href="chapB.html#X7BC2FDA77FD0237B"><span class="RefLink">B.2-1</span></a>).</p>
<p>The dot code can be used to produce the following picture (which may also be produced by typing <code class="code">DrawGraph(G);</code> <br><center><img src="sccpoi2.jpg"></center><br></p>
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.