Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

 chapB_mj.html   Interaktion und
PortierbarkeitHTML

 

 products/Sources/formale Sprachen/GAP/pkg/automata/doc/chapB_mj.html


<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script type="text/javascript"
  src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
<title>GAP (Automata) - Appendix B: 
      Drawing automata
    </title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta name="generator" content="GAPDoc2HTML" />
<link rel="stylesheet" type="
<script src"anual. type=text/javascript"></>
<script type="text/javascript">overwriteStyle();</script>
</head>
<body class="chapB"  onload="jscontent()">


<div class="chlinktop"><span class="chlink1">Goto Chapter: </span><a href="chap0_mj.html">Top</a>  <a href="chap1_mj.html">1</a>  <a href="chap2_mj.html">2</a>  <a href="chap3_mj.html">3</a>  <a href="chap4_mj.html"

<div class="chlinkprevnexttop"> <a href="chap0_mj.html">[Top of Book]</a>   <a href="chap0_mj.html#contents">[Contents]</a>    <a href="chapA_mj.html">[Previous Chapter]</a>    <a href="chapC_mj.html">

<p id="mathjaxlink" class="pcenter">< class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#X7BB5015378320678<//
<p><a id="X82D249F0793E6561" name="X82D249F0793E6561"></a></p>
<"ChapSects"<href".html#> span =>
      Drawing automata
    </span></a>
<div class="java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 6
          programs
      </span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span classjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        Functionsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      </span></a>
</span>
<div class="ContSSBlock">
<span class="ContSS"><      <
< "< /<class="> n;/< java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 147
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#X84DF99868747DD69">B.2-3 DrawSubAutomaton</a></span>
<span class=
pidXjava.lang.StringIndexOutOfBoundsException: Range [29, 27) out of bounds for length 62
span"java.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 141
</div></div>
</div>

<h3>B <span class="Heading">
      Drawing automata
    </span></h3>

<p>The drawing of graphs described here uses <code class="code">graphviz</code> <a

<p><a id="X7988DBAB78EA0C06" name="X7988DBAB78EA0C06"></a></p>

<h4>B.1 <p java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 183
        Installing 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 java.lang.StringIndexOutOfBoundsException: Index 170 out of bounds for length 0

<p><a id="X84C97CA079719B11" name="X84C97CA079719B11"></a></p>

<h4>B.2 <span class="Heading">
        Functions to draw automata
      </span></h4>

<p><a id="X7BC2FDA77FD0237B" name="X7BC2FDA77FD0237B"></a></p>

