Eine aufbereitete Darstellung der Quelle

 
     
 
 
Quellsprache: Binärcode  |   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="text/css" href="manual.css" />
<script src="manual.js" type="text/javascript"></script>
<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">4</a>  <a href="chap5_mj.html">5</a>  <a href="chap6_mj.html">6</a>  <a href="chapA_mj.html">A</a>  <a href="chapB_mj.html">B</a>  <a href="chapC_mj.html">C</a>  <a href="chapBib_mj.html">Bib</a>  <a href="chapInd_mj.html">Ind</a>  </div>

<div=mjs"type=text"</scriptjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

<p id="mathjaxlink" class="pcenter"><a href="chapB.html">[MathJax off]</a></p>
<p><a id="X82D249F0793E6561" name="X82D249F0793E6561"></a></p>
<div class="ChapSects"><a href="chapB_mj.html#X82D249F0793E6561">B <span class="Heading">
      Drawing automata
    </span></a>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapB_mj.html#X7988DBAB78EA0C06">B.1 <span class="Heading">
        Installing some external programs
      </span></a>
</span>
</div>
<div class="ContSect"><span class="tocline"><span class="nocss"> </span><a href="chapB_mj.html#X84C97CA079719B11">B.2 <span class="Heading">
        Functions to draw automata
      </span></a>
</span>
<java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0

<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#X7896CAD4832C7748">B.2-2 DotForDrawingAutomaton</a></span>
<pan java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 141
<span ">B.2-4 DotStringForDrawingSubAutomaton/><span>
<span class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#X7870774E83892026">B.2-5 DotStringForDrawingGraph</a></span>
<span div class=ChapSects>a href="hapB_mjX82D249F0793E6561"B<span class"Heading"
</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 hrefInstallingsomeexternal programs

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

<h4>B.1 <span class="Heading">
        Installing java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 7
      </span><h4>

<p>In order spanclass="ContSS"br/span "nocss"&bsp<span>ahref="chapB_mj.html#X7896CAD4832C7748">B.2-2 DotForDrawingAutomaton</a></span>

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

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

<p><a ="7BC2FDA77FD0237B" name="X7BC2FDA77FD0237B"></a></p>

<h5>B. class="ContSS"><br /><span class="nocss">  </span><a href="chapB_mj.html#X7E478FDD807853CA">B.2-6 java.lang.StringIndexOutOfBoundsException: Index 119 out of bounds for length 12

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227
<p>Thisfunction draws automaton <var class="Arg">A</var>. The arguments <var class="Arg">state_names</var>, <var class="Arg">L<Installing someexternal 

