example: Some updates to the state graph of the reaction system.

This commit is contained in:
Sergiu Ivanov 2020-03-03 01:01:00 +01:00
parent d958533d2c
commit 0d73b33ff3
2 changed files with 45 additions and 45 deletions

View File

@ -4,79 +4,79 @@
<!-- Generated by graphviz version 2.43.0 (0)
-->
<!-- Title: G Pages: 1 -->
<svg width="202pt" height="481pt"
viewBox="0.00 0.00 201.75 480.70" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 476.7)">
<svg width="1007pt" height="62pt"
viewBox="0.00 0.00 1006.87 61.74" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 57.74)">
<title>G</title>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-476.7 197.75,-476.7 197.75,4 -4,4"/>
<polygon fill="white" stroke="transparent" points="-4,4 -4,-57.74 1002.87,-57.74 1002.87,4 -4,4"/>
<!-- node0 -->
<g id="node1" class="node">
<title>node0</title>
<ellipse fill="none" stroke="black" cx="96.87" cy="-236.35" rx="50.82" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-240.15" font-family="Times-Roman" font-size="14.00">C:{}{t}</text>
<text text-anchor="middle" x="96.87" y="-225.15" font-family="Times-Roman" font-size="14.00">D:{}</text>
<ellipse fill="none" stroke="black" cx="527.25" cy="-26.87" rx="50.82" ry="26.74"/>
<text text-anchor="middle" x="527.25" y="-30.67" font-family="Times-Roman" font-size="14.00">C:{}{t}</text>
<text text-anchor="middle" x="527.25" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{}</text>
</g>
<!-- node2 -->
<g id="node3" class="node">
<title>node2</title>
<ellipse fill="none" stroke="black" cx="96.87" cy="-131.61" rx="38.37" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-135.41" font-family="Times-Roman" font-size="14.00">C:{t}</text>
<text text-anchor="middle" x="96.87" y="-120.41" font-family="Times-Roman" font-size="14.00">D:{}</text>
<ellipse fill="none" stroke="black" cx="780.98" cy="-26.87" rx="38.37" ry="26.74"/>
<text text-anchor="middle" x="780.98" y="-30.67" font-family="Times-Roman" font-size="14.00">C:{t}</text>
<text text-anchor="middle" x="780.98" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{}</text>
</g>
<!-- node0&#45;&gt;node2 -->
<g id="edge2" class="edge">
<title>node0&#45;&gt;node2</title>
<path fill="none" stroke="black" d="M96.87,-209.42C96.87,-197.14 96.87,-182.25 96.87,-168.86"/>
<polygon fill="black" stroke="black" points="100.37,-168.53 96.87,-158.53 93.37,-168.53 100.37,-168.53"/>
<text text-anchor="middle" x="106.37" y="-180.28" font-family="Times-Roman" font-size="14.00">{}</text>
<path fill="none" stroke="black" d="M578.29,-26.87C623.17,-26.87 688.05,-26.87 732.23,-26.87"/>
<polygon fill="black" stroke="black" points="732.44,-30.37 742.44,-26.87 732.44,-23.37 732.44,-30.37"/>
<text text-anchor="middle" x="645.76" y="-30.67" font-family="Times-Roman" font-size="14.00">{}</text>
</g>
<!-- node1 -->
<g id="node2" class="node">
<title>node1</title>
<ellipse fill="none" stroke="black" cx="96.87" cy="-341.09" rx="69.09" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-344.89" font-family="Times-Roman" font-size="14.00">C:{z}{}{t}</text>
<text text-anchor="middle" x="96.87" y="-329.89" font-family="Times-Roman" font-size="14.00">D:{z}</text>
<ellipse fill="none" stroke="black" cx="335.04" cy="-26.87" rx="69.09" ry="26.74"/>
<text text-anchor="middle" x="335.04" y="-30.67" font-family="Times-Roman" font-size="14.00">C:{z}{}{t}</text>
<text text-anchor="middle" x="335.04" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{z}</text>
</g>
<!-- node1&#45;&gt;node0 -->
<g id="edge3" class="edge">
<title>node1&#45;&gt;node0</title>
<path fill="none" stroke="black" d="M96.87,-314.16C96.87,-301.88 96.87,-286.99 96.87,-273.6"/>
<polygon fill="black" stroke="black" points="100.37,-273.27 96.87,-263.27 93.37,-273.27 100.37,-273.27"/>
<text text-anchor="middle" x="106.37" y="-285.02" font-family="Times-Roman" font-size="14.00">{}</text>
<path fill="none" stroke="black" d="M404.44,-26.87C424.58,-26.87 446.43,-26.87 466.03,-26.87"/>
<polygon fill="black" stroke="black" points="466.06,-30.37 476.06,-26.87 466.06,-23.37 466.06,-30.37"/>
<text text-anchor="middle" x="425.73" y="-30.67" font-family="Times-Roman" font-size="14.00">{}</text>
</g>
<!-- node4 -->
<g id="node5" class="node">
<title>node4</title>
<ellipse fill="none" stroke="black" cx="96.87" cy="-26.87" rx="35.21" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-30.67" font-family="Times-Roman" font-size="14.00">C:</text>
<text text-anchor="middle" x="96.87" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{}</text>
<ellipse fill="none" stroke="black" cx="926.52" cy="-26.87" rx="35.21" ry="26.74"/>
<text text-anchor="middle" x="926.52" y="-30.67" font-family="Times-Roman" font-size="14.00">C:</text>
<text text-anchor="middle" x="926.52" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{}</text>
</g>
<!-- node2&#45;&gt;node4 -->
<g id="edge4" class="edge">
<title>node2&#45;&gt;node4</title>
<path fill="none" stroke="black" d="M96.87,-104.68C96.87,-92.4 96.87,-77.51 96.87,-64.12"/>
<polygon fill="black" stroke="black" points="100.37,-63.79 96.87,-53.79 93.37,-63.79 100.37,-63.79"/>
<text text-anchor="middle" x="106.37" y="-75.54" font-family="Times-Roman" font-size="14.00">{}</text>
<path fill="none" stroke="black" d="M819.22,-26.87C838.15,-26.87 861.14,-26.87 880.98,-26.87"/>
<polygon fill="black" stroke="black" points="881.03,-30.37 891.03,-26.87 881.03,-23.37 881.03,-30.37"/>
<text text-anchor="middle" x="840.6" y="-30.67" font-family="Times-Roman" font-size="14.00">{}</text>
</g>
<!-- node3 -->
<g id="node4" class="node">
<title>node3</title>
<ellipse fill="none" stroke="black" cx="96.87" cy="-445.83" rx="96.75" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-449.63" font-family="Times-Roman" font-size="14.00">C:{x y}{z}{}{t}</text>
<text text-anchor="middle" x="96.87" y="-434.63" font-family="Times-Roman" font-size="14.00">D:{}</text>
<ellipse fill="none" stroke="black" cx="96.87" cy="-26.87" rx="96.75" ry="26.74"/>
<text text-anchor="middle" x="96.87" y="-30.67" font-family="Times-Roman" font-size="14.00">C:{x y}{z}{}{t}</text>
<text text-anchor="middle" x="96.87" y="-15.67" font-family="Times-Roman" font-size="14.00">D:{}</text>
</g>
<!-- node3&#45;&gt;node1 -->
<g id="edge5" class="edge">
<title>node3&#45;&gt;node1</title>
<path fill="none" stroke="black" d="M96.87,-418.9C96.87,-406.62 96.87,-391.73 96.87,-378.34"/>
<polygon fill="black" stroke="black" points="100.37,-378.01 96.87,-368.01 93.37,-378.01 100.37,-378.01"/>
<text text-anchor="middle" x="110.87" y="-389.76" font-family="Times-Roman" font-size="14.00">{b}</text>
<path fill="none" stroke="black" d="M194.09,-26.87C214.46,-26.87 235.72,-26.87 255.37,-26.87"/>
<polygon fill="black" stroke="black" points="255.48,-30.37 265.48,-26.87 255.48,-23.37 255.48,-30.37"/>
<text text-anchor="middle" x="210.73" y="-30.67" font-family="Times-Roman" font-size="14.00">{b}</text>
</g>
<!-- node4&#45;&gt;node4 -->
<g id="edge1" class="edge">
<title>node4&#45;&gt;node4</title>
<path fill="none" stroke="black" d="M129.96,-36.62C141.2,-36.67 150.23,-33.42 150.23,-26.87 150.23,-20.32 141.2,-17.07 129.96,-17.12"/>
<text text-anchor="middle" x="159.73" y="-23.17" font-family="Times-Roman" font-size="14.00">{}</text>
<path fill="none" stroke="black" d="M960.9,-33.61C971.53,-33.48 979.87,-31.23 979.87,-26.87 979.87,-22.51 971.53,-20.26 960.9,-20.13"/>
<text text-anchor="middle" x="989.37" y="-23.17" font-family="Times-Roman" font-size="14.00">{}</text>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