<h5>B.2-1 DrawAutomaton</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DrawAutomaton</code>( <var class="Arg">A</var>[, <var class="Arg">state_names</var>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
Arg"><var>and <ar class=Arg"="DrawAutomatonx;/span>

<p>An automaton with

<p>The argument <var class="Arg">L</var> is a list of lists of integers, <


<div class="example"><pre>
<span class="GAPprompt">gap>pre>/>
< =GAPprompt>apgt<span span ="DrawAutomaton)</spanjava.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 86

<span class="GAPprompt">gap></span> <span class="GAPinput">DrawAutomaton(x,["st 1", "2", "C"]);</span

<span class=<>>imgsrc"j"</<br</>
</pre></div>

<>output   previous <code class=c><code>commands bethe  diagrams .</

<p><br><center><img java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0

<p><br><center><img src="aut2_1.jpg"></center><br></p>

<p><br><center><img src="aut2_2.jpg"></center><br></p>

<>< =X7896CAD4832C7748"=X7896CAD4832C7748"<a>p

<h5>B.2-2 span =GAPprompt>&;/> < classjava.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 101

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"[label\"\colorred]\\2"-\1\[=
<p>This function"2"[=\"b"c=]\\1"[triangle,peripheries2 fi\


<div class="example"><pre>
<pan class=GAPprompt>ap&;</span>< =GAPinput>(x;</pan>
"digraph  Automaton{\n\</></>
[label=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
\2\ [abel"\"color=lue;n"1[=triangle,=2,style=fi\
lled, fillcolor=white];\n\"2\" [shape=doublecircle, style=filled, fillcolor=wh\
ite];\n\"3\" [shape=doublecircle, style=filled, fillcolor=java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 0
       </re<divjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18

<p>By using Print (or PrinTo, if one wants to print to a file) the2"-;""[abel=a"colorred];


<class=">pre>
<span class="GAPprompt">gap1"shape=,peripheries2 =filled,fillcolorwhite];
digraphAutomaton
"1" -> "2" [label=" shape= = fillcolor=white]
"" -gt;""[abel"",olorred;
"2" -> "1" [label="b",color=blue];
""-g " label=b,color=];
"1" [java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 0
"2" [shape=span class="GAPprompt&t;/>spanclass=GAPinput>PrintD(x,[st1,"" C]);<>
"3" [shape=doublecircle, style=filled, fillcolor=white];
}
</pre></div>

<pThe  codeproduced forthe remaining pictures:/>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Print(DotStringForDrawingAutomaton(x,["st 1", "2", "C"]));</span>
digraph  Automaton{
"st 1" -> "2" [label="a",color=red];
2" >" [abel"",olor=]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
"" -;"t1"[=,=]
"C" -> "2" [label="b",color"t "[triangle=,stylefilled white;
"st 1" [shape="2" [shape=doublecirclstyle=illed fillcolor;
"=filled,fillcolor=hite]java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
"" [hapedoublecircle =illed,fillcolorwhite;
}
<span class="GAPprompt">gap></span> <span class="GAPinput">Print" 1 -gt;""[=a,color=ed;
digraph  Automaton{
""2"-;" 1"[=b,color=blue]
"" -gt;" l=""=]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
"2 gt;"t1 label=b,=]
"C" -> "2" [label="b",color=blue];
" 1 shape=,=2sjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 73
" shape=,style=,fillcolor=]java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
"C"[hape java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 60
}
pre>/ivjava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12

<p><a id="X84DF99868747DD69" name="X84DF99868747DD69"></a></p>

<h5>B.2-3 DrawSubAutomaton</h5>

<div class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
<p>This function tests if automaton <code class=GAPinput": ""5,,   ,3 ,[5 , , ,5] [ ,5],</span>


<div class="example"><pre>
<span class="GAPprompt"><span class="GAPprompt">gap  ][[1 ,5] [ ]  1][ 1 ,5 ], [1 ,  ,  ,
[ 3, 4 ] ], [ [,4, 5 ,[1, 3,5 ]   ,3, 4 ]]][] 2,3  );
[ 2,4  ,[1,3 5] ,  2,3,  ]], , 2,3,4];java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
<span class="GAPprompt">gap></span> <span class="GAPinput">B := Automaton("nondet",5,"abc",[ [ [ 2, 3 ], [ 5 ], [ 1, 4, 5 ], [ 1, 5 ],<[3,  ]],[1, ,5] []1, ,,5]  1,2 5 ],[ , ,5 ]
[ 3, 4 ]span"GAPprompt"gap&;/>< class"APinput"DrawSubAutomaton,)<span>
[ 2, 4, 5 ], [ 1, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
< class=GAPprompt"gap&;</><span class="APinput>DrawSubAutomatonA);/>
</pre></div>

<p>The output is as follows, in java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0

<p><br><center><img src="subaut.jpg"></center><br></p>

<p><a id="X7BB5015378320678" name

<h5>B.2-4 DotStringForDrawingSubAutomaton</h5>

<div class="func"><<iv class="unc"<table=func 100%"><>td =tdleft">code class=func"&8227DotStringForDrawingSubAutomaton<code>(var class=Arg"A/>,<varclass
<p>This function computes the dot code that can be used to It is silently  function < =f"DrawSubAutomaton</ode>(a href"hapB_mj.html#84DF99868747DD69>spanclass="">B.23<span</>  the  is properly configured)orcan be used by the user in some independent way.</p>


<div span classGAPprompt>&t</pan>span ="APinput"DotStringForDrawingSubAutomatonB;/java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
<span class="GAPprompt">gap></span> <span lor=red]\-g;1=b"color=]\n1 >  label=\b\,color=;java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
"digraph  Automaton {\n1 -> 2 [label=\"a\",color=red];\n1 -> 3 [label=\"a\",co\
lorred]\1->  [abel="b\"color=blue];\n1 -> 4 [label=\"b\",color=blue];\
\n1 -> 5 [label=\"b\",color=blue];color=green,style = dotted];\n2 -> 5 [label=\"a\",color=red];\n2 -> 2 [label=\
tted];\n1 -> 4 [label=\"c\",color=green,style = dotted];\n1 -> 5 [label=\"c\",\
color=green,style = dotted];\n2 -> 5 [label=\"a\",color=red];\n2 -> 2 [label=\
\"\n3-&t;5[label=\"a\",color=red];\n3 -> 1 [label=\"b\",color=blue];\n3 -> 1 [l\
lor=green];n3-&t  [abel\"\",olor=red];\n3 -> 4 [label=\"a\",color=red];\
\ [label=\"a\",color=red];\n3 -> 1 [label=\"b\",color=blue];\n3 -> 1 [l\
abel\c\"color=green];\n3 -> 3 [label=\"c\",color=green];\n3 -> 5 [label=\"c\
\",color=green];\n4 -> 1 [label=\"a\",color=red];\n4 -> 5 [label=\"a\",color=r\
ed]\n4 -gt 1[label=\"b\",color=blue];\n4 -> 3 [label=\"b\",color=blue];\n4 ->\
 5 [label=\"b\",color=blue];\n4 -> 2 [label=n &t;3[label=\c\"=reen,style = dotted];\n4 -> 4 [label=\"c\",color=\
\n4 -> 3 [label=\"c\",color=green,style = dotted];\n4 -> 4 [label=\"c\",color=\
green,style = dotted];\n4 -> 5 [label=\"c\",color=green,style = dotted];\n5 ->\
 3 [\blue\ -;2 [label"\,color=blue];\n5 -> 5[label=\"b\",color=\
b"color=blue];n5 -gt; 2[label=\b\,color=blue]\n5 -&t; 5 [abel==\b\,color=\
blue];\n5 -> 2 [label=\"c\",color=green];\n5 -> 3 [label=\"c\",color=green];\n\
5-gt;4[label="\",olorgreen]\3[=riangle,color=ray]n [hapetrjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
iangle shape=doublecircle];\n4 [shape=doublecircle];\n1 [shape=circle];\n}\"
3 [shape=doublecircle];\n4 [shape=doublecircle];\n1 [shape=circle];\n}\n"
      </pre></div>

<>By Print(rPrinTo,ifonewants toprint to a file)thestring is displayed as follows:</p>


<div class="example">
<span="GAPprompt">gap></span> <span class="GAPinput">Print(last);</span>
igraph  Automaton {
1 -> 2 [label="a",color=red];
1 -> 3 [label="a",colordigraph  Automaton {
1 -> 1 [label="b",color=blue];
1 -&t 4 [label="",olorblue];
1 -> 5 [label="b",color=blue];
1 -> 1 [label="c",1 -> 3 [label="a",color&t 3[label="",color=red]
1 -> 4 [label="c",color=green,style = dotted];
1 -> 5 [label="c",color=green,style = dotted];
2 -> 5 [label="a",color=red];
2 -> 2 [label="c",color=green];
2 -> 4 [label="c",color=green];
2 > 5 [label="c",color=green];
3 -> 1 [label="a",color=red];
3 > 4 [label="a",color=red];
3 -> 5 [label="a",color=red];
3 -gt;1[=b,olor=]java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
3 -> 1 [label="c",color=green];
3 -> 3 [label="c",color=green];
3 -> 5 [label="c",color=green];
 & 1 [abel="",olor=ed;
4 -> 5 [label="a",color=red];
4 -> 1 [label="b",color=blue];
4 -> 3 [label="b",color=blue];
4 -> 5 [label="b",color=blue];
4 -gt2 [=c,color=green,style = dotted];
4 -> 3 [label="c",color=green,style = dotted];
 -gt 4 [label="c",color=green,style = dotted];
4 -> 5 [label="c",color=green3 -gt; 5  [label="c",color=green];
5];
5 -> 4 [label="a",color=red];
5 -gt; 1 [label="b",color=blue];
5 -> 2 [label="b",color=blue];
5 -> 5 [label="b",color=blue];
5 > 2 [label="c",color=green];
5 -> 3 [label="c",color=green];
5 -> 4 [label="c",color=green];
3 [,color=ray]java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
4 [shape=triangle,color=gray];
5 [shape=triangle,color=gray];
2 [shape=doublecircle];
3 [shape=doublecircle];
4pe=oublecircle];
1 [shape=circle];
}
</re></div>

<p><a id="X7870774E83892026" name="X7870774E83892026"></a></p>

<B2- DotStringForDrawingGraph

<lass=func"<tableclass="func" width="100%"><tr><td class="tdleft"><code class="func">‣ DotStringForDrawingGraph</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )5-&t; 5[abel=b,color=blue]java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DrawGraph</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<>Draws a graph specified as an adjacency list <code class="code">G</code>.</p>


<div class="example"><pre> 
<span class="GAPprompt">gap></span> <span class="GAPinput">G := [[1,2,3],[5],[3,4],[1],[2,5]];</span>
[ [ 1, 2, 3 ], [ 5 ], [ 3, 4 ], [ 1digraph Graph__{
<span class="GAPprompt">gap></span> <span class="GAPinput">Print(DotStringForDrawingGraph> 2 style=old color=lack]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
digraph Graph__{
1 -> 1 [style=bold, color=black];
1 -> 2 [style=bold, color=black];
1 -=bold, color=black]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
2 > 5 [tyle=,color=black];
3 -> 3 [style=bold, color=black];
3 -> 4 [style=bold, color=black5 gt;5 [tyle=, color=black];
4 -> 1 [style=bold, color=black];
5  -&t 2 [style=bold, color=black];
5 -> 5 [style=bold, color=black];
1 [shape=circle];
2 [shape=circle];
3 [hapecircle];
4 [shape=circle];
5 [shape=circle];

</pre></div>

<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>

<p><a id="X7E478FDD807853CA" name="X7E478FDD807853CA"></a></p>

<h5>B.2-6 DrawSCCAutomaton</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; 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>

<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_mj.html#X7BC2FDA77FD0237B"><span class="RefLink">B.2-1</span></a>).</p>


<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">rcg := Automaton("det",6,"ab",[ [ 3, 3, 6, 5, 6, 6 ], [ 4, 6, 2, 6, 4, 6 ] ],</span>
[ ],[ ]);;
<span class="GAPprompt">gap></span> <span class="GAPinput">Print(DotStringForDrawingSCCAutomaton(rcg));</span>
digraph  Automaton{
"1" -> "3" [label="a",color=red,style = dotted];
"2" -> "3" [label="a",color=red];
"3" -> "6" [label="a",color=red,style = dotted];
"4" -> "5" [label="a",color=red];
"5" -> "6" [label="a",color=red,style = dotted];
"6" -> "6" [label="a",color=red,style = dotted];
"1" -> "4" [label="b",color=blue,style = dotted];
"2" -> "6" [label="b",color=blue,style = dotted];
"3" -> "2" [label="b",color=blue];
"4" -> "6" [label="b",color=blue,style = dotted];
"5" -> "4" [label="b",color=blue];
"6" -> "6" [label="b",color=blue,style = dotted];
"1" [shape=circle, style=filled, fillcolor=white];
"2" [shape=circle, style=filled, fillcolor=white];
"3" [shape=circle, style=filled, fillcolor=white];
"4" [shape=circle, style=filled, fillcolor=white];
"5" [shape=circle, style=filled, fillcolor=white];
"6" [shape=circle, style=filled, fillcolor=white];
}
</pre></div>

<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>


<div class="chlinkprevnextbot"> <a href="chap0_mj.html">[Top of Book]</a>   <a href="chap0_mj.html#contents">[Contents]</a>    <a href="chapA_mj.html">[Previous Chapter]</a>    <a href="chapC_mj.html">[Next Chapter]</a>   </div>


<div class="chlinkbot"><span class="<p>he 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>

<hr />
<p class="java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
</body>
</html>

Messung V0.5 in Prozent
C=99 H=100 G=99

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.15Angebot  (Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-13) ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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 und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1128778
#Domains=1976912