<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="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">x:=Automaton("det",3,2,[ [ 2, 3, 0 ], [ 0, 1, 2 ] ],[ 1 ],[Arg"L/ <ar ">file<</var> are optional.</p>
<span class="GAPprompt">gap></span> <span class=GAPinput"()</span>

<java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0

<span class="GAPprompt">gap></span> <span class="GAPinput">DrawAutomaton(x,["st 
</</iv>

<p>The outputspanclass=">&;/span>< class=GAPinput>(x;>

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

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

<p>br>center>img =aut2_2.pg></center>>p>

<p><a id=<The output ofthethreepreviousclass"ode"DrawAutomaton<  would   following,respectively/>

<h5>B.2-2 DotForDrawingAutomaton</h5>

<java.lang.StringIndexOutOfBoundsException: Range [0, 4) out of bounds for length 0
<p>This function computes the dot code that can be used to display an java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 0


<divp>aid=X7896CAD4832C7748"name=X7896CAD4832C7748>/>/>
<class"APprompt"gap&t<span> span class="GAPinput">DotStringForDrawingAutomaton(x);</span>
"digraph  Automaton{\java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
[=\"",=;n"2\ -gt; "1\ [abel\"b\",color=blue];\n\"3\" -> \
\2\ label\,olorblue]n"\ shape=triangle,=2,style=\
lled, fillcolor=whitejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ite];\n\< class"">&t>spanclass""DotStringForDrawingAutomaton)</pan
      prediv

<p>By using Print (or PrinTo, if one wants to print to a \2\ [=\b"=lue]\n\1\" [hape,eripheries,stylejava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79


<div class="example"><pre>
<     </>/>
digraph  Automaton{
"1" -> "2" [java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
"2"-gt; 3" l=a"=];
"2" -> "1" [label="b",color=blue];
<iv ="xample">pre
""[triangle=,style,=];
"2" [shape=doublecircle, style=filled  {
""[hapedoublecircle,stylefilled,fillcolorwhite;
}
</2-gt 3 l=ac=]java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

<p>The " &t;""[""colorblue;


<div class="example"><pre>
<">gapgt;span>< ="Print(otStringForDrawingAutomaton," 1" ", "");<spanjava.lang.StringIndexOutOfBoundsException: Index 127 out of bounds for length 127
digraph  Automaton>dot   the</>
"java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 0
"2" -> "C" [label="a",  java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
"2" -> "st 1" [label="b",color=blue]"-gt; ""l=acred;
"C" ->2 -gt s 1" label=b"colorblue;
"1 shape=,peripheries2 =filled, fillcolor=]java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
"e, style=, fillcolor=white];
"C" [shape=doublecircle, 2" [shape=doublecircle, style =;
}
<spanCs=,style=illed =]
digraph  java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
st1"- "" label="",color=]
"2" -> "C" [label="a",color=red];
" > "st1" [abel=b",]
""" & C"[abel=""color=red;
"st 1" [shape=triangle,peripheries=2, style=filled2"-&;s 1"[abel=b"color==lue]
"2" [shape=doublecirclest"[=riangle,peripheries2, tyle=filled, fillcolor=burlywood];
"C" ""[doublecircle filled brown;
}
</pre></div"shape=doublecircle,style=filled, fillcolor=burlywood];

<</>/iv>

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

<div class="func"><table class="func" width="100%"><tr><td class="tdleft
<p>This function tests if automaton <code class=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


<div class="example"><pre>
ass=GAPinput"A =Automaton("ondet"5,abc"[[[2,3 ]  5] [1 4 5 ] [ 1  java.lang.StringIndexOutOfBoundsException: Index 144 out of bounds for length 144
[ 3, 4] ]   1,4  ]  ][1 ]  ,3 5 ] ] [, 2 5]] [[]
[2 4, 5] [  , [ ],[2 ,4   , ][2 ,4 ];
<span class="GAPprompt">gap></span> <span class="GAPinput">B := Automaton("nondet",5,2 ,5]  1,3, ,[ ], [2,3 4] ][][2 3  ]);
[, 4]],   1,4  ][] [ 1 ] [1,3  ][1,2,5  ]  [1 4 5 ]
[ 2, 4, 5 ], [ 1, 3, 5 ], [ 2, 3, 4, 5 ], [ 2, 3, 4 ] ] ],[ 3, 4, 5 ],[ 2, 3, 4 ]);;
< class=GAPprompt>&t<span spanclass=G>(AB;/>
</pre></div>

<p>The output is as follows, in case the configuration of your computer permits. Otherwise, you may be interested in span =>gt<span> class""(,B;span

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

<p><a id="X7BB5015378320678" name="X7BB5015378320678

<h5>B.2-4 java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0

<iv=""table class="width="tr<class""> class=>#; /(<var""A</ar, 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  used by thefunction codeclass"unc"DrawSubAutomaton/ode (=cX84"> ="efLink.-3/>/> (ifsystemis properlyconfigured)or java.lang.StringIndexOutOfBoundsException: Range [320, 319) out of bounds for length 368


<div class="example"><pre>
<=""gapg;/pan><class=">(A,)<span>
"digraph  Automaton {\n1 -> 2 [label=\"a\",color=red];\n1 -> 3 [label=\"a\",co\
]n1 &t  [label=="\"blue;-gt 4[\\"blue]\
\n1 -> 5 [label=\"b\",color=blue];\n1 -> 1 [label=\"c\",color=green,style = do\
tted];\n1 -> 4 [label=\"c\=]n & [="java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 84
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 84
\"c\",color=green];\n2 -> 4 [label=\"c\",color=green];\n2 -> 5 [label=\"c\",co\
lor=green];\n3 -> 1 [label=\"a\",color=red];\n3 -> 4 [java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 84
\g; java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 88
abel=\"c\",color=green];\n3 ->\ &;1[=a,java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 84
\",color=n3 -> 5java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 88
ed];\n4 -> 1 [label=\"b\",color=blue];\n4 -> 3 [="\,java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 85
 5 [label=\"b\",color=blue];\n4 -> 2 [label=\"c\",;n4-; java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 88
\4-g  \,color=java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 85
green,style = dotted];\n4 -> 5 [label=\"c\",color=green,style = dotted];\n5 ->\
 3 [label=\"a\",color=red];\n5 -> 4 [label=\"a\",java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 85
b",color=];\5-gt;2 =\b";& java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 85
blue];\n5 -> 2 [label=\"\";5-  \";-g; l=""java.lang.StringIndexOutOfBoundsException: Range [84, 83) out of bounds for length 85
5 -> 4 [label=\"c\",color=green];\n3 [shape=triangle,color=gray];5 &;  =c"c=;n shape=,=ray]\4[=\
iangle,color=gray];\n5 [shape=triangle,color=gray];\n2 [shape=doublecircle];\n\
3[n\java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
      </pre></div>

<p>By <> using ( ,   a  java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 102


<div  classjava.lang.StringIndexOutOfBoundsException: Range [24, 22) out of bounds for length 81
<span class="GAPprompt" java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 20
1 -> 2 [label=1&; bc=java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 33
1 -&; a,;
1 -> 1 [label="b",color=blue];
1 -> 4 [label="b",color=blue];
1 -> 5 [label="b",color=blue];
1 -> 1 [2 -> 2 [label  =java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 34
1 -> 4 [label=-java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 34
1 -> 5 [label="c",color-  java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 32
2 ->3&t  label""cblue;
2 -> 2 [label="c",color=green];
2 -> 4 [label="c",color=green];
2 -> 5 [label="c",color=green];
3 -> 1 [label="a",color=-gt;1 [=",olor=]
3 -> 4 [label="a",color=red];
3 -> 5 [label="a",color=red];
3 -> 1 [label="b",color=blue];
3 -> 1 [label="c4&;  label""java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 49
3 -&-;4[java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 49
3-;5[colorjava.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
4 -> 1 [label="a",color=5 -> 3 [label="a",color=red
4 -> ;1 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 33
4 -> 1 [label="b",color=blue];
4 ->-java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 34
4 -> 5 [label="b",color=blue];
4 -> 2 [[shape=triangle=;
4 -> 3 [label="c",color=green,style = dotted];
4 -> 4 ]
4 -&4 [sha=java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 23
5/>/java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
5 -> 4 [label="a",color=red];
5 -> 1 [label="bh5>.25</h5>
5 -&<div c=> java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 231
 &; l=";
5 -> 2 [label="c",color=green];
5 -> 3 [label="c",color=green];
5 -> 4 [label="c",color=green];
3 [shape=triangle,color=gray];
4 [shape=triangle,color=gray];
5 [shape=triangle,color=gray];
2 [shape=doublecircle];
3 [shape=doublecircle];
4 [shape=doublecircle];
1 [shape=circle];
}
</pre></div>

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

<h5>B.2-5 DotStringForDrawingGraph</h5>

<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">&#an style='color: green'>8227; DotStringForDrawingGraph</code>( <var class="Arg">G</var> )</td><td class="tdright">( function )</td></tr></table></div>
<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>
<p>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 pa java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 80
[ [ 1, 2, 3 ], [ 5 ], [ 3, java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 104
<span class="GAPprompt">gap></span> <span class="GAPinput">Print(DotStringForDrawingGraph(G));</span>
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
1 -> 1 [style=bold, color=black];
1 -&  =,=;
1 -> 3 [style=bold, color=black];
2 -> 5 [style=bold, color=black];
3 -> 3 [style=bold, 
3 -> 4 [style=bold, color=black];
4 -> 1 [> 3 [style ;
5 -> 2    sbold blackjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 &;5[bold java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 36
1 [shape=circle];
2 5&; java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 36
3 [shape=circle];
4 [shape=circle];
5 [shape=circle3s=java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 17
}
</pre></div>

>java.lang.StringIndexOutOfBoundsException: Range [19, 15) out of bounds for length 190

<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="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">4</a>  <a href="chap5_mj.html">5</a>  <a href="chap6_mj.html">6</a>  <a href="chapA_mj.html">A</a>  <a href="chapB_mj.html">B</a>  <a href="chapC_mj.html">C</a>  <a href="chapBib_mj.html">Bib</a>  <a href="chapInd_mj.html">Ind</a>  </div>

<hr />
<p class="foot">generated by <a href="https://www.math.rwth-aachen.de/~Frank.Luebeck/GAPDoc">GAPDoc2HTML</a></p>
</body>
</html>

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

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.16Angebot  ¤

*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=1128594
#Domains=1976912