@ -542,31 +542,31 @@ tab
#+NAME: rs1-sgr
#+HEADER: :var input-rs=munch-sexp(rs1) :var input-ctx=munch-sexp(ctx1)
#+BEGIN_SRC racket :results output drawer
(dotit (ppsg (build-interactive-process (unorg-rs input-rs) (read-ctx input-ctx))))
(dotit (ppsg (build-interactive-process-graph (unorg-rs input-rs) (read-ctx input-ctx))))
#+END_SRC
#+RESULTS: rs1-sgr
:RESULTS:
digraph G {
node0 [label="(state (set 'z) (list (set 'z) (set) (set 't)))\n"];
node1 [label="(state (set) (list (set 'x 'y) (set 'z) (set) (set 't)))\n"];
node2 [label="(state (set) '())\n"];
node3 [label="(state (set) (list (set 't)))\n"];
node4 [label="(state (set) (list (set) (set 't)))\n"];
node0 [label="C:{}{t}\nD:{}"];
node1 [label="C:{z}{}{t}\nD:{z}"];
node2 [label="C:{t}\nD:{}"];
node3 [label="C:{x y}{z}{}{t}\nD:{}"];
node4 [label="C:\nD:{}"];
subgraph U {
edge [dir=none];
node2 -> node2 [label="{}"];
node4 -> node4 [label="{}"];
}
subgraph D {
node0 -> node4 [label="{}"];
node1 -> node0 [label="{b}"];
node3 -> node2 [label="{}"];
node4 -> node3 [label="{}"];
node0 -> node2 [label="{}"];
node1 -> node0 [label="{}"];
node2 -> node4 [label="{}"];
node3 -> node1 [label="{b}"];
}
}
:END:
#+BEGIN_SRC dot :file dots/examplevvXFaI.svg :results raw drawer :cmd dot :noweb yes
#+BEGIN_SRC dot :file dots/examplevvXFaI.svg :results raw drawer :cmd circo :noweb yes
<<rs1-sgr()>>
#+END_SRC